‎2008 Mar 10 7:03 AM
Hi,
I am using the function module 'LIST_FROM_MEMORY' to import data and the LISTOBJECT contains values in raw format.How to convert this to char format?I dont want to use 'DISPLAY_LIST' as I want the values of the parameter 'LISTOBJECT' to be passed to block alv in the calling program.
Please suggest me as to how to do the conversion?
Thanks in advance
Vasudha
‎2008 Mar 10 7:44 AM
Use Function Module: LIST_TO_ASCI
Converts the specified list (LIST_INDEX) or the provided list
(LISTOBJECT) to ASCI.
Here, the purely text part of the list is copied line by line to the
prepared internal table (LISTASCI) without any attributes (color, icon,
symbol, ...). There is no line break in this case, i.e. if the internal
table line is not long enough, the list line is truncated.
DATA LISTTAB LIKE ABAPLIST OCCURS 1.
DATA: BEGIN OF ASCITAB OCCURS 1,
LINE(256),
END OF ASCITAB.
...
CALL FUNCTION 'LIST_TO_ASCI'
TABLES LISTOBJECT = LISTTAB
LISTASCI = ASCITAB.
The provided list (LISTOBJECT) is taken into account only if the
parameter LIST_INDEX = -1 (default). Otherwise, it is ignored.
Hope this helps.
Regards
Vinayak
‎2008 Mar 10 7:26 AM
‎2008 Mar 10 7:44 AM
Use Function Module: LIST_TO_ASCI
Converts the specified list (LIST_INDEX) or the provided list
(LISTOBJECT) to ASCI.
Here, the purely text part of the list is copied line by line to the
prepared internal table (LISTASCI) without any attributes (color, icon,
symbol, ...). There is no line break in this case, i.e. if the internal
table line is not long enough, the list line is truncated.
DATA LISTTAB LIKE ABAPLIST OCCURS 1.
DATA: BEGIN OF ASCITAB OCCURS 1,
LINE(256),
END OF ASCITAB.
...
CALL FUNCTION 'LIST_TO_ASCI'
TABLES LISTOBJECT = LISTTAB
LISTASCI = ASCITAB.
The provided list (LISTOBJECT) is taken into account only if the
parameter LIST_INDEX = -1 (default). Otherwise, it is ignored.
Hope this helps.
Regards
Vinayak