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

Memory ID

Former Member
0 Likes
948

Hi,



REPORT  ZPAD.
types:begin of imakt,
      matnr type makt-matnr,
      spras type makt-spras,
      maktx type makt-maktx,
      mkatg type makt-maktg,
      end of imakt.
data:itmakt type imakt occurs 0 with header line.
data:wa_itmakt type imakt occurs 0 with header line.

IMPORT itmakt to itmakt from memory ID 'KK'.
IF SY-SUBRC = 4.
WRITE:/ 'NOTHING'.
ENDIF.

SELECT MATNR
       SPRAS
       MAKTX
       MAKTG
       FROM MAKT INTO TABLE ITMAKT
       WHERE SPRAS = 'EN'.
EXPORT ITMAKT FROM ITMAKT TO MEMORY ID 'KK'.
IF SY-SUBRC = 0.
WRITE:/ 'EVERYTHING'.
ENDIF.

1.Will we able to see the data in MEMORY ID while debugging ?

2.Memory ID is holding the data even after I complete the execution ie unless I completely come close the session and execute the program in a new session.

Nice if anyone here can throw somelight on how this Memory ID behaves when we use along with a BAPI.ie

Import itmakt to itmakt from memory id 'KK'

IF SY-SUBRC = 0.

ENDIF.

CALL BAPI TO CREATE A PR

if sy-subrc = 0.

export itmakt from itmakt to memory id 'KK'

ENDIF.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
880

1. No you cant see while debugging.

2. ABAP memory for internal sessions only, you cant use in new session.

Please check this [link>>>|;

Regards,

~Satya

7 REPLIES 7
Read only

Former Member
0 Likes
881

1. No you cant see while debugging.

2. ABAP memory for internal sessions only, you cant use in new session.

Please check this [link>>>|;

Regards,

~Satya

Read only

0 Likes
880

Satya,

Thanks.

But I want to know the implications of using both IMPORT and EXPORT in the same program while we are using a BAPI to create a PR/PO.

I mean in my program

import pr num using memory id

if prnum is initial

call bapi to create a pr

export pr num using memory id

else.

call bapi to change the pr

export pr num using memory id (to add the items to existing PR)

endif.

Sometimes it is creating the one PR with all the items,sometimes it is creating a new PR for every item.

Thanks,

Read only

0 Likes
880

I hope you are using FREE MEMORY ID after importing the centent.

thanq

Read only

0 Likes
880

Hi,

Could you please explain the need of freeing the memory id after the import.If not what are the consequences.

Thanks,

Read only

0 Likes
880

if you donot free the memory space on your id or for your session would reduce as data gets accumulated.... so its always a good practice to clear the memory...

Basis will clear the temp periodically.. but as a good programmer you hold the responsibility as well..

Read only

former_member156446
Active Contributor
0 Likes
880

Hi K

Please search in forum or on Net for SAP memory and ABAP memory..concept would be clear then...

[Check this >>>>|http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm]

Read only

Former Member