<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ABAP Tutorials &#187; lock</title>
	<atom:link href="http://www.abap-tutorials.com/tag/lock/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abap-tutorials.com</link>
	<description>ABAP Tutorials, Guides, Training, Manuals</description>
	<lastBuildDate>Thu, 17 Nov 2011 07:43:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Deactivate an Account in SAP</title>
		<link>http://www.abap-tutorials.com/2009/08/20/deactivate-an-account-in-sap/</link>
		<comments>http://www.abap-tutorials.com/2009/08/20/deactivate-an-account-in-sap/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 07:32:01 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[deactivate]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[SAP account]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=715</guid>
		<description><![CDATA[This report de-activates the account of the specified user. This can be used as a utility to SAP BASIS people. Please be cautious of its use, and thus should be used correctly.   Source Code   REPORT Zdispass. tables: usr02. types: begin of ty_users . include structure usr02 . types: end of ty_users. data: it_users type table [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">This report de-activates the account of the specified user. This can be used as a utility to SAP BASIS people.</p>
<p style="text-align:justify;">Please be cautious of its use, and thus should be used correctly.</p>
<p style="text-align:justify;"><span id="more-715"></span></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Source Code</span></strong></p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">REPORT Zdispass.</p>
<p style="text-align:justify;">tables: usr02.</p>
<p style="text-align:justify;">types: begin of ty_users .</p>
<p style="text-align:justify;">include structure usr02 .</p>
<p style="text-align:justify;">types: end of ty_users.</p>
<p style="text-align:justify;">data: it_users type table of ty_users with header line .</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">select-options: s_users for usr02-bname.</p>
<p style="text-align:justify;">start-of-selection.</p>
<p style="text-align:justify;">select * from usr02 into table it_users</p>
<p style="text-align:justify;"> where bname in s_users.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">loop at it_users.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">it_users-codvn = &#8216;X&#8217;.</p>
<p style="text-align:justify;"> clear it_users-bcode.</p>
<p style="text-align:justify;"> write:/1(35) sy-uline.</p>
<p style="text-align:justify;"> write: /1 sy-vline ,</p>
<p style="text-align:justify;"> 2 &#8216;Deactivating &#8216; color 7,</p>
<p style="text-align:justify;"> 22 it_users-bname color 5,</p>
<p style="text-align:justify;"> 35 sy-vline.</p>
<p style="text-align:justify;"> write:/1(35) sy-uline.</p>
<p style="text-align:justify;"> update usr02.</p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;">endloop .</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/25/unlock-login-id-in-sap/' rel='bookmark' title='ABAP Program to Unlock Login ID in SAP'>ABAP Program to Unlock Login ID in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/05/user-exits-and-badi-list-for-a-t-code/' rel='bookmark' title='ABAP program to get User Exits and BADI List for a T-Code'>ABAP program to get User Exits and BADI List for a T-Code</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/15/my-inactive-programs/' rel='bookmark' title='ABAP Program to show My Inactive Programs'>ABAP Program to show My Inactive Programs</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/08/20/deactivate-an-account-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lock Objects in SAP</title>
		<link>http://www.abap-tutorials.com/2009/08/19/lock-objects-in-sap/</link>
		<comments>http://www.abap-tutorials.com/2009/08/19/lock-objects-in-sap/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 23:12:03 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Abap Objects]]></category>
		<category><![CDATA[DDIC]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Module Pool]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[lock objects]]></category>
		<category><![CDATA[objects]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=705</guid>
		<description><![CDATA[Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database. SAP Provide three type of Lock objects.   - Read Lock(Shared Locked)     protects read access to an object. The read lock allows other  transactions read access but not write access to the locked area of  the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.</p>
<p>SAP Provide <strong><span style="color:#339966;">three type of Lock objects</span></strong>.  </p>
<p>- <strong>Read Lock(Shared Locked) </strong><br />
   protects read access to an object. The read lock allows other  transactions read access but not write access to the locked area of  the table</p>
<p>- <strong>Write Lock(exclusive lock) </strong><br />
   protects write access to an object. The write lock allows other  transactions neither read nor write access to the locked area of the  table.</p>
<p>- <strong>Enhanced write lock (exclusive lock without cumulating) </strong><br />
  works like a write lock except that the enhanced write lock also  protects from further accesses from the same transaction.</p>
<p style="text-align:justify;"> </p>
<div id="attachment_707" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-707" title="Type of Locks" src="http://naveenvishal.files.wordpress.com/2009/08/lock_01.jpg" alt="Type of Locks" width="450" height="256" /><p class="wp-caption-text">Type of Locks</p></div>
<p> </p>
<p style="text-align:justify;"><span id="more-705"></span></p>
<p style="text-align:justify;"><strong><span style="color:#339966;">Steps:</span></strong></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">Go to  SE11 transaction and create a lock object for the table .Custom lock  object<br />
name should be start with EY or EZ.</span></span></span></span></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;"> </span></span></span></span></p>
<div id="attachment_708" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-708" title="Lock Object -  Initial Screen" src="http://naveenvishal.files.wordpress.com/2009/08/lock_initial1.jpg" alt="Lock Object -  Initial Screen" width="450" height="326" /><p class="wp-caption-text">Lock Object -  Initial Screen</p></div>
<p> </p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">After activating lock object  Function Module will be generated automatically. </span></span></span></span></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">Function Modules name will be  like  ENQUEUE_&lt;LOCK_OBJECT_NAME&gt; and  DEQUEUE_&lt;LOCK_OBJECT_NAME&gt;.</span></span></span></span></p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;"> </span></span></span></span></p>
<div id="attachment_709" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-709" title="Lock Modules" src="http://naveenvishal.files.wordpress.com/2009/08/lock_modules.jpg" alt="Lock Modules" width="450" height="295" /><p class="wp-caption-text">Lock Modules</p></div>
<p> </p>
<p style="text-align:justify;"> </p>
<p style="text-align:justify;"><span style="color:#339966;"><span><span><span style="color:#000000;">Foe Example:</span></span></span></span></p>
<p>For example you have created a lock object EZSFLIGHT for the SFLIGHT table .</p>
<p>So first lock the table , then update then release the lock.</p>
<p> </p>
<p>Check this code &#8212;</p>
<p> </p>
<p>DATA : t_itab like table of SFLIGHT,</p>
<p>fs_itab like SFLIGHT.</p>
<p> </p>
<p>fs_itab-carrid = &#8216;AA&#8217;.</p>
<p>fs_itab-connid = &#8217;0017&#8242;.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>APPEND fs_itab TO t_itab.</p>
<p>.</p>
<p>.</p>
<p>.</p>
<p>CALL FUNCTION &#8216;ENQUE_EZSFLIGHT&#8217; &#8221; SET lock to the table</p>
<p>EXPORTING</p>
<p>CARRID = &#8230;.</p>
<p>CONNID = &#8230;.</p>
<p>.</p>
<p>.</p>
<p>IF sy-subrc eq 0.</p>
<p>INSERT sflight from table t_itab. &#8221; Update the DB table</p>
<p>ENDIF.</p>
<p> </p>
<p>CALL FUNCTION &#8216;ENQUE_EZSFLIGHT&#8217; &#8221; Unlock the table</p>
<p>EXPORTING</p>
<p>CARRID = &#8230;.</p>
<p>CONNID = &#8230;.</p>
<p>.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/10/break-the-editor-lock/' rel='bookmark' title='ABAP Program to Break the Editor Lock'>ABAP Program to Break the Editor Lock</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/22/demystifying-field-groups/' rel='bookmark' title='Demystifying Field Groups in ABAP'>Demystifying Field Groups in ABAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/28/edit-alv-grid-contents/' rel='bookmark' title='ABAP Program with Editable ALV Grid Contents'>ABAP Program with Editable ALV Grid Contents</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/08/19/lock-objects-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ABAP Program to Unlock Login ID in SAP</title>
		<link>http://www.abap-tutorials.com/2009/07/25/unlock-login-id-in-sap/</link>
		<comments>http://www.abap-tutorials.com/2009/07/25/unlock-login-id-in-sap/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 21:44:07 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[login name]]></category>
		<category><![CDATA[login-id]]></category>
		<category><![CDATA[loginid]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[unlock]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=441</guid>
		<description><![CDATA[It is normal when we hit password wrong and our login gets lock, this small piece of code unlocks the user when user hits wrong password. *&#38;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;* *&#38; program unlock password flag *&#38;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;* REPORT YKC_PWORD. tables: usr02. selection-screen begin of block blck1. *&#8212;name of user parameters: p_user like usr02-bname . selection-screen end of block blck1. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">It is normal when we hit password wrong and our login gets lock, this small piece of code unlocks the user when user hits wrong password.</p>
<p style="text-align:justify;"><span id="more-441"></span></p>
<p style="text-align:justify;"><span style="color:#3366ff;">*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
</span><span style="color:#3366ff;">*&amp; program unlock password flag<br />
</span><span style="color:#3366ff;">*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*</span></p>
<p style="text-align:justify;"><span style="color:#000000;">REPORT YKC_PWORD.</span></p>
<p style="text-align:justify;">tables: usr02.</p>
<p style="text-align:justify;">selection-screen begin of block blck1.<br />
<span style="color:#3366ff;">*&#8212;name of user<br />
</span>parameters: p_user like usr02-bname .<br />
selection-screen end of block blck1.</p>
<p style="text-align:justify;">at selection-screen.</p>
<p style="text-align:justify;">select single bname into usr02-bname<br />
from usr02 where bname = p_user.</p>
<p style="text-align:justify;">if sy-subrc ne 0.<br />
message &#8216;User Not Exist&#8217; type &#8216;E&#8217;.<br />
endif.</p>
<p style="text-align:justify;">update usr02 set uflag = 0 where bname = p_user.</p>
<p style="text-align:justify;">if sy-subrc = 0.<br />
message &#8216; User Succesfully unlocked&#8217; type &#8216;E&#8217;.<br />
else.<br />
message &#8216;User failed to unlock&#8217; type &#8216;E&#8217;.<br />
endif.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/08/20/deactivate-an-account-in-sap/' rel='bookmark' title='Deactivate an Account in SAP'>Deactivate an Account in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/10/break-the-editor-lock/' rel='bookmark' title='ABAP Program to Break the Editor Lock'>ABAP Program to Break the Editor Lock</a></li>
<li><a href='http://www.abap-tutorials.com/2009/09/16/abap-program-for-table-maintenance-in-sap/' rel='bookmark' title='ABAP Program for Table Maintenance in SAP'>ABAP Program for Table Maintenance in SAP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/07/25/unlock-login-id-in-sap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ABAP Program to Break the Editor Lock</title>
		<link>http://www.abap-tutorials.com/2009/07/10/break-the-editor-lock/</link>
		<comments>http://www.abap-tutorials.com/2009/07/10/break-the-editor-lock/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 12:05:25 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ABAP editor]]></category>
		<category><![CDATA[break lock]]></category>
		<category><![CDATA[editor lock]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[unloack]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=59</guid>
		<description><![CDATA[Some of you must had came across this simple problem when you want to modify a program that &#8216; The program locked by previous programmer &#8216; . So what we should do? We need to unlock the program. Here a simple program to lock/unlock a program. First, let find where flag for luck/unlock program is [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you must had came across this simple problem when you want to modify a program that &#8216; The program locked by previous programmer &#8216; . So what we should do? We need to unlock the program. Here a simple program to lock/unlock a program.</p>
<p><span id="more-59"></span></p>
<p style="line-height:13pt;font-family:Tahoma, Verdana, Arial, sans-serif;font-size:11px;color:#000000;font-weight:normal;margin:10px 0;padding:0;">First, let find where flag for luck/unlock program is store.</p>
<ul style="outline-width:0;outline-style:initial;outline-color:initial;font-size:11px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;list-style-type:disc;list-style-position:initial;list-style-image:initial;line-height:13pt;color:#000000;background-position:initial initial;border:0 initial initial;margin:10px 0;padding:0 0 0 22px;">
<li>Open program using Abap Editor(SE38).</li>
<li>Select menu: Goto &gt; Attributes</li>
<li>Select Editor Lock and then press F1, it will display Performance Assitant</li>
<li>Click icon Technical Information</li>
</ul>
<p style="line-height:13pt;font-family:Tahoma, Verdana, Arial, sans-serif;font-size:11px;color:#000000;font-weight:normal;margin:10px 0;padding:0;">Here we find what we need.<br style="line-height:1.22em;" />Table Name : TRDIR<br style="line-height:1.22em;" />Field Name : EDTX</p>
<p style="line-height:13pt;font-family:Tahoma, Verdana, Arial, sans-serif;font-size:11px;color:#000000;font-weight:normal;margin:10px 0;padding:0;">Now we can create simple program for lock/unlock program.<br style="line-height:1.22em;" />Here the the code:</p>
<p style="line-height:13pt;font-family:Tahoma, Verdana, Arial, sans-serif;font-size:11px;color:#000000;font-weight:normal;margin:10px 0;padding:0;">
<p style="line-height:13pt;font-family:Tahoma, Verdana, Arial, sans-serif;font-size:11px;color:#000000;font-weight:normal;margin:10px 0;padding:0;">REPORT  Z_JRQ021R.</p>
<p>TABLES: TRDIR. <span style="color:#3366ff;">&#8220;System table</span></p>
<p>PARAMETERS: P_NAME LIKE TRDIR-NAME,</p>
<p>P_LOCK  LIKE TRDIR-EDTX.</p>
<p>SELECT SINGLE * FROM TRDIR WHERE NAME = P_NAME.</p>
<p>TRDIR-EDTX  = P_LOCK.</p>
<p>TRDIR-UNAM  = TRDIR-CNAM.</p>
<p>TRDIR-UDAT  = TRDIR-CDAT.</p>
<p>TRDIR-SDATE = TRDIR-CDAT.</p>
<p>TRDIR-IDATE = TRDIR-CDAT.</p>
<p>MODIFY TRDIR.</p>
<p>IF SY-SUBRC EQ 0.</p>
<p>IF TRDIR-EDTX = &#8216;X&#8217;.</p>
<p>WRITE: &#8216; Lock Program:&#8217;, TRDIR-NAME.</p>
<p>ELSE.</p>
<p>WRITE: &#8216; UnLock Program:&#8217;, TRDIR-NAME.</p>
<p>ENDIF.</p>
<p>ELSE.</p>
<p>WRITE: / &#8216;Lock/Unlock program failed &#8216;, TRDIR-NAME.</p>
<p>ENDIF.</p>
<p style="line-height:13pt;font-family:Tahoma, Verdana, Arial, sans-serif;font-size:11px;color:#000000;font-weight:normal;margin:10px 0;padding:0;">Note:</p>
<ul style="outline-width:0;outline-style:initial;outline-color:initial;font-size:11px;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;list-style-type:disc;list-style-position:initial;list-style-image:initial;line-height:13pt;color:#000000;background-position:initial initial;border:0 initial initial;margin:10px 0;padding:0 0 0 22px;">
<li>P_NAME = Program Name</li>
<li>P_LOCK = Lock / Unlock Program</li>
</ul>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/08/19/lock-objects-in-sap/' rel='bookmark' title='Lock Objects in SAP'>Lock Objects in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/25/unlock-login-id-in-sap/' rel='bookmark' title='ABAP Program to Unlock Login ID in SAP'>ABAP Program to Unlock Login ID in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/25/list-of-programs-without-t-codes/' rel='bookmark' title='ABAP Program to List Programs without T-Codes'>ABAP Program to List Programs without T-Codes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/07/10/break-the-editor-lock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

