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

What is Read Lock object and write lock object.

$
0
0

Hi ,

When i have set read lock in this table then why it is giving permission  for modifying record in this table. 

 

report  zlockobject_zmara.
  data : itab typetableof zmara,
            wa likelineof itab.
select * from zmara into corresponding fieldsoftable itab.
loopat  itab into wa.
  callfunction'ENQUEUE_EZMARA'
  exporting
    mode_zmara           = 'S'
    mandt                = sy-mandt
    matnr                = wa-matnr
*   X_MATNR              = ' '
*   _SCOPE               = '2'
*   _WAIT                = ' '
*   _COLLECT             = ' '
* EXCEPTIONS
*   FOREIGN_LOCK         = 1
*   SYSTEM_FAILURE       = 2
*   OTHERS               = 3
           .
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
  if  wa-matnr = '000000000000000002'.
  wa-ersda = '20130427'.
  wa-ernam = 'Second Value'.
modify itab from wa.
modify zmara fromtable itab.
  endif.
endloop.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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