‎2008 Feb 21 10:58 AM
Hello All,
I have a scenario, where i will call standard R/3 report from my zreport.
in my zreport, i will get the standard R/3 report name as user input, and i have to call that standard report 'with no display' to the user.
after the execution of standard report, i need the results of standard report in my zreport.
here is the piece of code what i have written, but i am unable to understand, whats in I_LIST, and how to convert to understandable table data.
SUBMIT (WD_COMP_CONTROLLER->obj_name)
EXPORTING LIST TO MEMORY
WITH SELECTION-TABLE lt_rtparams
WITH dy_selm = 'D'
AND RETURN.
data: i_list type table of abaplist.
types: BEGIN OF vlist ,
filler1(01) TYPE c,
field1(06) TYPE c,
filler(08) TYPE c,
field2(10) TYPE c,
filler3(01) TYPE c,
field3(10) TYPE c,
filler4(01) TYPE c,
field4(3) TYPE c,
filler5(02) TYPE c,
field5(15) TYPE c,
filler6(02) TYPE c,
field6(30) TYPE c,
filler7(43) TYPE c,
field7(10) TYPE c,
END OF vlist.
data: vlist1 type table of vlist.
Use the function module to get the data from memory.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = I_LIST.
Use the function module to convert raw data to asci format
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
LISTASCI = vlist1
LISTOBJECT = I_LIST
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
IF SY-SUBRC NE '0'. "#EC *
MESSAGE E056."Unable to convert data.
ENDIF.
‎2008 Feb 21 12:53 PM
Hello Amarender,
You will have some 4 lines for header in the internal table and you will have the detailed output. Each set of output will be separated by -
etc. The only way I do convert it is by seeing the format in the debugging mode and getting the field values identifying the offset.
Hope this will help you.
Regards
Farzan
‎2008 Feb 21 3:42 PM
The standard program sends its output to list and while you are submitting the standard progam you have mentioned to export the list output to memory. And in your Z-program you are importing the same in a list object by calling the FM 'LIST_FROM_MEMORY' . After that your Z-program
calls the LIST_TO_ASCII FM to get the list object in ASCII format (vlist1 internal table).
Hope this clarifies your Q.
<REMOVED BY MODERATOR>
Thanks,
Balaji
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:44 AM