<?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/"
	>

<channel>
	<title>Richard Santos &#187; ABAP</title>
	<atom:link href="http://www.richardsantos.net/category/technical/sap/abap-sap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardsantos.net</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Thu, 31 Mar 2011 00:28:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ABAP Debugging a Popup Window</title>
		<link>http://www.richardsantos.net/2011/02/08/abap-debugging-a-popup-window/</link>
		<comments>http://www.richardsantos.net/2011/02/08/abap-debugging-a-popup-window/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 17:29:23 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[DEBUG]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=366</guid>
		<description><![CDATA[To enter a debugging mode we simply type &#8220;/h&#8221; in the command field. But do you ever wonder how to enter a debugging mode on a popup window? I mean there is no command field to type in the &#8220;/h&#8221;.
I stumble upon this really great SDN article about ABAP debugging tips and found out that [...]]]></description>
			<content:encoded><![CDATA[<p>To enter a debugging mode we simply type &#8220;/h&#8221; in the command field. But do you ever wonder how to enter a debugging mode on a popup window? I mean there is no command field to type in the &#8220;/h&#8221;.</p>
<p>I stumble upon this really great <a href="http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0e8b21b-e1b4-2c10-49b5-fd6a95162976">SDN article</a> about ABAP debugging tips and found out that there is actually 2 ways to debug a popup window.</p>
<p><strong>Option 1:</strong> From any SAP windows click the &#8220;Generate a Shortcut&#8221; button <img src="http://farm6.static.flickr.com/5260/5428057033_6582065009_s.jpg" width="22" height="22" alt="sap_shortcuticon" /> and in the window that appears make the below changes and click “Finish”.  A file will be generated on the location you specified. Now drag the file onto the popup window and your ABAP debugger should be switched on!</p>
<p>Make sure to set the Title, Type, Command, and Location.<br />
<img src="http://farm6.static.flickr.com/5257/5428658656_f8fd09428e.jpg" width="500" height="407" alt="sap_shortcut" /></p>
<p><strong>Option 2:</strong> Create a text file <em>(any file name will do)</em> anywhere on your computer where you could easily get it, and type the code below and save it:<br />
[codesyntax lang="c++" lines="no" title=""]<br />
[FUNCTION]<br />
Command=/h<br />
Title=Debugger<br />
Type=SystemCommand<br />
[/codesyntax]</p>
<p>Same thing with option 1, you may drag this file onto the popup window to switched on the ABAP debugger.<br />
Enjoy!</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/ph/" title="License - Copyright Protected"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/ph/88x31.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2011/02/08/abap-debugging-a-popup-window/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: Quick Way To Search For Enhancement Points</title>
		<link>http://www.richardsantos.net/2011/02/06/sap-quick-way-to-search-for-enhancement-points/</link>
		<comments>http://www.richardsantos.net/2011/02/06/sap-quick-way-to-search-for-enhancement-points/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 19:13:54 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[ABAPNINJA]]></category>

		<category><![CDATA[ENHANCEMENT]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=352</guid>
		<description><![CDATA[Enhancement Points allow you to modify standard SAP code, but in a structured way that will allow you to upgrade and deploy enhancement packs without the conflicts of traditional modifications. Enhancement points are basically can be found at certain defined points within the ABAP code. This allow you to add your own custom code which [...]]]></description>
			<content:encoded><![CDATA[<p>Enhancement Points allow you to modify standard SAP code, but in a structured way that will allow you to upgrade and deploy enhancement packs without the conflicts of traditional modifications. Enhancement points are basically can be found at certain defined points within the ABAP code. This allow you to add your own custom code which will be executed as if it had been hard coded into the code using a modification. Unlike hard coded modifications, these will not be lost during upgrade or patching exercises.</p>
<p>It is hard to tell which enhancement points are available for the process you want to customize. There’s very little documentation, and it could take an SAP developer several hours to find the best point. But thanks to <a href="http://www.panayainc.com/">Panaya</a> team, we can now enjoy <a href="http://www.abapninja.org">ABAPNinja.</a></p>
<p><a href="http://www.abapninja.org/pages/about">ABAPNinja</a> is a free web site that allows us to quickly search for the best enhancement points for our business process. How did they do it? According to their website, deciding which enhancement points impact a given transaction, directly or indirectly, is not an easy feat, to say the least. There are some 13,000 enhancement points, and over 60,000 SAP transactions, which gives over a billion possible combinations. They have have analyzed close to 250 Million lines of ERP 6.0 code, using Panaya&#8217;s program comprehension technology, and a grid of 50 servers over a period of one month, to compile this huge database. Then then used Ruby on Rails to format the data as web pages.</p>
<p>Try it out now, go to <a href="http://www.abapninja.org">www.abapninja.org</a> and enjoy searching for enhancement points!<br />
<a href="http://www.abapninja.org"><img alt="ABAPNinja.org" src="http://www.abapninja.org/images/abap-ninja-logo.png" title="ABAPNinja" width="380" height="80" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2011/02/06/sap-quick-way-to-search-for-enhancement-points/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAPlink</title>
		<link>http://www.richardsantos.net/2011/02/02/saplink/</link>
		<comments>http://www.richardsantos.net/2011/02/02/saplink/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 14:48:01 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[saplink]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=335</guid>
		<description><![CDATA[Ever wonder if it is possible to copy or download your ABAP programs, functions, classes, tables, smartforms, etc. and share it to other programmers or use it when you needed it on other SAP systems? Well EnterpriseGeeks created a project called SAPlink which enables us to share abap codes, objects and components.
SAPlink is a project [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wonder if it is possible to copy or download your ABAP programs, functions, classes, tables, smartforms, etc. and share it to other programmers or use it when you needed it on other SAP systems? Well <a href="http://enterprisegeeks.com/blog/about/">EnterpriseGeeks</a> created a project called <a href="http://code.google.com/p/saplink/">SAPlink</a> which enables us to share abap codes, objects and components.</p>
<p>SAPlink is a project that aims to make it easier to share ABAP developments between programmers. It provides the ability to easily distribute and package custom objects.</p>
<p>Below is the site for the complete instructions on how to install and use SAPlink.<br />
<a href="http://wiki.sdn.sap.com/wiki/display/ABAP/SAPlink+User+Documentation">SAPlink User Documentation</a></p>
<p><a title="License - Copyright Protected" rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/ph/"><img style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/ph/88x31.png" alt="Creative Commons License" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2011/02/02/saplink/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: BDC Upload Program Template</title>
		<link>http://www.richardsantos.net/2009/11/16/sap-bdc-upload-program-template/</link>
		<comments>http://www.richardsantos.net/2009/11/16/sap-bdc-upload-program-template/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 09:02:30 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[BDC]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<category><![CDATA[Upload]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=322</guid>
		<description><![CDATA[I recently created my own BDC upload template that enables user to choose the processing mode, the update mode and options for Default Size, Continue After Commit, and Not a Batch Input Session easily.
Another good thing with this program is a functionality to generate an excel file template. The image below shows the actual screenshot.

I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently created my own BDC upload template that enables user to choose the processing mode, the update mode and options for Default Size, Continue After Commit, and Not a Batch Input Session easily.</p>
<p>Another good thing with this program is a functionality to generate an excel file template. The image below shows the actual screenshot.</p>
<p><img title="BDC Upload Program" src="http://farm3.static.flickr.com/2762/4108051379_8123136bc4.jpg" alt="" width="500" height="375" /></p>
<p>I modified the SAP standard program BDCRECX1 and saved it as ZBDCRECX1. I used this for my BDC upload program instead of the standard BDCRECX1 include. You may download the source code of ZBDCRECX1 on the link below. I also included a sample upload program utilizing the ZBDCRECX1 include.</p>
<p><a href='http://richardsantos.net/wp-content/uploads/2009/11/zbdc_template.zip' >zbdc_template.zip</a></p>
<p>Enjoy coding! <img src='http://www.richardsantos.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/11/16/sap-bdc-upload-program-template/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: Export ALV to Excel File</title>
		<link>http://www.richardsantos.net/2009/08/28/sap-export-alv-to-excel-file/</link>
		<comments>http://www.richardsantos.net/2009/08/28/sap-export-alv-to-excel-file/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 06:54:59 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[ALV]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[EXCEL]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=288</guid>
		<description><![CDATA[&#32;
This tutorial will teach you how to export an ALV report to Microsoft Excel  file. This is intended for abap programmers who already have a knowledge in ALV reporting as I will not show here how to create an ALV.
Assuming you already have an ABAP program with ALV report, what you need to do is [...]]]></description>
			<content:encoded><![CDATA[<p>&#32;<br />
This tutorial will teach you how to export an ALV report to Microsoft Excel  file. This is intended for abap programmers who already have a knowledge in ALV reporting as I will not show here how to create an ALV.</p>
<p>Assuming you already have an ABAP program with ALV report, what you need to do is add a button or menu that will trigger the function that will export the ALV data to Excel file. but before that let&#8217;s start first with the declaration of types and variables that we&#8217;re going to use.</p>
<p>[codesyntax lang="abap" lines="no" title="VARIABLE DECLARATION"]<br />
TYPE-POOLS ole2.			 &#8221; we will use OLE objects<br />
DATA: v_excel 	TYPE ole2_object,        &#8221; Excel object<br />
      v_wrkbkl  TYPE ole2_object,        &#8221; list of workbooks<br />
      v_wrkbk   TYPE ole2_object,        &#8221; workbook<br />
      v_cell    TYPE ole2_object,        &#8221; cell<br />
      v_font    TYPE ole2_object,        &#8221; font<br />
      v_row	TYPE i.			 &#8221; row<br />
[/codesyntax]</p>
<p>Now we&#8217;re done with the variable declaration, let&#8217;s proceed to the main program. We will create 3 forms: One is for the preparation of the Excel file, second is for the data export from alv cells to excel cells, and third is for error handling.</p>
<p>The code below is for the preparation of excel application object.</p>
<p>[codesyntax lang="abap" lines="no" title="EXPORT_TO_EXCEL"]<br />
* it_main and wa_main is the tables used in your ALV<br />
FORM export_to_excel TABLES p_it_main STRUCTURE wa_main.<br />
&#32;<br />
* Create Excel object<br />
  CREATE OBJECT v_excel &#8216;EXCEL.APPLICATION&#8217;.<br />
&#32;<br />
* Call Error_handler form<br />
  PERFORM Error_Handler.<br />
&#32;<br />
* Show excel window<br />
  SET PROPERTY OF v_excel  &#8216;Visible&#8217; = 1.<br />
&#32;<br />
* get list of workbooks, initially empty<br />
  CALL METHOD OF v_excel &#8216;Workbooks&#8217; = v_wrkbkl.<br />
  PERFORM Error_Handler.<br />
&#32;<br />
* add a new workbook to workbook list<br />
  CALL METHOD OF v_wrkbkl &#8216;Add&#8217; = v_wrkbk.<br />
  PERFORM Error_Handler.<br />
&#32;<br />
* export ALV column header to Excel<br />
* PERFORM export_data USING rows columns boldfont value<br />
  PERFORM export_data USING 1 1 1 &#8216;header_1&#39;.<br />
  PERFORM export_data USING 1 2 1 &#8216;header_2&#39;.<br />
  PERFORM export_data USING 1 3 1 &#8216;header_3&#39;.<br />
  PERFORM export_data USING 1 4 1 &#8216;header_4&#39;.<br />
  PERFORM export_data USING 1 5 1 &#8216;header_5&#39;.<br />
&#32;<br />
* Loop through ALV rows and fields and transfer data to Excel<br />
  LOOP AT p_it_main INTO wa_main.<br />
    v_row = sy-tabix + 1.<br />
    PERFORM export_data USING v_row 1 0  wa_bill-field1.<br />
    PERFORM export_data USING v_row 2 0  wa_bill-field2.<br />
    PERFORM export_data USING v_row 3 0  wa_bill-field3.<br />
    PERFORM export_data USING v_row 4 0  wa_bill-field4.<br />
    PERFORM export_data USING v_row 5 0  wa_bill-field5.<br />
  ENDLOOP.<br />
  FREE OBJECT v_excel.<br />
  PERFORM error_handler.<br />
ENDFORM.<br />
[/codesyntax]</p>
<p>The next code is for the export_data form.</p>
<p>[codesyntax lang="abap" lines="no" title="EXPORT_DATA"]<br />
FORM export_data USING x y z val.<br />
  CALL METHOD OF v_excel &#8216;Cells&#8217; = v_cell<br />
    exporting<br />
    #1 = x<br />
    #2 = y.<br />
  PERFORM error_handler.<br />
&#32;<br />
  SET PROPERTY OF v_cell &#8216;Value&#8217; = val.<br />
  PERFORM error_handler.<br />
&#32;<br />
  GET PROPERTY OF v_cell &#8216;Font&#8217; = v_font.<br />
  PERFORM error_handler.<br />
&#32;<br />
  SET PROPERTY OF v_font &#8216;Bold&#8217; = z .<br />
  PERFORM error_handler.<br />
ENDFORM.<br />
[/codesyntax]</p>
<p>And for the code of error_handler form.</p>
<p>[codesyntax lang="abap" lines="no" title="ERROR_HANDLER"]<br />
FORM error_handler.<br />
  IF sy-subrc <> 0.<br />
    CALL METHOD OF v_excel &#8216;QUIT&#39;.<br />
    FREE OBJECT v_excel.<br />
    v_excel-handle = -1.<br />
    MESSAGE: &#8216;Failed to export to Excel.&#8217; TYPE &#8216;E&#39;.<br />
  ENDIF.<br />
ENDFORM.<br />
[/codesyntax]</p>
<p>Now that we&#8217;ve completed all the 3 forms, all you have to do now is call the export_to_excel form to initiate the export. In the example below, I call the export_to_excel form on user command &#8216;M_EXP&#8217;.</p>
<p>[codesyntax lang="abap" lines="no" title="USER_COMMAND"]<br />
FORM f_user_command USING p_ucomm LIKE sy-ucomm.<br />
  CASE p_ucomm.<br />
    WHEN &#8216;M_EXP&#39;.<br />
      PERFORM export_to_excel TABLES it_main.<br />
    WHEN &#8216;CANCEL&#8217; OR &#8216;BACK&#8217; OR &#8216;EXIT&#39;.<br />
      LEAVE TO SCREEN 0.<br />
  ENDCASE.<br />
ENDFORM.<br />
[/codesyntax]</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/ph/" title="License - Copyright Protected"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/ph/88x31.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/08/28/sap-export-alv-to-excel-file/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: table JEST (Individual Object Status)</title>
		<link>http://www.richardsantos.net/2009/06/22/sap-table-jest-individual-object-status/</link>
		<comments>http://www.richardsantos.net/2009/06/22/sap-table-jest-individual-object-status/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 05:25:34 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[jest]]></category>

		<category><![CDATA[object status]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=285</guid>
		<description><![CDATA[JEST table contains object status that is either system status or a user status. Field STAT corresponds to the Object Status. Field INACT identifies whether the status is currently active or inactive and field CHGNR is the change number that identifies the change documents for an object and is incremented serially.
TJ02 table contains the list [...]]]></description>
			<content:encoded><![CDATA[<p>JEST table contains object status that is either system status or a user status. Field STAT corresponds to the Object Status. Field INACT identifies whether the status is currently active or inactive and field CHGNR is the change number that identifies the change documents for an object and is incremented serially.</p>
<p>TJ02 table contains the list of system status and description. All statuses in this table are internal. This means they are consistent across objects and clients. A single object can have multiple active system statuses and user statuses &#038; inactive ones.</p>
<p>TJ30 table contains the list of user status and TJ30T contains their description.</p>
<p>You could use function module STATUS_READ read active object status and STATUS_OBJECT_READ to retrieve the status profile of an object number.</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/ph/" title="License - Copyright Protected"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/ph/88x31.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/06/22/sap-table-jest-individual-object-status/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: Dynamic Sapgui Progress Indicator</title>
		<link>http://www.richardsantos.net/2009/04/28/sap-dynamic-sapgui-progress-indicator/</link>
		<comments>http://www.richardsantos.net/2009/04/28/sap-dynamic-sapgui-progress-indicator/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:07:15 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[progress indicator]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=272</guid>
		<description><![CDATA[It is very easy to apply a progress indicator on your abap programs. This will enable the
user to determine how much long will he wait until the program finish its processing.
This is done by simply calling the function module SAPGUI_PROGRESS_INDICATOR.
[codesyntax lang="abap" lines="no" title="CODE #1"]
CALL FUNCTION &#8216;SAPGUI_PROGRESS_INDICATOR&#8217;
  EXPORTING
    VALUE(PERCENTAGE) DEFAULT 0
  [...]]]></description>
			<content:encoded><![CDATA[<p>It is very easy to apply a progress indicator on your abap programs. This will enable the</p>
<p>user to determine how much long will he wait until the program finish its processing.</p>
<p>This is done by simply calling the function module SAPGUI_PROGRESS_INDICATOR.</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #1"]<br />
CALL FUNCTION &#8216;SAPGUI_PROGRESS_INDICATOR&#8217;<br />
  EXPORTING<br />
    VALUE(PERCENTAGE) DEFAULT 0<br />
    VALUE(TEXT) DEFAULT SPACE<br />
[/codesyntax]</p>
<p>PERCENTAGE is where you indicate the percentage of processing time and the TEXT is</p>
<p>where you indicate the text to be displayed on the status bar. This parameters can be</p>
<p>set with static values. But if you want, you could also add a few line of codes to make your</p>
<p>progress indicator dynamic and based on the actual number of records being process. This tip</p>
<p>is applicable when you are querying and processing a record from a database.</p>
<p>First you have to declare three decimal variables, see example below.</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #2"]<br />
DATA:   v_percent    TYPE p DECIMALS 4,	&#8220;holds the actual percentage of process time<br />
        v_increment  TYPE p DECIMALS 4, &#8220;holds the increment value per single loop<br />
        v_mod        TYPE p DECIMALS 4. &#8220;used as indicator<br />
[/codesyntax]</p>
<p>Now refer to the lines below for the rest of the codes.</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #2"]<br />
****Your select statement goes here******<br />
&#32;<br />
* this will determine the increment value based on the result of the select statement<br />
  v_increment = 100 / sy-dbcnt.<br />
&#32;<br />
  LOOP AT it INTO wa.<br />
*calculate the progress percentage on every single loop<br />
    v_percent = v_percent + v_increment.<br />
&#32;<br />
*this codes indicates that I want to update my progress indicator every 5% increase<br />
*in percentage. you can change this anytime you want.<br />
    v_mod = v_percent MOD 5.<br />
    IF  v_mod  < 1.<br />
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'<br />
        EXPORTING<br />
          percentage = v_percent<br />
          text       = 'Processing, please wait.'.<br />
    ENDIF.<br />
[/codesyntax]</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/ph/" title="License - Copyright Protected"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/ph/88x31.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/04/28/sap-dynamic-sapgui-progress-indicator/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: Clickable Icon Button in ALV fields</title>
		<link>http://www.richardsantos.net/2009/03/26/sap-clickable-icon-button-in-alv-fields/</link>
		<comments>http://www.richardsantos.net/2009/03/26/sap-clickable-icon-button-in-alv-fields/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 01:35:09 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[ALV]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[button]]></category>

		<category><![CDATA[icon]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=204</guid>
		<description><![CDATA[&#32;
Adding a button inside an ALV fields is a very simple task to do which needs only a few line of codes. what I always do is I create a field on ALV and populate that field with an Icon of my choice and declare it as a Hotspot so it will react on a [...]]]></description>
			<content:encoded><![CDATA[<p>&#32;<br />
Adding a button inside an ALV fields is a very simple task to do which needs only a few line of codes. what I always do is I create a field on ALV and populate that field with an Icon of my choice and declare it as a <em>Hotspot</em> so it will react on a single click and it works perfectly just like a button.</p>
<p>First Thing to do is to specify a field in our internal table that we will use to hold the Icon(refer to code #1).</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #1"]<br />
TYPES: BEGIN OF t_alvbutton,<br />
          icon TYPE string,      &#8220;icon field<br />
          kunnr LIKE kna1-kunnr,<br />
	  name1 LIKE kna1-name1,<br />
	END OF t_alvbutton.<br />
&#32;<br />
DATA: it_alvbutton    TYPE STANDARD TABLE OF t_alvbutton,<br />
      wa_alvbutton	TYPE t_alvbutton.<br />
[/codesyntax]</p>
<p>Proceed to the data retrieval and populate the <em>it_alvbutton</em>. I assume you know how to retrieve data from database so there&#8217;s no need to show you the select statement for our example. After that, loop on every records of <em>it_alvbutton</em> to specify the Icon that we want to display(refer to code #2).</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #2"]<br />
LOOP AT it_alvbutton INTO wa_alvbutton.<br />
	wa_alvbutton-icon =  &#8216;@0X@&#8217;.<br />
	MODIFY it_alvbutton FROM wa_alvbutton.<br />
ENDLOOP.<br />
[/codesyntax]</p>
<p><em>@0X@</em> is the code for print icon. For the complete list of icons, check it out <a href="http://www.richardsantos.net/2009/03/24/sap-list-of-icons/">here</a>.</p>
<p>Now the important part is to define a field in ALV that will hold the icon. To show you how simple it is to do that, please refer to code #3.</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #3" escaped="true"]<br />
DATA:	ls_fieldcat TYPE slis_fieldcat_alv,<br />
	lt_fieldcat TYPE slis_t_fieldcat_alv.<br />
&#32;<br />
DEFINE m_fieldcat.<br />
	add 1 to ls_fieldcat-col_pos.<br />
	ls_fieldcat-fieldname = &#038;1.<br />
	ls_fieldcat-seltext_l = &#038;2.<br />
	ls_fieldcat-outputlen = &#038;3.<br />
	ls_fieldcat-hotspot = &#038;4.   &#8220;X to declare the field as a hotspot<br />
	ls_fieldcat-icon = &#038;5.      &#8220;X to declare the field as an icon<br />
	append ls_fieldcat to lt_fieldcat.<br />
END-OF-DEFINITION.<br />
&#32;<br />
m_fieldcat &#39;ICON&#39; &#39;Print&#39; &#39;20&#39; &#39;X&#39; &#39;X&#39;.  &#8220;this specific field is a hotspot and an icon<br />
m_fieldcat &#39;KUNNR&#39; &#39;Customer No.&#39; &#39;10&#39;.<br />
m_fieldcat &#39;NAME1&#39; &#39;Customer Name&#39; &#39;35&#39;.<br />
m_fieldcat . . .<br />
m_fieldcat . . .<br />
&#32;<br />
CALL FUNCTION &#8216;REUSE_ALV_GRID_DISPLAY&#8217;<br />
	. . .<br />
	. . .<br />
[/codesyntax]</p>
<p>The figure below shows an example of print icon as a button.</p>
<p><img src="http://farm4.static.flickr.com/3525/3851854012_50e464eeb7_o.jpg" width="587" height="402" alt="Icon Button in ALV" /></p>
<p>Now refer to code #4 to handle the command when a user clicks on the icon button.</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #4" escaped="true"]<br />
FORM f_user_command USING ucomm LIKE sy-ucomm<br />
		  v_selfld TYPE slis_selfield.<br />
&#32;<br />
IF ucomm = &#39;&amp;IC1&#39; AND v_selfld-fieldname = &#39;ICON&#39;.<br />
	&#8220;code goes in here when user clicks on our print button<br />
ENDIF.<br />
[/codesyntax]</p>
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/ph/" title="License - Copyright Protected"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/ph/88x31.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/03/26/sap-clickable-icon-button-in-alv-fields/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: List of Icons</title>
		<link>http://www.richardsantos.net/2009/03/24/sap-list-of-icons/</link>
		<comments>http://www.richardsantos.net/2009/03/24/sap-list-of-icons/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 12:53:33 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[icon]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=194</guid>
		<description><![CDATA[I could show you here the complete list of icons with its corresponding code but I rather show you a couple line of codes that will provide you the list of icons. So please refer to the code #1.
[codesyntax lang="abap" lines="no" title="CODE #1" container="div"]
TABLES: icon.
DATA: icontext(4) TYPE c.
SELECT * FROM icon.
  WRITE: / icon-id+1(2).
 [...]]]></description>
			<content:encoded><![CDATA[<p>I could show you here the complete list of icons with its corresponding code but I rather show you a couple line of codes that will provide you the list of icons. So please refer to the code #1.</p>
<p>[codesyntax lang="abap" lines="no" title="CODE #1" container="div"]<br />
TABLES: icon.<br />
DATA: icontext(4) TYPE c.</p>
<p>SELECT * FROM icon.<br />
  WRITE: / icon-id+1(2).<br />
  CONCATENATE &#8216;@&#8217; icon-id+1(2) &#8216;@&#8217; INTO icontext.<br />
  WRITE: 10 icontext AS ICON, icon-name.<br />
ENDSELECT.<br />
[/codesyntax]</p>
<p>Create a blank program on transaction SE38 and add the code above. Just activate it and execute. You now have your own list of icons for your reference whenever you need it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/03/24/sap-list-of-icons/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SAP: Basic of Lock Objects</title>
		<link>http://www.richardsantos.net/2009/03/23/sap-basic-of-lock-objects/</link>
		<comments>http://www.richardsantos.net/2009/03/23/sap-basic-of-lock-objects/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 07:42:05 +0000</pubDate>
		<dc:creator>rs</dc:creator>
		
		<category><![CDATA[ABAP]]></category>

		<category><![CDATA[BASIS]]></category>

		<category><![CDATA[SAP]]></category>

		<category><![CDATA[Technical]]></category>

		<category><![CDATA[Dequeue]]></category>

		<category><![CDATA[Enqueue]]></category>

		<category><![CDATA[Lock Objects]]></category>

		<category><![CDATA[sap blogger]]></category>

		<category><![CDATA[sdn blogger]]></category>

		<guid isPermaLink="false">http://www.richardsantos.net/?p=122</guid>
		<description><![CDATA[Data inconsistency occurs when two or more users are editing/changing the same record on the same table at exactly the same time. To avoid this, we use Lock Objects.
Lock Objects enables the user to request a lock on a specific record before accessing it. In this way, changing/editing of records is only possible one at [...]]]></description>
			<content:encoded><![CDATA[<p>Data inconsistency occurs when two or more users are editing/changing the same record on the same table at exactly the same time. To avoid this, we use Lock Objects.</p>
<p>Lock Objects enables the user to request a lock on a specific record before accessing it. In this way, changing/editing of records is only possible one at a time, thus avoiding data inconsistency.</p>
<p>There are three different lock modes:</p>
<p><strong>exclusive lock/Write Lock (Mode &#8216;E&#8217;) </strong><br />
allow you to prevent data from being changed while you are changing it yourself. An exclusive lock, as its name suggests, locks an application object for exclusive use by the program that sets it. No other program can then set either a shared lock or an exclusive lock for the same application object.</p>
<p><strong>Shared Lock/Read Lock (Mode &#8216;S&#8217;)</strong><br />
allow you to prevent data from being changed while you are reading it. They prevent other programs from setting an exclusive lock (write lock) to change the object. It does not, however, prevent other programs from setting further read locks.</p>
<p><strong>Enhanced write lock (Mode &#8216;X&#8217;) </strong><br />
works like a write lock but are not accumulated while a program is being executed. It protects from further accesses within the same transaction.</p>
<p>To create a Lock Object, got to transaction SE11, click on Lock Object radio button and enter any name that starts with EZ or EY. (Example EZSAMPLE_LOCK)</p>
<p>When you activate a lock object, the system generates an ENQUEUE_ and a DEQUEUE_ function module that you can use on your ABAP programs.</p>
<p>ENQUEUE_&lt;lockobject name&gt; - adds the requested object in a queue(lock)<br />
DEQUEUE_&lt;lockobject name&gt; - remove the requested object from being queued(unlock).</p>
<p>The basic procedure on requesting a lock:<br />
1. Enqueue and lock the object for editing.<br />
2. Read/write the data from the database.<br />
4. dequeue and release the object.</p>
<p>To implement Lock Objects in ABAP programs, please refer to <a href="http://www.richardsantos.net/2009/03/23/sap-how-to-use-lock-objects-in-abap/">this</a> post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardsantos.net/2009/03/23/sap-basic-of-lock-objects/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

