09-19-2008 1:13 PM
I have 10 internal tables. I want to assign a value of 'X' to every field in the tables. (these are BAPI 'X' tables indicating the fields need to be updated. I want to update all fields so I want to set all fields to 'X'.
how can I do this dynamically.
09-19-2008 1:36 PM
Hi,
Try this.
DATA s_bapi_marax TYPE bapi_marax.
FIELD-SYMBOLS: <fs> TYPE ANY.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE s_bapi_marax TO <fs>.
IF sy-subrc EQ 0.
MOVE 'X' TO <fs>.
ELSE.
EXIT.
ENDIF.
ENDDO.
09-19-2008 1:36 PM
Hi,
Try this.
DATA s_bapi_marax TYPE bapi_marax.
FIELD-SYMBOLS: <fs> TYPE ANY.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE s_bapi_marax TO <fs>.
IF sy-subrc EQ 0.
MOVE 'X' TO <fs>.
ELSE.
EXIT.
ENDIF.
ENDDO.