cancel
Showing results for 
Search instead for 
Did you mean: 

Import from memory from BADI

Former Member
0 Kudos

Hi all,

I have to export a value from a BADI to a Z program.

In the Z program, it is found that the system code returns 4 and the value is not passed.

In BADI:

Data ans type c.

EXPORT ans = ans TO MEMORY ID 'ANS'.

In Z program:

Data ans type c.

IMPORT ans = ans FROM MEMORY ID 'ANS'.

Any advice? Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Depending on ur requirement, you can create custom Parameter IDs too!! pl. check TPARA table.

thanq

Former Member
0 Kudos

Hi,

check out the purpose & how to use import export in below link wiki written by me.

https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/passing%2bdata%2bfrom%2bone%2babap%2bprogram...

Thanks,

Krishna

venkat_o
Active Contributor
0 Kudos

Hi Macy Lo, IMPORT and EXPORT statements are used to use ABAP memory. The data in the ABAP memory is available to all programs within a call sequence. If those two are executed independently, You should not use above statements. You have to use SET/GET parameters. Thanks Venkat