can u save internal table in sap memory from abap memory?

Answer Posted / shankar

If you want save ITAB in sap memory then you have to use
IMPORT nad EXPORT statements

The followin exapmles will explain how it will works
Here i created two report progrmas

1==> ZSHAN_EXPORT_ITAB ---> TO EXPORT THE ITAB INTO SAP
MEMORY

2==> ZSHAN_IMPORT_ITAB ---> TO IMPORT THE ITAB FROM SAP
MEMORY

---------------------------------------------

REPORT ZSHAN_EXPORT_ITAB.


DATA TEXT1(10) VALUE 'Exporting'.

DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.

DO 5 TIMES.
ITAB-BOOKID = 100 + SY-INDEX.
APPEND ITAB.
ENDDO.

EXPORT TEXT1 TEXT2 FROM 'Literal' TO MEMORY ID 'text'.

EXPORT ITAB TO MEMORY ID 'table'.

--------------------------------------------------------

===========================================================

--------------------------------------------------------
REPORT ZSHAN_IMPORT_ITAB.

DATA: TEXT1(10),
TEXT3 LIKE TEXT1 VALUE 'Initial'.

DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.

SUBMIT ZSHAN_EXPORT_ITAB AND RETURN.

IMPORT TEXT3 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT3.

IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT1.

IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.

LOOP AT JTAB.
WRITE / JTAB-BOOKID.
ENDLOOP.
-----------------------------------------------------


I hope this information will help full.......

Is This Answer Correct ?    22 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Module Pool Programming: Events and Table Control handling.

846


What are the functional areas, user groups? How does abap query work in relation to these?

589


Explain the session method? : abap bdc

621


What are the data types of the external layer? : abap data dictionary

790


What is dynpro? what are its components ?

616






in bdc session method. if u run the record in fore ground manually i have a 7 records but at the time of record processing first record produces the error how can u process records manually in fore ground please tell me any one knows?

1741


Define structure in abap data dictionary?

611


What is the definition of modification in an sap system and how do they impact an upgrade?

535


What is For-period and In-period

1732


Explain the difference between function group and function module?

562


Lock objects and what are parameters of ENQUEUE FM?

1243


Why we are using Macros instead of Function Modules

1617


What are system fields for secondary lists?

605


What is the use of at new statement ?

1354


How can we send data to external programs?

615