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

Submit with EXPORTING LIST TO MEMORY

Former Member
0 Likes
1,311

Hi,

I am trying to run below statement in my code.

SUBMIT RKPEP003

WITH CN_PROJN IN s_PSPID

WITH R_BUDAT IN S_BUDAt

with P_DISVAR EQ P_DISVAR

EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = LISTOBJECT

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

When i am executing this statement, i am getting a report output of RKPEP003 and LISTOBJECT internal table is empty. Any one have idea why it is happening.

Thanks.

Hi,

I am trying to run below statement in my code.

SUBMIT RKPEP003

WITH CN_PROJN IN s_PSPID

WITH R_BUDAT IN S_BUDAt

with P_DISVAR EQ P_DISVAR

EXPORTING LIST TO MEMORY

AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = LISTOBJECT

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

When i am executing this statement, i am getting a report output of RKPEP003 and LISTOBJECT internal table is empty. Any one have idea why it is happening.

Thanks.

3 REPLIES 3
Read only

rahulkavuri
Active Contributor
0 Likes
687

Hi you can check this code... you should be definitely getting some values after u execute the standard program

Try to implement the code below... please award points if found helpful

submit rhrhaz00 exporting list to memory

and return

with pchplvar = pchplvar

with pchotype = pchotype

with pchobjid in pchobjid

with pchsobid in pchsobid

with pchseark = pchseark

with pchostat = pchostat

with pchistat = pchistat

with pchztr_d = pchztr_d

with pchztr_a = pchztr_a

with pchztr_z = pchztr_z

with pchztr_m = pchztr_m

with pchztr_p = pchztr_p

with pchztr_y = pchztr_y

with pchztr_f = pchztr_f

with pchobeg = pchobeg

with pchoend = pchoend

with info = info.

data: list like abaplist occurs 0 with header line.

data: txtlines(1024) type c occurs 0 with header line.

data: reportlines(1024) type c occurs 0 with header line.

clear list.

refresh list.

clear reportlines.

refresh reportlines.

call function 'LIST_FROM_MEMORY'

tables

listobject = list

exceptions

not_found = 1

others = 2.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call function 'LIST_TO_ASCI'

  • EXPORTING

  • LIST_INDEX = -1

  • WITH_LINE_BREAK = ' '

  • IMPORTING

  • LIST_STRING_ASCII =

  • LIST_DYN_ASCII =

tables

listasci = txtlines

listobject = list

exceptions

empty_list = 1

list_index_invalid = 2

others = 3

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

else.

reportlines[] = txtlines[].

call function 'LIST_FREE_MEMORY'.

endif.

Read only

Former Member
0 Likes
687

Refer the following programs:

report  z_82235_test1                           .

types: begin of tab1,
         a(1),
         b(1),
       end of tab1.

types: begin of tab2,
         c(1),
         d(1),
       end of tab2.

data: itab1 type table of tab1,
      wa1 like line of itab1,
      itab2 type table of tab2,
      wa2 like line of itab2.

wa1-a = '1'.
wa1-b = '2'.
append wa1 to itab1.
clear wa1.

wa1-a = '3'.
wa1-b = '4'.
append wa1 to itab1.
clear wa1.


export itab1 to memory id '001'.
export itab2 to memory id '002'.

submit z_82235_test2 and return exporting list to memory .


import itab1 from memory id '003'.
import itab2 from memory id '004'.

write:/ 'ITAB1'.
loop at itab1 into wa1.
write : / wa1-a, wa1-b.
clear: wa1.
endloop.

write:/ 'ITAB2'.
loop at itab2 into wa2.
write : / wa2-c, wa2-d.
clear: wa2.
endloop.

report  z_82235_test2                           .

types: begin of tab1,
         a(1),
         b(1),
       end of tab1.

types: begin of tab2,
         c(1),
         d(1),
       end of tab2.

data: itab1 type table of tab1,
      wa1 like line of itab1,
      itab2 type table of tab2,
      wa2 like line of itab2.

import itab1 from memory id '001'.
import itab2 from memory id '002'.

itab2[] = itab1[].

wa1-a = 'a'.
wa1-b = 'b'.
append wa1 to itab1.
clear wa1.




export itab1 to memory id '003'.
export itab2 to memory id '004'.

Read only

0 Likes
687

Thanks to all for your reply,

I found a solution for this ,

I have copy RKPEP003 to zRKPEP003

then i have copy FM PS05_PROJECT_LINE_ITEM to ZPS05_PROJECT_LINE_ITEM.

then i have copy FM K_LINE_ITEMS_SELECT_AND_LIST to ZK_LINE_ITEMS_SELECT_AND_LIST.

There is import parameter with name I_USE_GRID, which should be SPACE in FM K_LINE_ITEMS_SELECT_AND_LIST. so i called ZK_LINE_ITEMS_SELECT_AND_LIST with SPACE as import parameter, it solve my problem.