Application Development 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: 

export value from routine and import value from print program -error

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Hi Friends,

I need to export the sy-burcvalue from routine(TCODE VOFM) and import to print program.

in routine i'm using the following code.

EXPORT SY-SUBRC TO MEMORY ID 'ZMEM'.

in print program i'm using the following code.

IMPORT sy-subrc FROM MEMORY ID 'ZMEM'.

but it's not norking. is there any other solution.

Thanks in Advance.

vallamuthu.m

5 REPLIES 5

Former Member

Former Member
0 Kudos

Hi

Try to move the sy-subrc value to some local variable lv_subrc and then export to memory Id.

And at the time of importing it import it in the another local variable of type sy-subrc.

Best Regards,

Nikhil Patil

0 Kudos

Hi Nikhil,

It's not working.

Thanks & Regards,

Vallamuthu.M

kesavadas_thekkillath
Active Contributor
0 Kudos

You are using the old syntax of export / import. Make note that both the variables must be of same name and type.

vallamuthu_madheswaran2
Active Contributor
0 Kudos

I've created one ztable and pass the sy-subrc value and check the sy-subrc value in print program.