10-13-2008 7:40 AM
Hi i have written the code as
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
WITH_LINE_BREAK = ' '
TABLES
listasci = it_asc
LISTOBJECT = it_list
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3
Now have to fetch only one value stored in the table it_list.How to fetch it.
10-13-2008 9:32 AM
Hi,
The ASCII list will be in the internal table "it_asc". You need to loop and identify the row you need.
Loop at it_asc into wf_asc.
...
if sy-index = 1.
Print "Row I want".
Exit.
endif.
.
Endloop.
Thanks and Best Regards,
Dinesh.
10-13-2008 9:32 AM
Hi,
The ASCII list will be in the internal table "it_asc". You need to loop and identify the row you need.
Loop at it_asc into wf_asc.
...
if sy-index = 1.
Print "Row I want".
Exit.
endif.
.
Endloop.
Thanks and Best Regards,
Dinesh.
08-28-2009 11:32 AM
Hi, the listasci table of FM list_to_asci remains empty to me, although the contents of listobject table can be displayed correctly using FM DISPLAY_LIST. I can even see when debugging FM list_to_asci that when it scrolls through the lines of listobject, it is able to convert data into listasci, however, at the end this last variable is empty!
The way I call list_to_asci is:
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
WITH_LINE_BREAK = ' '
IMPORTING
LIST_STRING_ASCII = asci_string
LIST_DYN_ASCII =
TABLES
LISTASCI = asci_tab
LISTOBJECT = mem_tab
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3
.
By the way, the list object is from spool.
Can anyone help, pls??
-- Adam
08-28-2009 11:36 AM
Hi,
try to use follwing TYPE for your tables:
DATA asci_tab TYPE text180.
DATA mem_tab TYPE abaplist.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = asci_tab
listobject = mem_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
Regards,
David
08-28-2009 12:30 PM