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

Problem with EXPORT LIST TO MEMORY

Former Member
0 Likes
1,774

Hello Friends,

I need to know the way of using EXPORT LIST TO MEMORY in SUBMIT Statement. Coz its not working for me. I am trying to create a BAPI out of a standard FI report(RFBILA00) so that i can get the result back in a Java program. I dont want to take a Z Version out of the program.

Server: ECC 5.0

I came across this addition and i tried to use it as follows:

SUBMIT RFBILA00

WITH SELECTION-TABLE seltab

WITH BILAVERS = 'BABE'

WITH BILBJAHR = '2006'

WITH BILVJAHR = '2005'

WITH BILASPRA = BILASPRA

WITH BILABKON = 1

WITH BILAGKON = 2

EXPORTING LIST TO MEMORY AND RETURN .

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_list

EXCEPTIONS

not_found = 4

OTHERS = 8.

The list gets generated and displayed on the screen(?) which is against the explanation given for this addition. Moreover nothing gets exported and itab_list is empty. What could be wrong?

Prompt replies will be awarded.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,075

Hello Tamilarasan

On our ECC 5.0 the default selection-screen setting for list output is ALV grid control. Perhaps this could be the problem.

Try to add the following parameters to your SUBMIT statement:

SUBMIT RFBILA00
...
WITH BILALIST = 'X'  " with classical list
WITH BILAGRID = ' '  " no ALV grid
WITH BILATREE = ' '  " no ALV tree
...

Regards

Uwe

3 REPLIES 3
Read only

Former Member
0 Likes
1,075

Hi,

See the example program below, you need to use <b>'LIST_TO_ASCI'</b> function module after List_from_memory.

DATA  BEGIN OF itab_list OCCURS 0.
        INCLUDE STRUCTURE abaplist.
DATA  END OF itab_list.

DATA: BEGIN OF vlist OCCURS 0,
        filler1(01)   TYPE c,
        field1(06)    TYPE c,
        filler(08)    TYPE c,
        field2(10)    TYPE c,
        filler3(01)   TYPE c,
        field3(10)    TYPE c,
        filler4(01)   TYPE c,
        field4(3)     TYPE c,
        filler5(02)   TYPE c,
        field5(15)    TYPE c,
        filler6(02)   TYPE c,
        field6(30)    TYPE c,
        filler7(43)   TYPE c,
        field7(10)    TYPE c,
      END OF vlist.

SUBMIT zreport EXPORTING LIST TO MEMORY.

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = itab_list
  EXCEPTIONS
    not_found  = 4
    OTHERS     = 8.

CALL FUNCTION 'LIST_TO_ASCI'
  EXPORTING
    list_index         = -1
  TABLES
    listasci           = vlist
    listobject         = itab_list
  EXCEPTIONS
    empty_list         = 1
    list_index_invalid = 2
    OTHERS             = 3.

IF sy-subrc NE '0'.
  WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
ENDIF.

Regards

Sudheer

Read only

Former Member
0 Likes
1,075

what is the subrc u r getting ?

regards

prabhu

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,076

Hello Tamilarasan

On our ECC 5.0 the default selection-screen setting for list output is ALV grid control. Perhaps this could be the problem.

Try to add the following parameters to your SUBMIT statement:

SUBMIT RFBILA00
...
WITH BILALIST = 'X'  " with classical list
WITH BILAGRID = ' '  " no ALV grid
WITH BILATREE = ' '  " no ALV tree
...

Regards

Uwe