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 dbtable

Former Member
0 Likes
689

Hi,

In my code have to update a dbtable.Have written the code as

rbkp_blocked-MRM_ZLSPR = 'A'.

rbkp_blocked-belnr = gi_amt1-belnr.

update rbkp_blocked set belnr = gi_amt1-belnr .

after this in the coding part can see that the table rbkp_blocked is blocked but when i view in table using SE11 its not getting updated why is it so..Please help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
647

Hi Divya,

try this

rbkp_blocked-MRM_ZLSPR = 'A'.
rbkp_blocked-belnr = gi_amt1-belnr.

update rbkp_blocked set  MRM_ZLSPR  = 'A'
                                     belnr = gi_amt1-belnr 
                                where "   Give your wher condition otherwise it wont update proper.

or

modify rbkp_blocked  from wa_rbkp_blocked.

hope it helps you.

Regards!

4 REPLIES 4
Read only

Former Member
0 Likes
647

hi,

Use

Update dbtab from rbkp_blocked. " where dbtab is your respective data base table name.

This would work.

Thanks

Sharath

Read only

ThomasZloch
Active Contributor
0 Likes
647

<wrong statement removed>

By the way, it is usually not advisable to update an SAP table directly.

Thomas

Read only

Former Member
0 Likes
648

Hi Divya,

try this

rbkp_blocked-MRM_ZLSPR = 'A'.
rbkp_blocked-belnr = gi_amt1-belnr.

update rbkp_blocked set  MRM_ZLSPR  = 'A'
                                     belnr = gi_amt1-belnr 
                                where "   Give your wher condition otherwise it wont update proper.

or

modify rbkp_blocked  from wa_rbkp_blocked.

hope it helps you.

Regards!

Read only

Former Member
0 Likes
647

HI,

In this RBKP_BLOCKED table , all the fields are Key fields.

So u have to give all the fields in WHERE condition if u use SET.

So better to use

eg

UPDATE sflight FROM TABLE sflight_tab.

UPDATE sflight FROM wa

or Modify statement, Press F1 on Update and Modify statement.