06-15-2009 3:48 PM
Hi, all.
I created 2 programs, prg1 & prg2.
prg1 call prg2 by 'SUBMIT'.
The two programs have their spool.
I need to see only one spool at the end of elaboration. The spool that I need is the union of the 2 spool of the two programs.
The prg2 can also be called more times by the prg1.
Does someone know how I can do?
06-15-2009 3:53 PM
Try this way....
SUBMIT rkaep000
USING SELECTION-SET 'BPC TEST'
EXPORTING LIST TO MEMORY AND RETURN.
* Read list from memory into table
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = lt_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Error in function module &1
ENDIF.
*Spool content in Ascii format
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listobject = lt_listobject
listasci = txtlines
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = lt_listobject
EXCEPTIONS
empty_list = 1
OTHERS = 2.
CALL FUNCTION 'LIST_FREE_MEMORY'
TABLES
listobject = lt_listobject.
Prabhudas
06-15-2009 3:58 PM
06-15-2009 4:06 PM
>
> sorry, I don't understand.
>
> are you creating a write report?
Yes, I create 2 report.
The first report call the second with 'SUBMIT'