Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Do i need to UNLOCK the Z table prior LOCKing it for updation, as a make sure step?

$
0
0

Hello

 

After doing some validations, I am deleting record/s from a custom table via my prog. well. Flow is as below,

 

Logic -1

 

1) Lock the table by using ENQ FM

   IF sy-subrc = 0.

2) Deelete the entries from the Z table

 

3) Unlock the table by using DQ FM

   ENDIF.

 

is it OK?

 

or do i need to go as below?

 

Logic -2

 

1) Unlock the Z table by using DQ FM  ==> This is additional statement as to make sure

 

2) Lock the table by using ENQ FM

    IF sy-subrc = 0.

3) Deelete the entries from the Z table

 

4) Unlock the table by using DQ FM

ENDIF.

 

Pls. let me know whether Logic -1 is safe & correct? or Logic -2?

 

Thank you


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>