‎2008 Jul 21 6:27 AM
hello guys,
Actually i am trying to call a program'B' from program 'A', using submit and return.i want to capture the output of program 'B' which is list output, i have used 'LIST_FROM_MEMORY' functional module in program 'A', to download from abap memory, but how do i convert this file into a normal internal table to read the output.
i have tried 'LIST_TO_TXT' Func Mod to convert from abaplist to txt but its not working.
could anybody pls suggest a solution.
‎2008 Jul 21 6:38 AM
‎2008 Jul 21 6:39 AM
‎2008 Jul 21 6:48 AM
thank you for all u'r replie's.
but guys i don't want to display the output of program 'B' in program 'A',but i want to capture it in an internal table so that i can read in program 'A'.
‎2008 Jul 21 6:49 AM
‎2008 Jul 21 7:09 AM
SUBMIT zefl_soff_update_single
WITH so_objid IN fin_tran
AND RETURN
EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_list
EXCEPTIONS
not_found = 1.
IF sy-subrc NE 0.
ENDIF.
REFRESH t_ascii.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_ascii " list converted to ASCII
listobject = t_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
LOOP AT t_ascii.
WRITE : t_ascii-f1.
ENDLOOP.
Try tHis.......
Regards
Anbu
‎2008 Jul 21 8:35 AM
dear anbu,
thanks for the code ,but i have a problem here
my code...........
DATA list_tab TYPE TABLE OF abaplist.
data : t_ascii type LIST_STRING_TABLE.
data : wa_ascii type LIST_STRING_TABLE.
SUBMIT Zrabest_alv01 USING SELECTION-SET 'DEEPAK'
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_ascii " list converted to ASCII
listobject = list_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
ENDIF.
it is giving me a dump in the function module LIST_TO_ASCI.
IT SAYS:
" At the statment
"DESCRIBE"
only character-type data objects are supported at the argument position
"LISTASCI", but no strings are supported (data types STRING and XSTRING).
In this particular case, the operand "LISTASCI" has the
type "g". "
‎2008 Oct 28 7:42 PM
Try this declaration
>>>
data : t_ascii(600) type c occurs 0 with header line,
wa_ascii(600) type c.<<<