Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module to import data from memory

Former Member
0 Likes
698

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
406

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

2 REPLIES 2
Read only

andreas_mann3
Active Contributor
0 Likes
406

use fm LIST_TO_ASCI

A.

Read only

Former Member
0 Likes
407

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