2007 Nov 05 6:49 AM
Dear all,
How to store output from another called program and display it later?
If this program is called several times and with different output, how to store them and display it at once?
Herewith is what I had done, but only the first output is displayed.
This code is run several times:
SUBMIT ZFGLR02A LINE-SIZE 170
LINE-COUNT 58
EXPORTING LIST TO MEMORY
WITH BILALIST = 'X' " with classical list
WITH BILAGRID = ' ' " no ALV grid
WITH BILATREE = ' ' " no ALV tree
WITH S_BUKRS EQ L_BUKRS SIGN 'I'
WITH S_BELNR EQ L_BELNR SIGN 'I'
WITH S_GJAHR EQ L_GJAHR SIGN 'I' AND RETURN.
DATA: LIST_MEMORY TYPE TABLE OF ABAPLIST.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_MEMORY
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC EQ 0.
APPEND LINES OF LIST_MEMORY TO LIST.
ENDIF.
...
This only run once.
CALL FUNCTION 'WRITE_LIST'
* EXPORTING
* WRITE_ONLY = 'X'
TABLES
LISTOBJECT = LIST
EXCEPTIONS
EMPTY_LIST = 1
OTHERS = 2
.
2007 Nov 05 7:05 AM
Hi,
For this u can capture the select options and submitt the report every time again with the new select options which includes earlier options also , so that complete list is exported to memory and complete list is imported from memory..
2007 Nov 05 7:10 AM
Is that means I had to capture all the select options and submit at once?
However, the problems is I cannot collect all the value of select options and call the program at once, because the results return by the program will be different.
Please advice. Thanks.
2007 Nov 05 7:16 AM
how about save the output using bdc and display them at the time u want?
regards
2007 Nov 05 7:53 AM
This probably will increase program complexity. Is there any function modules that can help in capture list output?