09-13-2010 5:01 PM
Hi Experts,
I am using rseidoc9 to retrieve the idocs list and to use the output values in new code.
I used submit rseidoc9 with selection table exporitng list to memory and return.
The code raises the dump with cntl_error exception.
When i searched in the forums,the failure occurs because the output list of rseidoc2 will be in ALV list.
If i run the same without exporting list,it works fine.
Let me know how to retrieve the values of rseidoc2 into internal table.
Thanks
Manju
09-14-2010 8:53 AM
Hello ,
In the calling program assign field symbol for the internal table to be retrived and after the program is called
copy the contents of the internal table from the field symbol.
For eg ,
FIELD-SYMBOLS: <fs_g> TYPE ANY.
DATA: name(25) TYPE c VALUE '(RSEIDOC2)ITAB1[]'.
ASSIGN (name) TO <fs_g>.
After calling the program
ITAB2[] = <FS_G>
Regards,
Abhilash
09-14-2010 9:53 AM
hi,
first execute report RSEIDOC2 set layout by name idoc
create one internal table of same type as layout , but see you dont change column position and dont add any coloumn .
pass that name like given below .
also make use of delimeter to spilt column and move in another internal table and append that table .
data : listtab like abaplist occurs 1 .
data : txtlines(20000) type c occurs 0 with header line.
data : delimiter(1) value '|'.
submit RSEIDOC2 using selection-set 'idoc'
exporting list to memory
and return .
call function 'LIST_FROM_MEMORY'
tables
listobject = listtab
exceptions
not_found = 1
others = 2.
if sy-subrc <> 0.
endif.
call function 'LIST_TO_ASCI'
tables
listobject = listtab
listasci = txtlines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
CHECK sy-subrc = 0.
regards
Deepak.