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

EXPORT in BAdI

Former Member
0 Likes
648

Hi Friends,

I face a syntax problem when I use EXPORT <itab> TO MEMORY ID 'MID'. I use this statement inside a BADI implementation. It gives message that I can not use the syntax as mentioned above. Can any one give the exact syntax for EXPORT inside OO code environment.

Thanks

Hari

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
568

Hi,

Check this..This is working fine for me..

EXPORT V_RETURN FROM V_RETURN TO MEMORY ID 'TEST'.

FROM addition is a must..If you use FROM it is working fine..

Thanks,

Naren

Hi Friends,

I face a syntax problem when I use EXPORT <itab> TO MEMORY ID 'MID'. I use this statement inside a BADI implementation. It gives message that I can not use the syntax as mentioned above. Can any one give the exact syntax for EXPORT inside OO code environment.

Thanks

Hari

4 REPLIES 4
Read only

Former Member
0 Likes
569

Hi,

Check this..This is working fine for me..

EXPORT V_RETURN FROM V_RETURN TO MEMORY ID 'TEST'.

FROM addition is a must..If you use FROM it is working fine..

Thanks,

Naren

Read only

Former Member
0 Likes
568

hi please check the below sample code.

TABLES:INDX,MARA.

PARAMETERS : P_MATNR LIKE MARA-MATNR.

TYPES : BEGIN OF TAB,

MATNR LIKE MARC-MATNR,

WERKS LIKE MARC-WERKS,

DISLS LIKE MARC-DISLS,

END OF TAB.

DATA: ITAB TYPE TAB OCCURS 1000 WITH HEADER LINE.

DATA: W_JOBNAME LIKE TBTCJOB-JOBNAME VALUE 'ZTEST',

W_JOBCOUNT LIKE TBTCJOB-JOBCOUNT.

DATA: BEGIN OF INDXKEY,

PROGID LIKE SY-REPID,

END OF INDXKEY.

INDXKEY-PROGID = 'ZFGS0001'.

INDX-AEDAT = SY-DATUM.

SELECT MATNR WERKS DISLS INTO CORRESPONDING FIELDS OF TABLE ITAB FROM MARC.

DELETE FROM DATABASE INDX(ZF) ID INDXKEY.

EXPORT ITAB TO DATABASE INDX(ZF) ID INDXKEY.

jaffer vali shaik

Read only

0 Likes
568

In the OO Context, Pl follow Naren's suggestion ie use EXPORT <itab> from <iatb> to MEMORY id 'MID'.

~Suresh

Read only

Former Member
0 Likes
568

Hi Hari,

The error is <> ( Brackets ).

Use this statement :

<b>EXPORT (itab) TO MEMORY ID 'MID'.</b>

Best regards,

Prashant

PS : Please mark helpful answers and close the thread if the problem is solved