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

IMPORT / EXPORT

former_member188001
Active Participant
0 Likes
691

Hi,

I have a requirement wherein i have copied standard SAP Program PPIO_ENTRY into Z program.

Now the requirement is, I have to add two fields on the selection screen.

1) s_matkl FOR mara-matkl,

2) s_erdat FOR caufvd-erdat.

The program is calling FM : COIS_SELECT_ORDERS_READ.

These two fields are not visible in this function module. I have created an enhancement implementation in this function module and I want to filter records based on the values entered in the above 2 select options.

I went through your post of EXPORT/IMPORT. But when i check in debuggin, i dont find the values. could you please help me out.

The export statements used are in the include for Start of Selection:

EXPORT s_matkl TO MEMORY ID 'MATKL'.

EXPORT s_erdat TO MEMORY ID 'ERDAT'.

Now, the import statement called in the function module is :

Data : lt_matkl TYPE STANDARD TABLE OF matkl_ran,

lt_erdat TYPE STANDARD TABLE OF WTYSC_WWB_S_ERDAT.

IMPORT lt_matkl FROM MEMORY ID 'MATKL' .

IMPORT lt_erdat FROM MEMORY ID 'ERDAT' .

The table lt_matkl and lt_erdat is still empty.

Could you please let me know the mistake i am doing here.

Thanks for your help.

Regards,

Salil

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
565

change the import to same name ie

Data : s_matkl TYPE STANDARD TABLE OF matkl_ran,

s_erdat TYPE STANDARD TABLE OF WTYSC_WWB_S_ERDAT.

IMPORT s_matkl FROM MEMORY ID 'MATKL' .

IMPORT s_erdat FROM MEMORY ID 'ERDAT' .

Arya

3 REPLIES 3
Read only

Former Member
0 Likes
566

change the import to same name ie

Data : s_matkl TYPE STANDARD TABLE OF matkl_ran,

s_erdat TYPE STANDARD TABLE OF WTYSC_WWB_S_ERDAT.

IMPORT s_matkl FROM MEMORY ID 'MATKL' .

IMPORT s_erdat FROM MEMORY ID 'ERDAT' .

Arya

Read only

0 Likes
565

Thanks Arya.

My problem got solved.

Read only

Former Member
0 Likes
565

I think you are importing the table header not the contents. Try:

EXPORT s_matkl[] TO MEMORY ID 'MATKL'.

EXPORT s_erdat[] TO MEMORY ID 'ERDAT'.

and

IMPORT lt_matkl[] FROM MEMORY ID 'MATKL' .

IMPORT lt_erdat[] FROM MEMORY ID 'ERDAT' .

Rob