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 statement in ABAP-Ecc version

Former Member
0 Likes
5,962

I used EXPORT FLAG TO MEMORY ID 'MB51_FLAG'. in Ecc version.

when i do EPC check, i am getting error in Obsolete statments like..

EXPORT var_1 ... var_n TO MEMORY ... is not supported in the OO context. Use

EXPORT name_1 from var_1 ... name_n from var_n TO MEMORY ... instead . . . .

Can anyone tell me how to implement it Plz ...?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,418

Hi,

Instead of this:


EXPORT FLAG TO MEMORY ID 'MB51_FLAG'. 

Use the very similar syntax:


EXPORT name1 = FLAG TO MEMORY ID 'MB51_FLAG'. 

OR


EXPORT name1 FROM FLAG TO MEMORY ID 'MB51_FLAG'. 

Then when you need to do the corresponding IMPORT you use the same syntax. Here's one simple example to demonstrate:


REPORT  ztest_jrg.

TYPES: ty_ctype TYPE c LENGTH 20.

DATA: l_test TYPE ty_ctype.

PARAMETERS: p_test TYPE ty_ctype.

EXPORT ptst = p_test TO MEMORY ID 'ZTEST'.

IMPORT ptst = l_test FROM MEMORY ID 'ZTEST'.

WRITE: /1 l_test.

Best Regards,

Jamie

4 REPLIES 4
Read only

Former Member
0 Likes
3,419

Hi,

Instead of this:


EXPORT FLAG TO MEMORY ID 'MB51_FLAG'. 

Use the very similar syntax:


EXPORT name1 = FLAG TO MEMORY ID 'MB51_FLAG'. 

OR


EXPORT name1 FROM FLAG TO MEMORY ID 'MB51_FLAG'. 

Then when you need to do the corresponding IMPORT you use the same syntax. Here's one simple example to demonstrate:


REPORT  ztest_jrg.

TYPES: ty_ctype TYPE c LENGTH 20.

DATA: l_test TYPE ty_ctype.

PARAMETERS: p_test TYPE ty_ctype.

EXPORT ptst = p_test TO MEMORY ID 'ZTEST'.

IMPORT ptst = l_test FROM MEMORY ID 'ZTEST'.

WRITE: /1 l_test.

Best Regards,

Jamie

Read only

0 Likes
3,418

i am passing EXPORT FLAG to Standard transaction MB51.

In my program i changed

EXPORT flag TO MEMORY ID 'MB51_FLAG'.

To

EXPORT name1 = FLAG TO MEMORY ID 'MB51_FLAG'.

But i am not getting proper output since i could not change the IMPORT Statement in standard program as how u mentioned, how to solve this? Plz help me.

Read only

0 Likes
3,418

Hi,

If you change your EXPORT statement to the following, then you will not get the Extended Program Check "Obsolete Statement" error, and the IMPORT statement will get the correct exported value in the FLAG field.


EXPORT flag = flag TO MEMORY ID 'MB51_FLAG'.

When I did this in my test program there were no syntax errors nor any Extended Program Check "Obsolete Statement" errors. I changed my IMPORT statement to simulate the use of the obsolete syntax and it still imported the exported value (as expected).

Regards,

Jamie

Read only

0 Likes
3,418

Hi,

Thanku for ur reply.

It is working fine now.

I reward u full points.