Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic assignment

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.

Tags:
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question