2022 Jul 04 8:14 AM
Hi experts,
I am new to ABAP programming and want to understand about export parameter.
I am querying a table and trying to output it to export parameter.
The export parameter is a structure which has one component of table type.
Read some articles which mentions use of append for output but they were basically for output tables.
I am trying to select data from any table
SELECT (FIELDS)
INTO CORRESPONDING FIELDS OF TABLE <RECORDS>
FROM (TABLES)
UP TO <ROWS> ROWS
WHERE (WHERECOND)
ORDER BY PRIMARY KEY.
I want to output this result in export which is a structure
Tried to search but did not find anything helpful online. Any help is appreciated.
Hi experts,
I am new to ABAP programming and want to understand about export parameter.
I am querying a table and trying to output it to export parameter.
The export parameter is a structure which has one component of table type.
Read some articles which mentions use of append for output but they were basically for output tables.
I am trying to select data from any table
SELECT (FIELDS)
INTO CORRESPONDING FIELDS OF TABLE <RECORDS>
FROM (TABLES)
UP TO <ROWS> ROWS
WHERE (WHERECOND)
ORDER BY PRIMARY KEY.
I want to output this result in export which is a structure
Tried to search but did not find anything helpful online. Any help is appreciated.
2022 Jul 04 8:42 AM
Could you explain the context ? What did you try to do ? What is your export method ? Class / Odata / RFC / .....
Could you post your SELECT statement?
2022 Jul 04 10:54 AM
I don't understand why you say it's an issue with "export parameter", it seems to me that it's an issue about how to fill a table type component.
structure-table_type_component = VALUE #( ( comp1 = 'line1 comp1' ) ( comp1 = 'line2 comp1' ) ). Please clarify your question.
2022 Jul 25 6:43 AM
Hi gianni.aiello
I assume you are trying to export the result data records to a memory variable. If that is so, here is the way.
DATA export_data type standard table of mast,
import_data type standard table of mast.
SELECT matnr , werks, stlnr
INTO CORRESPONDING FIELDS OF TABLE export_data
FROM mast
UP TO 5 ROWS.
To Export to memory
EXPORT export_data TO MEMORY ID 'CTAB'.
To Import back in another program
IMPORT export_data TO import_data FROM MEMORY ID 'CTAB'.
Regards,
Venkat
2022 Jul 26 8:17 PM
2022 Jul 27 8:47 AM
Thank you venkateswaran.k
I have not tried this code yet.
I am not trying to pass data from one FM to another but trying to export data such that it can be used by any calling program and not necessarily another FM.
2022 Jul 27 9:10 AM
Yes, the code I have written is of same scenario.
I was export that into a memory variable in one called program, and retrieve the same back in a another program that called the previous program.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |