Skip to Content
avatar image
Former Member

Write into specific position of structure

Dear all,

This is my structure

BEGIN OF ty_data,
     kunnr TYPE kunnr,
     vsbed TYPE vsbed,
     pltyp TYPE pltyp,
     matnr TYPE matnr,
     maktx TYPE maktx,
     condt1 TYPE kscha,
     condt2 TYPE kscha,
     condt3 TYPE kscha,
     condt4 TYPE kscha,
     condt5 TYPE kscha,
END OF ty_data.
DATA: it_data TYPE TABLE OF ty_data, wa_data TYPE ty_data.

I want to assign a value to on of the condtX, but I only know which one when I get the number from another table.

READ TABLE ZSDSLS035 INTO wa_ZSDSLS035 WITH KEY cond = wa_orderconditionex-cond_type.
CONCATENATE 'condt' wa_ZSDSLS035-coluna INTO lv_col.
CONDENSE lv_col.

So my lv_col is for example condt4.

How can I assign a value to the wa_data-condt4 using the lv_col ?


Thank you very much

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers