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

debug memory id..

Former Member
0 Likes
808

hi,

i am using export to memory and import from memory in my program. but the value is not set properly and i want to debug and check the value of the id in debugging mode .. how to do that ??

my code

FREE MEMORY ID 'ZXXX'.

EXPORT 'X' TO MEMORY ID 'ZXXX'.

LEAVE TO SCREEN '0100'.

in screen 100's PBO i check the value

IMPORT ZCC FROM MEMORY ID 'ZXXX'.

IF NOT ZCC IS INITIAL.

IF ZCC = 'X'.

MESSAGE ................

ENDIF.

ENDIF.

But the value in ZCC is blank !!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
582

this is how SAP Memory id operations works

What ever parameter you export , you have to use the same name and type in import.

so correction to your code will be....

declare the same variable in the exporting side. and pass value to it and export it to memory id.

data: zcc type c.

ZCC = 'X'.

EXPORT zcc TO MEMORY ID 'ZXXX'.
LEAVE TO SCREEN '0100'.
"in PBO the same variable you import.
in screen 100's PBO i check the value

IMPORT ZCC FROM MEMORY ID 'ZXXX'.

but i dont see any reason with the exports and imports in this case, this can be avoided using a global variable. using global variable will avoid the usage of Memory operations.

1 REPLY 1
Read only

Former Member
0 Likes
583

this is how SAP Memory id operations works

What ever parameter you export , you have to use the same name and type in import.

so correction to your code will be....

declare the same variable in the exporting side. and pass value to it and export it to memory id.

data: zcc type c.

ZCC = 'X'.

EXPORT zcc TO MEMORY ID 'ZXXX'.
LEAVE TO SCREEN '0100'.
"in PBO the same variable you import.
in screen 100's PBO i check the value

IMPORT ZCC FROM MEMORY ID 'ZXXX'.

but i dont see any reason with the exports and imports in this case, this can be avoided using a global variable. using global variable will avoid the usage of Memory operations.