2007 Mar 14 1:15 PM
I have export an internal table to abap memory in a function with
export text_data to memory id 'TEXT'.
but i can´t recover it in a badi because i obtein an error for using this sentence in a method
IMPORT text_data FROM MEMORY ID 'TEXT'.
How can i change this sentence or make something to obtein this information?
Thanks in advance
Regards
2007 Mar 14 1:18 PM
Hello Carl
The syntax check within classes is more strict than in normal reports. Thus, modify your statement as following:
IMPORT text INTO text_data FROM MEMORY ID 'TEXT'.Correspondingly, the EXPORT statement should be like this:
EXPORT text FROM text_data TO MEMORY ID 'TEXT'.Regards
Uwe
I have export an internal table to abap memory in a function with
export text_data to memory id 'TEXT'.
but i can´t recover it in a badi because i obtein an error for using this sentence in a method
IMPORT text_data FROM MEMORY ID 'TEXT'.
How can i change this sentence or make something to obtein this information?
Thanks in advance
Regards
2007 Mar 14 1:17 PM
Hello,
Import
TYPES: BEGIN OF OBJ_LINE,
CLUSTERNAME(30),
PROGRAMNAME(10),
END OF OBJ_LINE,
BEGIN OF B_LINE,
FIELD_1 TYPE I,
FIELD_2(1) TYPE N,
END OF B_LINE.
DATA: OBJ_TAB TYPE STANDARD TABLE OF OBJ_LINE,
OBJ_WA TYPE OBJ_LINE,
B_PROG TYPE STANDARD TABLE OF B_LINE,
B_WA TYPE B_LINE,
A(10),
C_PROG LIKE SYST.
MOVE: 'A' TO OBJ_WA-CLUSTERNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'B' TO OBJ_WA-CLUSTERNAME,
'B_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'C' TO OBJ_WA-CLUSTERNAME,
'C_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
IMPORT (OBJ_TAB) FROM MEMORY ID 'ABCD'.
export
TYPES: BEGIN OF OBJ_LINE,
CLUSTERNAME(30),
PROGRAMNAME(10),
END OF OBJ_LINE.
DATA: OBJ_TAB TYPE STANDARD TABLE OF OBJ_LINE,
OBJ_WA TYPE OBJ_LINE.
TYPES: BEGIN OF B_LINE,
FIELD_1 TYPE I,
FIELD_2(1) TYPE N,
END OF B_LINE.
DATA: B_PROG TYPE STANDARD TABLE OF B_LINE.
DATA: A(10),
C_PROG LIKE SYST.
MOVE: 'A' TO OBJ_WA-CLUSTERNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'B' TO OBJ_WA-CLUSTERNAME,
'B_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
MOVE: 'C' TO OBJ_WA-CLUSTERNAME,
'C_PROG' TO OBJ_WA-PROGRAMNAME.
APPEND OBJ_WA TO OBJ_TAB. CLEAR OBJ_WA.
EXPORT (OBJ_TAB) TO MEMORY ID 'ABCD'.
2007 Mar 14 1:18 PM
Hello Carl
The syntax check within classes is more strict than in normal reports. Thus, modify your statement as following:
IMPORT text INTO text_data FROM MEMORY ID 'TEXT'.Correspondingly, the EXPORT statement should be like this:
EXPORT text FROM text_data TO MEMORY ID 'TEXT'.Regards
Uwe
2007 Mar 14 1:19 PM
Hi,
May be the Import and Export commands doesn't work in BADI's i.e too exporting and importing the Internal table.
Better use the Paramters/attributes data that is linked with the methods for the data fetching instead of internal table export/import.
reward if useful.
Regards,
Anji
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |