01-20-2015 10:30 PM
Hi Gurus,
How to generate the multiple spools using with submit programs in single report.
I have a requirement, I will take 6 standard APO programs output keep into one custom report output. So for this requirement I have to use the submit programs and generate the spool for 1st submit program, but spool is not generated the next 5 submit program. but I need the spool and take the spool number, and get the data from spool and put in to output.
SUBMIT /sapapo/rlcdelete
TO SAP-SPOOL
WITH p_area = '9ADC01' "'ZSNP_WESTCON'
WITH p_versio = '000'
* WITH p_test = ' '
WITH sel_prod IN lr_product
WITH sel_loc IN lr_locno
WITHOUT SPOOL DYNPRO
AND RETURN.
GET PARAMETER ID 'SPI' FIELD l_spool_1.
SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
WITH rqident = l_spool_1
WITH first = '1'.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list.
IF itab_list[] IS NOT INITIAL.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = it_output
listobject = itab_list.
but this code is working for only one submit program, I need to get the data from remaining 5 submit programs.
If any one knows, please help on this issue. Thanks in advance.
Regards,
Sridhar
01-21-2015 3:11 AM
Hi,
So, I assume you put the above code in a loop? What happens then - do you only get one spool file, or the same one generated over and over again?
cheers
Paul
01-21-2015 3:59 PM
Hi Paul,
Thanks for giving the reply, but I am not using any loop for this program.
I have to use the submit < APO standarard prog1> and I am getting the spool number using through Get parameter ID.
and I have to use the submit < APO standarard prog2> and I am not getting the spool number using through Get parameter ID.
If you know, could you please help on the same.
I thought may be parameter ID's are different in different programs.
But I will search in two programs, does not maintain set parameter ID's.
Regards,
Sridhar
01-21-2015 10:36 PM
I am wondering why you do a SUBMIT .. TO SAP-SPOOL, then retrieve the spool file, output it, and then capture it. Do you really need those intermediate steps?
Why not do:
SUBMIT /sapapo/rlcdelete EXPORTING LIST TO MEMORY AND RETURN
followed by
CALL FUNCTION 'LIST_FROM_MEMORY'
No need to bother with parameter IDs.
cheers
Paul