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 in BADI

Former Member
0 Likes
1,544

Hi all,

I have made an implementation of MB_DOCUMENT_BADI for MB1B and have to submit the data of this BADI to a Z prog using JOB_SUBMIT.

this Badi has an internal table XMSEG , I am not able to pass the values of this itab to the Z prog

EXPORT xmseg = GT_MSEG to memory id 'ZMSEG' .

import xmseg = GT_MSEG from memory id 'ZMSEG'.

But I am getting sy-subrc fail .

Please help .

Thanks

Supriya

Hi all,

I have made an implementation of MB_DOCUMENT_BADI for MB1B and have to submit the data of this BADI to a Z prog using JOB_SUBMIT.

this Badi has an internal table XMSEG , I am not able to pass the values of this itab to the Z prog

EXPORT xmseg = GT_MSEG to memory id 'ZMSEG' .

import xmseg = GT_MSEG from memory id 'ZMSEG'.

But I am getting sy-subrc fail .

Please help .

Thanks

Supriya

6 REPLIES 6
Read only

Former Member
0 Likes
963

Hi,

Try like below:


itab[] = GT_MSEG []
EXPORT (itab)     TO MEMORY ID id

Regards,

Himanshu

Read only

0 Likes
963

Hi ,

While doing EXPORT it is giving sy-subrc 0 , while import it is 4

Your inputs required

Read only

0 Likes
963

Hi,

Try

IMPORT GT_MSEG from memory ID id.

It could be becuse you are using 'equal to' to a importing parameter in the BADI.

Regards,

Himanshu

Read only

0 Likes
963

hai supriya

when exporting if it is giving sy-subrc 0 means it is exportign properly

and while imporitng if it is sy-subrc = 4 then the statement u have used is in correct

just check once the statement

m.a

Read only

0 Likes
963

Hi all

my query has been solved .

Instead of passing the internal table, i created a variant of the Z program programattically and passed my document no to the Z program .

Thank you for all your help .

Read only

Former Member
0 Likes
963

hai supriya ,

instead use

set paramter statement

did u check wether ur code do not give any syntax error

m.a