Extracting list from memory for an FM....

Question: Using SUBMIT I know how to call a report and extract from memory the list output, but, how can I do the same for an FM ?

For example, I wish to extract the job details for a particular pattern using:

CALL FUNCTION 'C14H_JOB_LIST'
....

The result of this FM is a list output but I was wondering how I can capture it. I guess I could execute in background and then collect the spool contents, but that seem long-winded and complictaed. There must be an easier way.

John

Answer:
I would be tempted to implement it myself. C14H_JOB_LIST contains two function calls (excluding the call to the job list processor) and half a dozen extra lines of code. It would be quicker than doing it any other way.
_________________
Regards

R


Abap KC
SFMDR

Answer:
Yes, R's suggestion is the best approach. You probably only need to execute the first two FM's within 'C14H_JOB_LIST' and not the third one as you probably don't need to produce a list output if everything can be derived. This can be done by inxpecting the TAB 'L_JOBSELECT_JOBLIST' from the 2nd FM (BP_JOB_SELECT) and checking the status field.

The Status field will be one of these:

Ready = 'Y'
Running/Active = 'R'
Scheduled = 'P'
Released = 'S'
Aborted = 'A'
Finished = 'F'
Put active (?) = 'Z'
Unknown = 'X'.

The rest of the fields are self-explanatory.

Dr Sidewalk
_________________
"In the middle of difficulty lies opportunity" - Albert Einstein
"Money isn't everything in life, unless you don't have it". David King
"Fail to plan, plan to fail"
"Success is a journey, not a destination."
Copyright ?2007 - 2008 www.jt77.com