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 database

Former Member
0 Likes
1,213

hi

I have done an append structure in the database LIPS

and i am doing an update in the tabel LIPS

UPDATE LIPS SET ZFALG = X

WHERE using all the primary condition

THe row that i am trying to update exist in the table lips. The problem that i am having is that sometimes the update is done sometimes not.

I check in debug for the data that is done updating properly and in debug the update is done but not when executing the program.

Please advise where i can look

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,169

Hi

try to use modify statement when we have to change existing line we use modify else update

regards reeha

13 REPLIES 13
Read only

Former Member
0 Likes
1,169

Use COMMIT WORK after Update statemant

Read only

0 Likes
1,169

i am using commit work. problem still there

Read only

Former Member
0 Likes
1,169

try this:


UPDATE LIPS SET ZFALG = X
WHERE using all the primary condition
if sy-subrc = 0.
 commit work.
endif.

Read only

tarangini_katta
Active Contributor
0 Likes
1,169

Hi ,

After Update statemnt use 'COMMIT WORK'.

May be it will helpful to you.

Thanks,

Read only

Former Member
0 Likes
1,169

What happens while normal run without debug?

Read only

0 Likes
1,169

with debug update is done. without debug the update is not done sy-subrc is 0

Read only

tarangini_katta
Active Contributor
0 Likes
1,169

Hi,

Then do one thing.

Go to SE14 Give table as 'LIPS' and display.

Click on 'Activate and adjust database table'

Then do the update after that use comit work

Thanks

Read only

Former Member
0 Likes
1,169

Hi

I dont know what exactly you are looking for but this is not a good practise to update a standard database through a program directly as so many foreign key relations are there. instead use BDC to update the LIPS table. for more information please contact your Functional Consultant.

If you still want to modify the table check there is any CONVERSION EXITS available for the VBELN if so go to domain of the vbeln and double click it you can find the CONVERSION EXIT function modules

use them in the program then update the table

Best Regards

Ramchander Rao.K

Read only

0 Likes
1,169

The conversion is done properly

Read only

Former Member
0 Likes
1,170

Hi

try to use modify statement when we have to change existing line we use modify else update

regards reeha

Read only

0 Likes
1,169

modify may create a new line in database. update will modify existing line

Read only

0 Likes
1,169

HI,

Updating standard table for a z-field is not at all a problem. And you have to use update only.

Since it is working in Debug mode could you for once try putting a wait and Commit?

 UPDATE LIPS SET ZFALG = 'X'
WHERE using all the primary condition
if sy-subrc = 0.
 wait for 5 seconds.
 commit work.
endif.

Read only

Former Member
0 Likes
1,169

hi,

i have same problem. could you tell how you solved it? Thanks..