2022 Jul 28 7:53 AM
Hi experts,
I am trying to loop over field symbol but unable to understand how to do it.
I am taking table name dynamically, so I do not know the structure of the table.
Below is my code.
CREATE DATA LR_TABLE TYPE TABLE OF (TABLE_NAME).
ASSIGN LR_TABLE->* TO <FT_REC>.
SELECT (FIELD)
INTO CORRESPONDING FIELDS OF TABLE <FT_REC>
FROM (TABLE_NAME)
UP TO 10 ROWS
ORDER BY PRIMARY KEY.
I want to take each field from each row and export it into a structure. Is there any better way to do it ?
Hi experts,
I am trying to loop over field symbol but unable to understand how to do it.
I am taking table name dynamically, so I do not know the structure of the table.
Below is my code.
CREATE DATA LR_TABLE TYPE TABLE OF (TABLE_NAME).
ASSIGN LR_TABLE->* TO <FT_REC>.
SELECT (FIELD)
INTO CORRESPONDING FIELDS OF TABLE <FT_REC>
FROM (TABLE_NAME)
UP TO 10 ROWS
ORDER BY PRIMARY KEY.
I want to take each field from each row and export it into a structure. Is there any better way to do it ?
2022 Jul 28 12:19 PM
Search forum or ABAP documentation:
ASSIGN COMPONENT 'COMPNAME' OF STRUCTURE <STRUCTURE> TO <FIELD>.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |