<?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: Regarding Locking in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534566#M1264257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Srinath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* to lock Cusrom transactions..
USe the Funtion module
*   Locking the transaction in SM01
    perform bit-set using tstc-cinfo 6.
    call function 'RSAU_WRITE_SM01_LOG'
      exporting
        tcode = tstc-tcode     "Your T-code
        lock  = 'X'.
    if sy-subrc &amp;lt;&amp;gt; 0.
    endif.
form bit-set using hexval type x
                   bitpos type p.
  case bitpos.
    when 8. if hexval o x80. else. hexval = hexval + x80. endif.
    when 7. if hexval o x40. else. hexval = hexval + x40. endif.
    when 6. if hexval o x20. else. hexval = hexval + x20. endif.
    when 5. if hexval o x10. else. hexval = hexval + x10. endif.
    when 4. if hexval o x08. else. hexval = hexval + x08. endif.
    when 3. if hexval o x04. else. hexval = hexval + x04. endif.
    when 2. if hexval o x02. else. hexval = hexval + x02. endif.
    when 1. if hexval o x01. else. hexval = hexval + x01. endif.
    when others.
  endcase.
endform.                    "bit-set

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 11:56:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-15T11:56:26Z</dc:date>
    <item>
      <title>Regarding Locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534565#M1264256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have developed a module pool program with options like : &lt;/P&gt;&lt;P&gt;1. NEW ENTRY&lt;/P&gt;&lt;P&gt;2. DISPLAY&lt;/P&gt;&lt;P&gt;3. CHANGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the requirement is if one user is in new entry / change mode for the particular day , system shud not allow them like in standard. Not locking TCode or Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one tell me how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for ur reply...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 05:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534565#M1264256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T05:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534566#M1264257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Srinath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* to lock Cusrom transactions..
USe the Funtion module
*   Locking the transaction in SM01
    perform bit-set using tstc-cinfo 6.
    call function 'RSAU_WRITE_SM01_LOG'
      exporting
        tcode = tstc-tcode     "Your T-code
        lock  = 'X'.
    if sy-subrc &amp;lt;&amp;gt; 0.
    endif.
form bit-set using hexval type x
                   bitpos type p.
  case bitpos.
    when 8. if hexval o x80. else. hexval = hexval + x80. endif.
    when 7. if hexval o x40. else. hexval = hexval + x40. endif.
    when 6. if hexval o x20. else. hexval = hexval + x20. endif.
    when 5. if hexval o x10. else. hexval = hexval + x10. endif.
    when 4. if hexval o x08. else. hexval = hexval + x08. endif.
    when 3. if hexval o x04. else. hexval = hexval + x04. endif.
    when 2. if hexval o x02. else. hexval = hexval + x02. endif.
    when 1. if hexval o x01. else. hexval = hexval + x01. endif.
    when others.
  endcase.
endform.                    "bit-set

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 11:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534566#M1264257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T11:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534567#M1264258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Prabhu - please read the question - he's talking about record locking, not transaction locking!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinath  - read the documentation on LUW, ENQUEUE, DEQUEUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 09:37:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534567#M1264258</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-04-16T09:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Locking</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534568#M1264259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;You will have to use the concept of lock objects. Check the repository for lock objects on the tables where data is being inserted. If these are customer tables (ztables) then in se11 select lock obkects and give a nmae starting with ez or ey. It will ask for the table on which locking is required and the type of lock -- shared, exclusive . Upon saving the object the system will automatically create 2 fumnction modules enqueue_lock obkject name and dequeue_lock object name. When ever your program calls the entry being worked upon call the enqueue FM and after saveing relaese the lock using dequeue FM.&lt;/P&gt;&lt;P&gt;Object      EMMARAE is used to Lock MARA and MARM/MAKT exclusively.&lt;/P&gt;&lt;P&gt;It would have to FMs   ENQUEUE_EMMARAE for locking and&lt;/P&gt;&lt;P&gt;                                 DEQUEUE_EMMARAE for unlocking.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 10:02:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-locking/m-p/5534568#M1264259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T10:02:32Z</dc:date>
    </item>
  </channel>
</rss>

