11-07-2019 7:46 AM
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
11-07-2019 7: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
11-07-2019 7:51 AM
11-07-2019 7: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
11-07-2019 7: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.
Regards!
11-07-2019 9: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.
11-07-2019 9:47 AM
No need to say it's urgent, because it's assumed that it's urgent for everybody and people won't process your question more urgently than others