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

Problem with SAP LUW and DELETE statement. Please help!

gopalkrishna_baliga
Participant
0 Likes
885

Hi Experts,

I have to delete multiple rows from a database table. I am using

DELETE yamt_error FROM TABLE i_tab[].

My question is "How to use SAP LUW concept with delete"?

Any sample code will be really helpfull.

Before delete I have to lock the table and after deletion I have to release the lock.

One more question, I believe that the backend RDBMS automatically handles LUW then why we should use SAP LUW?

What is the real significance of SAP LUW?

Please help!

Thanks

Gopal

Hi Experts,

I have to delete multiple rows from a database table. I am using

DELETE yamt_error FROM TABLE i_tab[].

My question is "How to use SAP LUW concept with delete"?

Any sample code will be really helpfull.

Before delete I have to lock the table and after deletion I have to release the lock.

One more question, I believe that the backend RDBMS automatically handles LUW then why we should use SAP LUW?

What is the real significance of SAP LUW?

Please help!

Thanks

Gopal

3 REPLIES 3
Read only

Former Member
0 Likes
642

If everything is okay, you COMMIT WORK.

If not okay, you ROLLBACK WORK.

When you exit the transaction, it will commit.

Why use a LUW? Lots of reasons. Maybe you have to keep three tables in synch. You delete from two, but you can not get a lock on the third. You can ROLLBACK WORK.

Check the online help for LUW. They give much better examples!

You do not need the [] on your itab. You can also use a WHERE clause.

Read only

0 Likes
642

Hi Norman,

I am looking for an example of using ENQUEUE and DEQUEUE with database table row delete.

Do you have any example?

I have tried using ENQUEUE and DEQUEUE but the delete operation is not working correctly.

What is happening is that the delete is not happening immediately but after 2-3 attempts.

Actually I have a RFC enabled FM where I have written the delete code. I am calling this RFC FM from a ABAP report on press of a GUI custom button. But it is deleting after 2-3 clicks.

I believe there is something wrong with the ENQUEUE and DEQUEUE with database table row delete.

Please help

Thanks

Gopal

Message was edited by: gopalkrishna baliga