Skip to Content
-2

Dynamic Transporting fields in Modify Internal table

Hi,

Need to modify an internal table by transporting many fields but in dynamic way. As of now it is working good for one field. When I tried with multiple fields it is throwing error.

Below code is working fine for one field.

DATA lv_fields TYPE string.
lv_fields = 'BSART'.
MODIFY lt_data FROM lw_data TRANSPORTING (lv_fields) WHERE ebeln = lw_temp-ebeln.

Below code is throwing error as two fields are used.

DATA lv_fields TYPE string.
lv_fields = 'BSART BSTYP'.
MODIFY lt_data FROM lw_data TRANSPORTING (lv_fields) WHERE ebeln = lw_temp-ebeln.

Please provide a suggestion to use dynamic transporting with multiple fields.

Thanks in advance.

Regards,

Senthil kumar K

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 30 at 06:42 AM
    DATA lv_field1 TYPE string.
    DATA lv_field2 TYPE string.
    lv_field1 = 'BSART'.
    lv_field2 = 'BSTYP'.
    MODIFY lt_data FROM lw_data TRANSPORTING (lv_field1) (lv_field2) WHERE ebeln = lw_temp-ebeln.
    Add comment
    10|10000 characters needed characters exceeded

  • Jan 30 at 06:48 AM
    -2

    What is the error.?

    Add comment
    10|10000 characters needed characters exceeded