<?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; ABAP editor</title>
	<atom:link href="http://www.abap-tutorials.com/tag/abap-editor/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>ABAP Editor: Create custom Pattern</title>
		<link>http://www.abap-tutorials.com/2009/07/20/abap-editor-create-custom-pattern/</link>
		<comments>http://www.abap-tutorials.com/2009/07/20/abap-editor-create-custom-pattern/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 03:16:52 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ABAP editor]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[patterns]]></category>

		<guid isPermaLink="false">http://naveenvishal.wordpress.com/?p=283</guid>
		<description><![CDATA[Ever got frustrated with typing the same set of commands (like select-options, case, if condition, etc.) or comments (like header comments, insertion comments in between, etc.) ? SAP provide and option called as &#8216;Pattern&#8217; in ABAP Editor to reduce this redundant work. Pattern can be of two types, Static pattern and Dynamic pattern. Steps for [...]]]></description>
			<content:encoded><![CDATA[<p>Ever got frustrated with typing the same set of commands (like select-options, case, if condition, etc.) or comments (like header comments, insertion comments in between, etc.) ?</p>
<p>SAP provide and option called as &#8216;Pattern&#8217; in ABAP Editor to reduce this redundant work. Pattern can be of two types, Static pattern and Dynamic pattern.</p>
<div id="attachment_290" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-290" title="Create Pattern (common step for static &amp; dynamic types)" src="http://naveenvishal.files.wordpress.com/2009/07/pattern_002.jpg" alt="Create Pattern (common step for static &amp; dynamic types)" width="450" height="204" /><p class="wp-caption-text">Create Pattern (common step for static &amp; dynamic types)</p></div>
<p><span id="more-283"></span></p>
<p><strong><span style="color:#339966;">Steps for creating STATIC PATTERN:</span></strong></p>
<p>1. Goto Menu: Utilities &gt; More utilities &gt; Edit Pattern &gt; Create pattern. Specify the Name &amp; layout of the the pattern. save the pattern.</p>
<p><span style="color:#3366ff;"><strong><span style="color:#339966;">Steps for creating DYNAMIC PATTERN:</span></strong></span></p>
<p>1. First you have to create a pattern which contains only one line: *$&amp;$MUSTER, using the path as specified in the creating static pattern.</p>
<p>2. Then create a function module with the name of the pattern followed by &#8216;_editor_exit&#8217;.</p>
<p>3. Add a tables parameter. parameter name: BUFFER type spec.: LIKE reference type: ABAPSOURCE. In the source you can add anything you like to the buffer table, upon executing the pattern in your ABAP, it copies everything you put in it. This is the result of the pattern I use:<br />
<span style="color:#3366ff;">*#######################################################################<br />
* Report :<br />
* Version : 1.00<br />
* Author :<br />
* Function : Developer Department :ABAP<br />
* Date : 05.05.2003<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
* Title :<br />
* Purpose :<br />
* Details :<br />
*=======================================================================<br />
* Change History<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
* Correction on version : 1.00<br />
* New version : 1.01<br />
* Author :<br />
* Date :<br />
* Reason :<br />
* Change :<br />
*#######################################################################</span></p>
<p>And the code for this is :<br />
FUNCTION zips_model_header_editor_exit .</p>
<p><span style="color:#3366ff;">*&#8221;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*&#8221;<br />
*&#8221;Lokale interface:<br />
*&#8221; TABLES<br />
*&#8221; BUFFER STRUCTURE ABAPSOURCE<br />
*&#8221;&#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>DATA: l_commentline1 LIKE LINE OF buffer,<br />
l_commentline2 LIKE LINE OF buffer,<br />
l_commentline3 LIKE LINE OF buffer,<br />
l_firstname LIKE adrp-name_first,<br />
l_lastname LIKE adrp-name_last,<br />
l_function LIKE adcp-function,<br />
l_department LIKE adcp-department,<br />
l_datum(10).</p>
<p>TABLES: usr21, <span style="color:#3366ff;">&#8220;Assign user name address key</span><br />
adrp, <span style="color:#3366ff;">&#8220;Persons (central address administration)<br />
</span>adcp. <span style="color:#3366ff;">&#8220;Person/Address assignment (central address administration)</span></p>
<p><span style="color:#3366ff;">*additional:, although using the comment charater &#8216;&#8221;&#8216;, the system<br />
* converts it to &#8216;*&#8217;<br />
</span>CONCATENATE &#8216;&#8221;##############################&#8217; &#8216;#########################################&#8217; INTO l_commentline1.<br />
CONCATENATE &#8216;&#8221;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8217; &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8217; INTO l_commentline2.<br />
CONCATENATE &#8216;&#8221;==================================&#8217; &#8216;=====================================&#8217; INTO l_commentline3.</p>
<p>buffer = l_commentline1.<br />
APPEND buffer.<br />
buffer = &#8216;* Report : &#8216;.<br />
APPEND buffer.<br />
buffer = &#8216;* Version : 1.00&#8242;.<br />
APPEND buffer.<br />
<span style="color:#3366ff;">* initialize first and last name, if not found in database l_firstname = &#8216;first name&#8217;.<br />
</span>l_lastname = &#8216;last name&#8217;.<br />
<span style="color:#3366ff;">* retrieval of first and last name in database<br />
</span>SELECT SINGLE * FROM usr21 WHERE bname = sy-uname.<br />
IF sy-subrc = 0.<br />
 SELECT SINGLE * FROM adrp WHERE persnumber = usr21-persnumber.<br />
 IF sy-subrc = 0.<br />
  l_firstname = adrp-name_first.<br />
  l_lastname = adrp-name_last.<br />
<span style="color:#3366ff;">* retrtieval of function and department of user</span><br />
  SELECT SINGLE * FROM adcp WHERE persnumber = usr21-persnumber.<br />
  IF sy-subrc = 0.<br />
   l_function = adcp-function.<br />
   l_department = adcp-department.<br />
  ENDIF.<br />
 ENDIF.<br />
ENDIF.</p>
<p>CONCATENATE &#8216;* Author :&#8217; sy-uname&#8217; -&#8217; l_firstname l_lastname INTO buffer SEPARATED BY space.<br />
APPEND buffer.<br />
CONCATENATE &#8216;* Function :&#8217; l_function &#8216; Department :&#8217; l_department INTO buffer SEPARATED BY space.<br />
APPEND buffer.<br />
WRITE sy-datum DD/MM/YYYY TO l_datum.<br />
CONCATENATE &#8216;* Date : &#8216; l_datum INTO buffer SEPARATED BY space.<br />
APPEND buffer.<br />
buffer = l_commentline2.<br />
APPEND buffer.<br />
buffer = &#8216;* Title : &#8216;. APPEND buffer.<br />
buffer = &#8216;* Purpose : &#8216;.<br />
APPEND buffer.<br />
buffer = &#8216;* Details : &#8216;.<br />
APPEND buffer.<br />
buffer = l_commentline3.<br />
APPEND buffer.<br />
buffer = &#8216;* Change History&#8217;.<br />
APPEND buffer.<br />
buffer = l_commentline2.<br />
APPEND buffer.<br />
buffer = &#8216;* Correction on version : 1.00&#8242;.<br />
APPEND buffer.<br />
buffer = &#8216;* New version : 1.01&#8242;.<br />
APPEND buffer.<br />
buffer = &#8216;* Author :&#8217;.<br />
APPEND buffer.<br />
buffer = &#8216;* Date :&#8217;.<br />
APPEND buffer.<br />
buffer = &#8216;* Reason :&#8217;.<br />
APPEND buffer.<br />
buffer = &#8216;* Change :&#8217;.<br />
APPEND buffer.<br />
buffer = l_commentline1.<br />
APPEND buffer.</p>
<p>ENDFUNCTION.</p>
<p> </p>
<p><span style="color:#339966;"><strong>Steps to apply Patterns:</strong></span></p>
<p>1. Select Pattern on Editor Screen.</p>
<div id="attachment_285" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-285" title="Click Pattern" src="http://naveenvishal.files.wordpress.com/2009/07/pattern_011.jpg" alt="Click Pattern" width="450" height="143" /><p class="wp-caption-text">Click Pattern</p></div>
<p>2. Select <strong>Other Pattern</strong> radio-button in the dialog box and enter/select your custom Pattern.</p>
<div id="attachment_286" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-286" title="Enter Pattern Name" src="http://naveenvishal.files.wordpress.com/2009/07/pattern_021.jpg" alt="Enter Pattern Name" width="450" height="305" /><p class="wp-caption-text">Enter Pattern Name</p></div>
<p>3. Click ok to apply the Pattern in the code.</p>
<p> </p>
<div id="attachment_288" class="wp-caption aligncenter" style="width: 460px"><img class="size-full wp-image-288" title="Apply Pattern" src="http://naveenvishal.files.wordpress.com/2009/07/pattern_031.jpg" alt="Apply Pattern" width="450" height="312" /><p class="wp-caption-text">Apply Pattern</p></div>
<p>Thats it ! Custom Pattern gets inserted.</p>
<p> </p>
<p>*source = Joyjit Ghosh</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/11/18/abap-program-to-create-formatted-excel-using-xml/' rel='bookmark' title='ABAP program to create Formatted Excel File using XML'>ABAP program to create Formatted Excel File using XML</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/08/06/search-for-smartforms-in-your-language/' rel='bookmark' title='ABAP Program to Search For SMARTFORMS in your Language'>ABAP Program to Search For SMARTFORMS in your Language</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2009/07/20/abap-editor-create-custom-pattern/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>

