‎2009 Mar 09 2:38 AM
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.
‎2009 Mar 09 2:56 AM
‎2009 Mar 09 2:56 AM
‎2009 Mar 09 3:11 AM
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,
‎2009 Mar 09 3:14 AM
I hope you are using FREE MEMORY ID after importing the centent.
thanq
‎2009 Mar 09 5:14 AM
Hi,
Could you please explain the need of freeing the memory id after the import.If not what are the consequences.
Thanks,
‎2009 Mar 10 2:33 AM
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..
‎2009 Mar 09 3:20 AM
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]
‎2009 Mar 09 4:53 AM
Hi ,
useful link..
http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb3bc4358411d1829f0000e829fbfe/content.htm
Regards,
Mdi.Deeba