Application Development 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: 

Submit with EXPORTING LIST TO MEMORY

Former Member
0 Kudos
229

Hi All,

I am trying to run the below code:

DATA list_tab TYPE TABLE OF abaplist.

SUBMIT sdnetpr0 EXPORTING LIST TO MEMORY AND RETURN

WITH p_vkorg = g_wa_zmtdsorgnam-vkorg

WITH p_vtweg = g_wa_zmtdsorgnam-vtweg

WITH p_spart = g_wa_zmtdsorgnam-spart_ord

WITH p_kunnr = g_wa_knvp-kunn2

WITH p_werks = g_wa_marc-werks

WITH s_matnr = g_wa_marc-matnr

WITH p_psimu = c_x.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = list_tab

EXCEPTIONS

not_found = 1

OTHERS = 2.

When I am executing the program, I am getting a report output of sdnetpr0 and list_tab internal table is empty.

Please guide me, why the list is being displayed even though I had given AND RETURN and also the internal table is not being filled?

Thanks in advance.

Satish

4 REPLIES 4

Former Member
0 Kudos
44

Hi,

Check the program if the data is maintained for the select options that u are passing...

0 Kudos
44

Hi Sourabh,

Thanks for reply. I am getting the list output for the select options passed but the internal table is not being filled.

Satish

naimesh_patel
Active Contributor
0 Kudos
44

Your submitted program in not generating any spool becuase you are passing wrong material number.

You need to pass the material number as the range because the report SDNETPR0 has a select option for the material.

RANGE: R_MATNR FOR MARA-MATNR.

R_MATNR-SIGN = 'I'.
R_MATNR-OPTIONS = 'EQ'.
R_MATNR-LOW = g_wa_marc-matnr .
APPEND R_MATNR.
CLEAR  R_MATNR

SUBMIT sdnetpr0 EXPORTING LIST TO MEMORY AND RETURN
WITH p_vkorg = g_wa_zmtdsorgnam-vkorg
WITH p_vtweg = g_wa_zmtdsorgnam-vtweg
WITH p_spart = g_wa_zmtdsorgnam-spart_ord
WITH p_kunnr = g_wa_knvp-kunn2
WITH p_werks = g_wa_marc-werks
WITH s_matnr IN R_MATNR  " << Range instead of g_wa_marc-matnr 
WITH p_psimu = c_x.

Regards,

Naimesh Patel

0 Kudos
44

Hi Naimesh,

Thanks for the reply.

The data being passed is correct and I am getting the list output for those criteria. But actually if we use EXPORTING LIST TO MEMORY, the called program list output had to be passed to the ABAP memory and also if we use AND RETURN, the control should return to the calling program without displaying the called program list output.

But in my case, this is not happening. The called program list output is being displayed as well as the internal table used to retrieve the data stored in the ABAP memory is not being filled, even though there is list output (which means data exists fro the criteria).

Satish