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

How the Sy-Mandt value gets updated in the table and Is this having any foreign key relationship.

1708


What is buffering in abap?

639


Explain the difference between domain and data element?

581


Can you create an internal table dynamically?(at run time)

1433


What is a subscreen? How can we use a subscreen?

566






What are the types of parameters in the function modules?

667


What is generic buffering?

865


What are the different types of views and their definition?

594


What are the differences between macro and subroutine?

620


What is sap luw or update transaction?

612


Explain what is a foreign key relationship? Explain this with the help of an example.

570


What happens if we use leave to list-processing without using suppress-dialog?

696


How the at-user command serves mainly in lists?

620


Where can you find error log for call transaction? : abap bdc

729


Explain the difference between domain and data element? What are aggregate object?

567