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 syntax

Former Member
0 Likes
644

Dear experts,

Hope you had a good weekend.

I'm trying to communicate two programs, in the sense, I'm calling an executable program from an other executable program using 'submit'.

Now my requirement is that, based on the return parameter of the called program the calling program has to behave differently.

So I thought of exporting a variable from the called program and importing the same variable in the calling program and based on that value, I can manipulate the logic.

My only requirement now is can any one provide me with the synatx on how to export a variable(data x type c) from the called program and import the same.

In short syntax for export and import to memory.

Thanks for all.

-Amit

1 ACCEPTED SOLUTION
Read only

venkat_o
Active Contributor
0 Likes
549

Hi Amith, <li>In the Called program EXPORT statement has to be used to send the variable value to ABAP memory.


EXPORT <field> TO MEMORY ID 'TOABAP'  "TOABAP is uniq memory id.
<li>In the Calling program IMPORT statement has to be used to to get the value from ABAP memory.
IMPORT <field> FROM MEMORY ID 'TOABAP'  "TOABAP is uniq memory id.
Thanks Venkat.O

3 REPLIES 3
Read only

former_member194416
Contributor
0 Likes
549

Same parameters must be defined in both program. Sytax will be like below.

Export <parameter> to memory id `XX`.

Import <parameter> from memory id `XX`.

Try to give a unique memory ID.

Edited by: Gungor Ozcelebi on Jun 29, 2009 3:32 PM

Read only

venkat_o
Active Contributor
0 Likes
550

Hi Amith, <li>In the Called program EXPORT statement has to be used to send the variable value to ABAP memory.


EXPORT <field> TO MEMORY ID 'TOABAP'  "TOABAP is uniq memory id.
<li>In the Calling program IMPORT statement has to be used to to get the value from ABAP memory.
IMPORT <field> FROM MEMORY ID 'TOABAP'  "TOABAP is uniq memory id.
Thanks Venkat.O

Read only

Former Member
0 Likes
549

Press F1 / Search the Google/SCN ..you get lot of posts on this.