Skip to Content
-2

i'm getting an error in modify, please help - URGENT

FORM SAVE USING SVAR1 TYPE SY-UCOMM SVAR2 TYPE SLIS_SELFIELD.
CASE SY-UCOMM.
WHEN '&DATA_SAVE'.
LOOP AT IT_MERGE INTO WA_MERGE.
READ TABLE IT_TEMP INTO WA_TEMP INDEX SY-TABIX.
IF NOT WA_TEMP-MAKTX EQ WA_MERGE-MAKTX.
WA_MAKT-MAKTX = WA_MERGE-MAKTX.
MODIFY MAKT FROM WA_MAKT TRANSPORTING MAKTX INDEX SY-TABIX.
ENDIF.
CLEAR: WA_MERGE, WA_TEMP.
ENDLOOP.
ENDCASE.

ENDFORM.

this is my code.. i'am getting an error:-- "TRANSPORTING" is not valid here. '.' is expected.

please help

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Nov 07, 2019 at 07:53 AM

    Hi,

    TRANSPORTING is used when you modify internal tables, not database tables. Here is the syntax for database table MODIFY:

    https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/index.htm

    You are modifying a database table MAKT, hence syntax error.

    GK

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 07, 2019 at 09:33 AM

    As a general rule, you shouldn't directly update SAP-tables from Z-code but use SAP-provided routines instead. To update material-related data you can for example use the function module MATERIAL_MAINTAIN_DARK which works pretty well.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 07, 2019 at 07:58 AM

    Hello Prasad Supare,

    You cant modify Data base table using TRANSPORTING KEYWORD.

    Also Kindly use CODE option to paste code.

    Few examples for you to modify data base tables are given in the below link.

    MODIFY

    Regards!

    Add a comment
    10|10000 characters needed characters exceeded