Application Development and Automation 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: 
Read only

update syntax in abap

Former Member
0 Likes
1,629

Hi ,

I would like to update a record in a table...

Please help me.

3 REPLIES 3
Read only

Former Member
0 Likes
579

Hi

Which table? Intenal or dictionary table?

- Internal table

LOOP AT ITAB.

MODIFY ITAB.

ENDLOOP.

- Dictionary

SELECT * FROM <TABLE>.

MODIFY <TABLE>.

ENDSELECT.

Max

Read only

Former Member
0 Likes
579
CHK THIS FROM sap HELP


PARAMETERS p_carrid TYPE scarr-carrid. 

DATA scarr_tab TYPE SORTED TABLE OF scarr 
               WITH UNIQUE KEY carrid. 

DATA: idx TYPE sy-tabix, 
      scarr_wa TYPE scarr. 

SELECT * 
       FROM scarr 
       INTO TABLE scarr_tab. 

READ TABLE scarr_tab 
     WITH TABLE KEY carrid   = p_carrid 
     TRANSPORTING NO FIELDS. 

idx = sy-tabix. 

scarr_wa-currcode = 'EUR'. 

MODIFY scarr_tab INDEX idx FROM scarr_wa 
       TRANSPORTING currcode.
Read only

Former Member
0 Likes
579

Hello Sathya,

If u want to update a database table u can use any one of the Command.

Insert - Inserts a new record to the table

Modify - Modify already existing record mainly thro internal table

Update - Update already existing record mainly thro work area

If useful reward

Vasanth