Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

1 ACCEPTED SOLUTION

GK817
Active Contributor

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

5 REPLIES 5

FredericGirod
Active Contributor

please use the "Code" button and do not use this kind of subject

GK817
Active Contributor

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

former_member1716
Active Contributor

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!

BaerbelWinkler
Active Contributor

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.

Sandra_Rossi
Active Contributor
0 Kudos

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