2009 Jan 17 4:48 PM
Hi all,
I have table ZTAB1 with field name IDPAR value 'RSK1' an field FRPA vith value '10'.
how can I asign value 10 to structure ZREX-RSK1.
situation is tat field value of IDPAR will be name of structure field ZREX as I told.
2009 Jan 17 5:43 PM
Hi,
try like dis....
FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE OF ZREX, u201C Dynamic internal table name
<fs_dyntable> LIKE LINE OF ZREX, u201C Field symbol to create work area
<fs_fldval> type any. u201C Field symbol to assign values
LOOP AT it_ztab1 into wa_ztab1.
ASSIGN COMPONENT wa_ztab1-idpar
OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
<fs_fldval> = wa_ztab1-frpa.
ENDLOOP.
Append to the dynamic internal table
APPEND <fs_dyntable> TO <t_dyntable>. "the final work area with all the columns of ZREX with values
Hi all,
I have table ZTAB1 with field name IDPAR value 'RSK1' an field FRPA vith value '10'.
how can I asign value 10 to structure ZREX-RSK1.
situation is tat field value of IDPAR will be name of structure field ZREX as I told.
2009 Jan 17 5:43 PM
Hi,
try like dis....
FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE OF ZREX, u201C Dynamic internal table name
<fs_dyntable> LIKE LINE OF ZREX, u201C Field symbol to create work area
<fs_fldval> type any. u201C Field symbol to assign values
LOOP AT it_ztab1 into wa_ztab1.
ASSIGN COMPONENT wa_ztab1-idpar
OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
<fs_fldval> = wa_ztab1-frpa.
ENDLOOP.
Append to the dynamic internal table
APPEND <fs_dyntable> TO <t_dyntable>. "the final work area with all the columns of ZREX with values
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |