<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to using lock object by row in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186975#M1980400</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can make it disable as below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'ENQUEUE_EZLOSD_TRIP_BBO2'
    EXPORTING
      mode_zsdtb_trip_bbo2 = 'E'
      mandt                = sy-mandt
      no_bill              = it_show-no_bill
    EXCEPTIONS
      foreign_lock         = 1
      system_failure       = 2
    OTHERS                 = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
       LOOP AT screen.               "&amp;lt;===== screen loop
           SCREEN-INPUT = 0.    " Disable for input
           MODIFY SCREEN.
      ENDLOOP.                         "&amp;lt;=== screen loop
    gv_error2 = 'X'.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Jun 2020 05:53:53 GMT</pubDate>
    <dc:creator>venkateswaran_k</dc:creator>
    <dc:date>2020-06-24T05:53:53Z</dc:date>
    <item>
      <title>How to using lock object by row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186974#M1980399</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;i need your advice,&lt;/P&gt;
  &lt;P&gt;i have screen and i create lock object,&lt;/P&gt;
  &lt;P&gt;i need when user1 open no.bill ex : 1-10 and change it, screen will input = 1.&lt;BR /&gt;and then when user 2 open no.bill ex : 8 - 12 , screen output no.bill 8-10 equal = 0 because user 1 opened it and no.bill 11-12 screen output = 1.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1818703-usr1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1818704-usr-2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;how can lock object inside loop ?&lt;/P&gt;
  &lt;P&gt;this is my code.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
  MODULE status_0100.
  MODULE init.
  LOOP AT it_show WITH CONTROL tc_0001
  CURSOR tc_0001-current_line.
    MODULE icon_status.
    MODULE lock_object.
    MODULE screen_control.
    MODULE moveback_to_screen.
  ENDLOOP.


"------------------
MODULE lock_object.
DATA : lv_uname TYPE sy-msgv1,
       lv_msg   TYPE c LENGTH 40.

  CALL FUNCTION 'ENQUEUE_EZLOSD_TRIP_BBO2'
    EXPORTING
      mode_zsdtb_trip_bbo2 = 'E'
      mandt                = sy-mandt
      no_bill              = it_show-no_bill
    EXCEPTIONS
      foreign_lock         = 1
      system_failure       = 2
    OTHERS                 = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
*    lv_uname = sy-msgv1.
*    CONCATENATE 'Data has been locked by :' lv_uname INTO lv_msg
*    SEPARATED BY space.
*    MESSAGE i000(zmm) WITH lv_msg DISPLAY LIKE 'E'.
    gv_error2 = 'X'.
  ENDIF.
ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 02:30:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186974#M1980399</guid>
      <dc:creator>jandrivay</dc:creator>
      <dc:date>2020-06-24T02:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to using lock object by row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186975#M1980400</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You can make it disable as below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CALL FUNCTION 'ENQUEUE_EZLOSD_TRIP_BBO2'
    EXPORTING
      mode_zsdtb_trip_bbo2 = 'E'
      mandt                = sy-mandt
      no_bill              = it_show-no_bill
    EXCEPTIONS
      foreign_lock         = 1
      system_failure       = 2
    OTHERS                 = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
       LOOP AT screen.               "&amp;lt;===== screen loop
           SCREEN-INPUT = 0.    " Disable for input
           MODIFY SCREEN.
      ENDLOOP.                         "&amp;lt;=== screen loop
    gv_error2 = 'X'.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Jun 2020 05:53:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186975#M1980400</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-06-24T05:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to using lock object by row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186976#M1980401</link>
      <description>&lt;P&gt;so after get data from table and before display it on screen, you should check if record is locked then set input = 0.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 06:09:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186976#M1980401</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2020-06-24T06:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to using lock object by row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186977#M1980402</link>
      <description>&lt;P&gt;Your question is unclear as you mix normal language and ABAP elements. Try to spend more time on describing clearly in full English.&lt;/P&gt;&lt;P&gt;Decoding and rephrasing your question:&lt;/P&gt;&lt;P&gt;Requirement:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When user 1 selects bills 1 to 10, the screen fields for all bills can be input because nobody maintained them yet.&lt;/LI&gt;&lt;LI&gt;When user 2 selects bills 8 to 12, the screen fields for bills 8 to 10 cannot be input because user 1 opened/locked them, and bills 11 and 12 can be input.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Does anybody know how to make fields input-capable or output-only depending on success or failure of lock.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 24 Jun 2020 08:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186977#M1980402</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-06-24T08:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to using lock object by row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186978#M1980403</link>
      <description>&lt;P&gt;Not related to your question, but please don't lock during the PBO because you shouldn't lock at each input of the user, or at each scroll of the screen.&lt;/P&gt;&lt;P&gt;Instead, I propose that you lock before displaying the screen, store the lock status in an intermediate field of the internal table IT_SHOW, don't display that field, and in PBO test this field to make fields input-capable or output-only.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 09:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186978#M1980403</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-06-24T09:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to using lock object by row</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186979#M1980404</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; ,&lt;BR /&gt;Thank you for correcting me .&lt;BR /&gt;yeah, i mean like that. &lt;BR /&gt;Thank you so much.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 04:32:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-using-lock-object-by-row/m-p/12186979#M1980404</guid>
      <dc:creator>jandrivay</dc:creator>
      <dc:date>2020-06-25T04:32:54Z</dc:date>
    </item>
  </channel>
</rss>

