Application Development 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: 

Import Value to a Temp. Variable

Former Member
0 Kudos

Hi Experts,

I am want to Import a value to a temp. variable.

Is this possible with

IMPORT Ztable-field1 FROM MEMORY ID 'id1'.

I want to directly import the value to temp. varibale in the import statement it slef.

The other way

temp_var = ztable-field1, after import statement is working for me.

Please Advice.

Thanks in Advance,

Irfan Hussain

2 REPLIES 2

Former Member
0 Kudos

Irfan,

The name of the variable exported should the same name you are importing. So if you have exported a TEMP variable then you can import the same.

Otherwise, reassign like that way you are doing.

Regards,

Ravi

Note : Please mark the helpful answers

former_member181962
Active Contributor
0 Kudos

Import two fields and an internal table from the application buffer with the structure INDX:

TYPES: BEGIN OF ITAB3_LINE,

CONT(4),

END OF ITAB3_LINE.

DATA: INDXKEY LIKE INDX-SRTFD VALUE 'KEYVALUE',

F1(4),

F2(8) TYPE P DECIMALS 0,

ITAB3 TYPE STANDARD TABLE OF ITAB3_LINE,

INDX_WA TYPE INDX.

  • Import data.

IMPORT F1 = F1 F2 = F2 ITAB3 = ITAB3

FROM SHARED BUFFER INDX(ST) ID INDXKEY TO INDX_WA.

  • After import, the data fields INDX-AEDAT and

  • INDX-USERA in front of CLUSTR are filled with

  • the values in the fields before the EXPORT

  • statement.