<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>thitima's blog</title>
  <link rel="alternate" type="text/html" href="http://www.howforge.com/blog/thitima"/>
  <link rel="self" type="application/atom+xml" href="http://www.howforge.com/blog/3/atom/feed"/>
  <id>http://www.howforge.com/blog/3/atom/feed</id>
  <updated>2006-02-20T12:52:51+07:00</updated>
  <entry>
    <title>Create Dynamic Select in ABAP/4</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/create-dynamic-select-abap-4" />
    <id>http://www.howforge.com/create-dynamic-select-abap-4</id>
    <published>2007-06-27T10:36:28+07:00</published>
    <updated>2007-06-27T19:52:42+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p>In the example, i want to select data from table VBAK by created date as '20050105'. In the selected fields, i will choose them and append those fields into internal table 'it_fldtab'.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In the example, i want to select data from table VBAK by created date as '20050105'. In the selected fields, i will choose them and append those fields into internal table 'it_fldtab'.  </p>
<p><strong>Example</strong></p>
<pre class="geshifilter">TABLES: VBAK.
DATA: it_vbak TYPE TABLE OF vbak WITH HEADER LINE,
      wa_fld(72) TYPE C,
      it_fldtab LIKE TABLE OF wa_fld.
&nbsp;
wa_fld = 'VBELN'.
APPEND wa_fld TO it_fldtab.
wa_fld = 'VBTYP'.
APPEND wa_fld TO it_fldtab.
wa_fld = 'AUDAT'.
APPEND wa_fld TO it_fldtab.
&nbsp;
SELECT (it_fldtab)
       INTO CORRESPONDING FIELDS OF TABLE it_vbak
       FROM VBAK
       WHERE ERDAT = '20050105'.
IF SY-SUBRC = 0.
  LOOP AT it_vbak.
    write:/ it_vbak-vbeln, it_vbak-vbtyp, it_vbak-audat.
  ENDLOOP.
ENDIF.</pre>    ]]></content>
  </entry>
  <entry>
    <title>How to get status by ABAP</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-get-status-abap" />
    <id>http://www.howforge.com/how-get-status-abap</id>
    <published>2007-05-18T15:21:36+07:00</published>
    <updated>2007-05-18T16:37:35+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="SAP R/3" />
    <summary type="html"><![CDATA[<p>In SAP 4.6c, when we want to retrieve status of production order by ABAP, we can apply function 'STATUS_READ'. This function require only object no. of production order.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In SAP 4.6c, when we want to retrieve status of production order by ABAP, we can apply function 'STATUS_READ'. This function require only object no. of production order.</p>
<p><b>Example</b></p>
<pre class="geshifilter">&nbsp;
  CALL FUNCTION 'STATUS_READ'
    EXPORTING
*     CLIENT                 = SY-MANDT
      OBJNR                  = PA_OBJNR
*     ONLY_ACTIVE            = ' '
*   IMPORTING
*     OBTYP                  =
*     STSMA                  =
*     STONR                  =
*   TABLES
*     STATUS                 =
*   EXCEPTIONS
*     OBJECT_NOT_FOUND       = 1
*     OTHERS                 = 2
            .
&nbsp;</pre><p>
If we want to know only active status, we can mark 'X' in export parameter 'ONLY_ACTIVE'. This function will return all status in term of internal table and return active user status in import parameters.</p>
    ]]></content>
  </entry>
  <entry>
    <title>How to change user status by ABAP</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-change-user-status-abap" />
    <id>http://www.howforge.com/how-change-user-status-abap</id>
    <published>2007-05-18T13:12:52+07:00</published>
    <updated>2007-05-18T13:15:15+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="SAP R/3" />
    <summary type="html"><![CDATA[<p>In SAP R/3 4.6c, if we want to change user status in production order by ABAP, we can apply function 'I_CHANGE_STATUS'. This function requires object number, current active status and status that we want to set as active.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In SAP R/3 4.6c, if we want to change user status in production order by ABAP, we can apply function 'I_CHANGE_STATUS'. This function requires object number, current active status and status that we want to set as active.</p>
<p><b>Example</b></p>
<pre class="geshifilter">&nbsp;
    CALL FUNCTION 'I_CHANGE_STATUS'
      EXPORTING
        OBJNR                = PA_OBJNR
        ESTAT_INACTIVE       = lv_inactive
        ESTAT_ACTIVE         = lv_active
      EXCEPTIONS
        CANNOT_UPDATE        = 1
        OTHERS               = 2
              .
&nbsp;</pre>    ]]></content>
  </entry>
  <entry>
    <title>How to retreive data from transaction STAT</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-retreive-data-transaction-stat" />
    <id>http://www.howforge.com/how-retreive-data-transaction-stat</id>
    <published>2007-05-17T11:52:00+07:00</published>
    <updated>2007-05-17T11:52:00+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <summary type="html"><![CDATA[<p>The STAT transaction is transaction for analyze the statistics by users or programs. These data is kept in the server as file. If we want to retreive these data, we should apply function 'SAPWL_STATREC_READ_FILE'. this function will return the raw data. you can take these data to analyze or verify depend on your requirement.</p>
<p><b>Example</b>
</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>The STAT transaction is transaction for analyze the statistics by users or programs. These data is kept in the server as file. If we want to retreive these data, we should apply function 'SAPWL_STATREC_READ_FILE'. this function will return the raw data. you can take these data to analyze or verify depend on your requirement.</p>
<p><b>Example</b></p>
<pre class="geshifilter">&nbsp;
  CALL FUNCTION 'SAPWL_STATREC_READ_FILE'
       EXPORTING
            READ_CLIENT             = CLIENT
            READ_END_DATE          = ENDDATE
            READ_END_TIME           = ENDTIME
            READ_START_DATE       = STARTDATE
            READ_START_TIME       = STARTTIME
       TABLES
            V2_NORMAL_RECORDS      = V2_NORMAL_RECORDS.
&nbsp;</pre><p>In above example, i want to retreive stat data by client, enddate, endtime, startdate and starttime. After i call this function, the retreived data will be returned in internal table V2_NORMAL_RECORDS.</p>
    ]]></content>
  </entry>
  <entry>
    <title>How to apply BAPI_GOODSMVT_CREATE by PHP</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-apply-bapi-goodsmvt-create-php" />
    <id>http://www.howforge.com/how-apply-bapi-goodsmvt-create-php</id>
    <published>2007-05-17T10:06:35+07:00</published>
    <updated>2007-05-17T10:11:22+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="PHP" />
    <category term="SAP R/3" />
    <summary type="html"><![CDATA[<p>If we want to create material document in SAP R/3 from external system, we can apply BAPI function <code>BAPI_GOODSMVT_CREATE</code> for this action. After we already call this function, we shoud call function <code>BAPI_TRANSACTION_COMMIT</code> or <code>BAPI_TRANSACTION_ROLLBACK</code> to commit or rollback our processes.  In the example , i will create issue material doc  by apply this function using PHP.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>If we want to create material document in SAP R/3 from external system, we can apply BAPI function <code>BAPI_GOODSMVT_CREATE</code> for this action. After we already call this function, we shoud call function <code>BAPI_TRANSACTION_COMMIT</code> or <code>BAPI_TRANSACTION_ROLLBACK</code> to commit or rollback our processes.  In the example , i will create issue material doc  by apply this function using PHP. </p>
<p><strong>Example</strong></p>
<pre class="geshifilter"><span>// This function receive refdoc and array of goods movement details </span>
<span>// and return data of material doc, material year and return message</span>
<span>function</span> callissuesap<span>&#40;</span><span>$refdoc</span>, <span>$gmm_detail</span><span>&#41;</span><span>&#123;</span>
&nbsp;
    <span>$return</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
&nbsp;
    <span>// Create saprfc-instance</span>
    <span>$sap</span> = create_connection<span>&#40;</span><span>&#41;</span>;                      
&nbsp;
    <span>// Import Parameters</span>
    <span>$today</span> = <a href="http://www.php.net/date"><span>date</span></a><span>&#40;</span><span>&quot;Ymd&quot;</span><span>&#41;</span>;
&nbsp;
    <span>$header</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
    <span>$header</span><span>&#91;</span><span>&quot;PSTNG_DATE&quot;</span><span>&#93;</span> = <span>$today</span>;
    <span>$header</span><span>&#91;</span><span>&quot;DOC_DATE&quot;</span><span>&#93;</span>   = <span>$today</span>;
    <span>$header</span><span>&#91;</span><span>&quot;REF_DOC_NO&quot;</span><span>&#93;</span> = <span>$refdoc</span>;
    <span>$header</span><span>&#91;</span><span>&quot;HEADER_TXT&quot;</span><span>&#93;</span> = <span>&quot;&quot;</span>;
&nbsp;
    <span>$code</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
    <span>$code</span><span>&#91;</span><span>&quot;GM_CODE&quot;</span><span>&#93;</span> = <span>&quot;03&quot;</span>;
&nbsp;
    <span>$item</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
    <span>$lineitem</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
    <span>foreach</span> <span>&#40;</span><span>$gmm_detail</span> <span>as</span> <span>$gmm_line</span><span>&#41;</span> <span>&#123;</span>
        <span>$lineitem</span><span>&#91;</span><span>&quot;ORDERID&quot;</span><span>&#93;</span>      = <span>$gmm_line</span><span>&#91;</span><span>&quot;orderId&quot;</span><span>&#93;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;MATERIAL&quot;</span><span>&#93;</span>     = <span>$gmm_line</span><span>&#91;</span><span>&quot;material&quot;</span><span>&#93;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;PLANT&quot;</span><span>&#93;</span>        = <span>$gmm_line</span><span>&#91;</span><span>&quot;plant&quot;</span><span>&#93;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;STGE_LOC&quot;</span><span>&#93;</span>     = <span>$gmm_line</span><span>&#91;</span><span>&quot;loc&quot;</span><span>&#93;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;BATCH&quot;</span><span>&#93;</span>        = <span>$gmm_line</span><span>&#91;</span><span>&quot;batch&quot;</span><span>&#93;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;MOVE_TYPE&quot;</span><span>&#93;</span>    = <span>&quot;261&quot;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;ENTRY_QNT&quot;</span><span>&#93;</span>    = <span>$gmm_line</span><span>&#91;</span><span>&quot;qty&quot;</span><span>&#93;</span>;
        <span>$lineitem</span><span>&#91;</span><span>&quot;ENTRY_UOM&quot;</span><span>&#93;</span>    = <span>$gmm_line</span><span>&#91;</span><span>&quot;une&quot;</span><span>&#93;</span>;
        <span>$item</span><span>&#91;</span><span>&#93;</span> = <span>$lineitem</span>;
    <span>&#125;</span>
&nbsp;
    <span>// Call-Function</span>
    <span>$result</span>=<span>$sap</span>-&gt;<span>callFunction</span><span>&#40;</span><span>&quot;BAPI_GOODSMVT_CREATE&quot;</span>,
                                <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span>
                                    <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&quot;IMPORT&quot;</span>,<span>&quot;GOODSMVT_HEADER&quot;</span>,<span>$header</span><span>&#41;</span>,
                                    <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&quot;IMPORT&quot;</span>,<span>&quot;GOODSMVT_CODE&quot;</span>,<span>$code</span><span>&#41;</span>,
                                    <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&quot;EXPORT&quot;</span>,<span>&quot;MATERIALDOCUMENT&quot;</span>,<span>&quot;&quot;</span><span>&#41;</span>,
                                    <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&quot;EXPORT&quot;</span>,<span>&quot;MATDOCUMENTYEAR&quot;</span>,<span>&quot;&quot;</span><span>&#41;</span>,
                                    <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&quot;TABLE&quot;</span>,<span>&quot;GOODSMVT_ITEM&quot;</span>,<span>$item</span><span>&#41;</span>,
                                    <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&quot;TABLE&quot;</span>,<span>&quot;RETURN&quot;</span>,<a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span><span>&#41;</span>
                                <span>&#41;</span><span>&#41;</span>;
&nbsp;
   <span>// Call successfull?</span>
   <span>if</span> <span>&#40;</span><span>$sap</span>-&gt;<span>getStatus</span><span>&#40;</span><span>&#41;</span> == SAPRFC_OK<span>&#41;</span> <span>&#123;</span>
        <span>$sap</span>-&gt;<span>callFunction</span><span>&#40;</span><span>&quot;BAPI_TRANSACTION_COMMIT&quot;</span>,<a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span><span>&#41;</span>;
        <span>$return</span><span>&#91;</span><span>&quot;MAT_DOC&quot;</span><span>&#93;</span> = <span>$result</span><span>&#91;</span><span>&quot;MATERIALDOCUMENT&quot;</span><span>&#93;</span>;
        <span>$return</span><span>&#91;</span><span>&quot;MAT_DOC_YEAR&quot;</span><span>&#93;</span> = <span>$result</span><span>&#91;</span><span>&quot;MATDOCUMENTYEAR&quot;</span><span>&#93;</span>;
        <span>$return</span><span>&#91;</span><span>&quot;RETURN&quot;</span><span>&#93;</span> = <span>$result</span><span>&#91;</span><span>&quot;RETURN&quot;</span><span>&#93;</span>;
    <span>&#125;</span>
    <span>else</span> <span>&#123;</span>
        <span>$mess</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
        <span>$messline</span> = <a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span>;
        <span>$messline</span><span>&#91;</span><span>&quot;TYPE&quot;</span><span>&#93;</span> = <span>&quot;E&quot;</span>;
        <span>$messline</span><span>&#91;</span><span>&quot;MESSAGE&quot;</span><span>&#93;</span> = <span>$sap</span>-&gt;<span>getStatusTextLong</span><span>&#40;</span><span>&#41;</span>;
        <span>$mess</span><span>&#91;</span><span>&#93;</span> = <span>$messline</span>;
&nbsp;
<span>//        $sap-&gt;printStatus();</span>
        <span>$sap</span>-&gt;<span>callFunction</span><span>&#40;</span><span>&quot;BAPI_TRANSACTION_ROLLBACK&quot;</span>,<a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span><span>&#41;</span><span>&#41;</span>;
        <span>$return</span><span>&#91;</span><span>&quot;MAT_DOC&quot;</span><span>&#93;</span> = <span>&quot;&quot;</span>;
        <span>$return</span><span>&#91;</span><span>&quot;MAT_DOC_YEAR&quot;</span><span>&#93;</span> = <span>&quot;&quot;</span>;
        <span>$return</span><span>&#91;</span><span>&quot;RETURN&quot;</span><span>&#93;</span> = <span>$mess</span>;
    <span>&#125;</span>                     
    <span>$sap</span>-&gt;<span>logoff</span><span>&#40;</span><span>&#41;</span>;
&nbsp;
    <span>return</span> <span>$return</span>;
<span>&#125;</span>
&nbsp;
<span>function</span> create_connection<span>&#40;</span><span>&#41;</span> <span>&#123;</span>
    <span>return</span> <span>$sap</span> = <span>new</span> saprfc<span>&#40;</span><a href="http://www.php.net/array"><span>array</span></a><span>&#40;</span>
    <span>&quot;logindata&quot;</span>=&gt;array<span>&#40;</span>  
    <span>&quot;ASHOST&quot;</span>=&gt;<span>&quot;xxx.xxx.xxx.xxx&quot;</span>        <span>// application server </span>
    ,<span>&quot;SYSNR&quot;</span>=&gt;<span>&quot;xx&quot;</span>         <span>// system number</span>
    ,<span>&quot;CLIENT&quot;</span>=&gt;<span>&quot;xxx&quot;</span>           <span>// client     </span>
    ,<span>&quot;USER&quot;</span>=&gt;<span>&quot;xxxxxxxxx&quot;</span>       <span>// user</span>
    ,<span>&quot;PASSWD&quot;</span>=&gt;<span>&quot;xxxxxxxxx&quot;</span>     <span>// password</span>
    <span>&#41;</span>
    ,<span>&quot;show_errors&quot;</span>=&gt;false     <span>// let class printout errors</span>
    ,<span>&quot;debug&quot;</span>=&gt;false<span>&#41;</span><span>&#41;</span> ;     <span>// detailed debugging information     </span>
<span>&#125;</span>
&nbsp;</pre><p><strong>Information about GM_CODE</strong></p>
<p>GM_Code 01: Goods receipt for purchase order<br />
GM_Code 02: Goods receipt for production order<br />
GM_Code 03: Goods issue<br />
GM_Code 04: Transfer posting<br />
GM_Code 05: Other goods receipts<br />
GM_Code 06: Reversal of goods movements</p>
<p>You can read the further informations in tcode <code>&lt;BAPI&gt;</code> -&gt; Materials Management -&gt; Inventory Management -&gt; GoodsMovement -&gt; CreateFromData -&gt; Tab Documentation.</p>
    ]]></content>
  </entry>
  <entry>
    <title>How to create queries for ABAP/4 query</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-to-create-queries-for-abap-4-query" />
    <id>http://www.howforge.com/how-to-create-queries-for-abap-4-query</id>
    <published>2006-03-07T10:20:22+07:00</published>
    <updated>2006-03-07T10:20:24+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>Step for create queries is a necessary process for create ABAP/4 query. </P><br />
<UL><br />
<LI>Go to transaction <EM>SQ01</EM><BR><IMG height="294" alt="img216" hspace="0" src="http://www.howforge.com/files/img216_0.png" width="400" align="bottom" border="1"><BR><br />
<LI>Input query name that want to create and click <IMG height="21" alt="img219" hspace="0" src="http://www.howforge.com/files/img219_0.png" width="141" align="bottom" border="1">.<BR><IMG height="54" alt="img218" hspace="0" src="http://www.howforge.com/files/img218_0.png" width="359" align="bottom" border="1"><BR><br />
<LI>Select infoSet that you want to create ABAP/4 query.<BR><IMG height="106" alt="img226" hspace="0" src="http://www.howforge.com/files/img226_0.png" width="381" align="bottom" border="1"><BR></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>Step for create queries is a necessary process for create ABAP/4 query. </P><br />
<UL><br />
<LI>Go to transaction <EM>SQ01</EM><BR><IMG height="294" alt="img216" hspace="0" src="http://www.howforge.com/files/img216_0.png" width="400" align="bottom" border="1"><BR><br />
<LI>Input query name that want to create and click <IMG height="21" alt="img219" hspace="0" src="http://www.howforge.com/files/img219_0.png" width="141" align="bottom" border="1">.<BR><IMG height="54" alt="img218" hspace="0" src="http://www.howforge.com/files/img218_0.png" width="359" align="bottom" border="1"><BR><br />
<LI>Select infoSet that you want to create ABAP/4 query.<BR><IMG height="106" alt="img226" hspace="0" src="http://www.howforge.com/files/img226_0.png" width="381" align="bottom" border="1"><BR><br />
<LI>Input description of query and configure List format, Table format, Special attributes, Print list&nbsp;and Output format.<BR><IMG height="411" alt="img227" hspace="0" src="http://www.howforge.com/files/img227_0.png" width="400" align="bottom" border="1"><BR><br />
<LI>Go to next step by select <IMG height="22" alt="img228" hspace="0" src="http://www.howforge.com/files/img228_0.png" width="18" align="bottom" border="1">.<br />
<LI>Select field group that defined in selected infoSet.<BR><IMG height="241" alt="img229" hspace="0" src="http://www.howforge.com/files/img229_0.png" width="399" align="bottom" border="1"><BR><br />
<LI>Go to next step for select fields in selected field group.<BR><IMG height="426" alt="img230" hspace="0" src="http://www.howforge.com/files/img230_0.png" width="401" align="bottom" border="1"><BR><br />
<LI>Go to next step for select fields to selection screen.<BR><IMG height="418" alt="img231" hspace="0" src="http://www.howforge.com/files/img231_0.png" width="400" align="bottom" border="1"><BR><br />
<LI>You can define this query layout type&nbsp;as<br />
<UL><br />
<LI>Basic List <IMG height="19" alt="img235" hspace="0" src="http://www.howforge.com/files/img235_0.bmp" width="92" align="bottom" border="1"><br />
<LI>Statistics <IMG height="20" alt="img236" hspace="0" src="http://www.howforge.com/files/img236_0.png" width="91" align="bottom" border="1"><br />
<LI>Ranked List <IMG height="22" alt="img234" hspace="0" src="http://www.howforge.com/files/img234_0.png" width="102" align="bottom" border="1"></LI></UL><br />
<LI>After you already define query layout, please save by select <IMG height="21" alt="img243" hspace="0" src="http://www.howforge.com/files/img243_0.bmp" width="23" align="bottom" border="1">.<br />
<LI>You can test run by select <IMG height="17" alt="img244" hspace="0" src="http://www.howforge.com/files/img244_0.png" width="20" align="bottom" border="1">.</LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>How to create Function Area for ABAP/4 query</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-to-create-function-area-for-abap-4-query" />
    <id>http://www.howforge.com/how-to-create-function-area-for-abap-4-query</id>
    <published>2006-03-07T10:18:22+07:00</published>
    <updated>2006-03-07T10:18:23+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>When you create ABAP/4 query in SAP, create the functional area or InfoSets is a necessary process. The infoSets specify view of data. You can create the InfoSets as following:</P><br />
<UL><br />
<LI>Go to transaction <EM>SQ02</EM><BR><IMG height="314" alt="img166" hspace="0" src="http://www.howforge.com/files/img166.png" width="400" align="bottom" border="1"><BR><br />
<LI>Input InfoSet name that want to create and click <IMG height="21" alt="img167" hspace="0" src="http://www.howforge.com/files/img167.png" width="126" align="bottom" border="1">.&nbsp;<BR><IMG height="281" alt="img168" hspace="0" src="http://www.howforge.com/files/img168.png" width="400" align="bottom" border="1"><BR></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>When you create ABAP/4 query in SAP, create the functional area or InfoSets is a necessary process. The infoSets specify view of data. You can create the InfoSets as following:</P><br />
<UL><br />
<LI>Go to transaction <EM>SQ02</EM><BR><IMG height="314" alt="img166" hspace="0" src="http://www.howforge.com/files/img166.png" width="400" align="bottom" border="1"><BR><br />
<LI>Input InfoSet name that want to create and click <IMG height="21" alt="img167" hspace="0" src="http://www.howforge.com/files/img167.png" width="126" align="bottom" border="1">.&nbsp;<BR><IMG height="281" alt="img168" hspace="0" src="http://www.howforge.com/files/img168.png" width="400" align="bottom" border="1"><BR><br />
<LI>Input information of infoSet about description, Authorization group for start query report, data source, options etc.<BR><IMG height="287" alt="img169" hspace="0" src="http://www.howforge.com/files/img169.png" width="351" align="bottom" border="1"><BR><br />
<LI>You have 4&nbsp;methods for&nbsp;specify data sources:<br />
<UL><br />
<LI>Table join using basis table<br />
<LI>Direct read of table<br />
<LI>Logical&nbsp;database<br />
<LI>Data retrieval by program&nbsp;&nbsp;</LI></UL><br />
<LI>After already input information, please select <IMG height="19" alt="img170" hspace="0" src="http://www.howforge.com/files/img170.png" width="20" align="bottom" border="1">&nbsp;to save infoSet data to SAP.<br />
<LI>Don&rsquo;t forget to generate your function area by select <IMG height="18" alt="img250" hspace="0" src="http://www.howforge.com/files/img250.png" width="19" align="bottom" border="1">.</LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A><BR><BR></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>How to create User Groups for ABAP/4 Query</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-to-create-user-groups-for-abap-4-query" />
    <id>http://www.howforge.com/how-to-create-user-groups-for-abap-4-query</id>
    <published>2006-03-07T10:17:48+07:00</published>
    <updated>2006-03-07T10:17:49+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>When you create ABAP/4 query in SAP, assigning the user group is a necessary process. The user group specify who are authorized to use the ABAP/4 query. You can create the user group as following:</P><br />
<UL><br />
<LI>Go to transaction <EM>SQ03<BR><IMG height="310" alt="img158" hspace="0" src="http://www.howforge.com/files/img158.png" width="400" align="bottom" border="1"><BR></EM><br />
<LI>Input user group name that want to create and click <IMG height="20" alt="img159" hspace="0" src="http://www.howforge.com/files/img159.png" width="139" align="bottom" border="1">. System will popup screen for input user group description. <BR><IMG height="315" alt="img160" hspace="0" src="http://www.howforge.com/files/img160.png" width="399" align="bottom" border="1"><BR>In the example, i want to create user group name &rsquo;USRGRP1&rsquo;.<BR><BR><IMG height="125" alt="img161" hspace="0" src="http://www.howforge.com/files/img161.png" width="356" align="bottom" border="1"><BR></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>When you create ABAP/4 query in SAP, assigning the user group is a necessary process. The user group specify who are authorized to use the ABAP/4 query. You can create the user group as following:</P><br />
<UL><br />
<LI>Go to transaction <EM>SQ03<BR><IMG height="310" alt="img158" hspace="0" src="http://www.howforge.com/files/img158.png" width="400" align="bottom" border="1"><BR></EM><br />
<LI>Input user group name that want to create and click <IMG height="20" alt="img159" hspace="0" src="http://www.howforge.com/files/img159.png" width="139" align="bottom" border="1">. System will popup screen for input user group description. <BR><IMG height="315" alt="img160" hspace="0" src="http://www.howforge.com/files/img160.png" width="399" align="bottom" border="1"><BR>In the example, i want to create user group name &rsquo;USRGRP1&rsquo;.<BR><BR><IMG height="125" alt="img161" hspace="0" src="http://www.howforge.com/files/img161.png" width="356" align="bottom" border="1"><BR><br />
<LI>When&nbsp;completely input user group description, please select <IMG height="18" alt="img162" hspace="0" src="http://www.howforge.com/files/img162.png" width="67" align="bottom" border="1">&nbsp;to save to SAP.<BR>&nbsp;<IMG height="125" alt="img164" hspace="0" src="http://www.howforge.com/files/img164.png" width="356" align="bottom" border="1"><BR><BR><IMG height="22" alt="img165" hspace="0" src="http://www.howforge.com/files/img165.png" width="242" align="bottom" border="1"><BR><br />
<LI>Assign users and InfoSets by select <IMG height="21" alt="img220" hspace="0" src="http://www.howforge.com/files/img220.bmp" width="299" align="bottom" border="1">&nbsp;on initial screen.<BR><IMG height="320" alt="img221" hspace="0" src="http://www.howforge.com/files/img221.png" width="400" align="bottom" border="1"><BR><BR><IMG height="375" alt="img222" hspace="0" src="http://www.howforge.com/files/img222.png" width="401" align="bottom" border="1"><BR><br />
<LI>Input User Name.<BR><IMG height="212" alt="img223" hspace="0" src="http://www.howforge.com/files/img223.png" width="400" align="bottom" border="1"><BR><br />
<LI>Assign InfoSets by select <IMG height="20" alt="img224" hspace="0" src="http://www.howforge.com/files/img224.png" width="129" align="bottom" border="1">.<BR><IMG height="355" alt="img225" hspace="0" src="http://www.howforge.com/files/img225.png" width="401" align="bottom" border="1"><BR><STRONG><U>Note:</U></STRONG> You can assign infoSet to user group in transaction SQ02 too.<BR><br />
<LI>Save User Group data again.<BR><IMG height="22" alt="img165" hspace="0" src="http://www.howforge.com/files/img165.png" width="242" align="bottom" border="1"></LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A><BR></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>Step to create ABAP/4 Query</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/step-to-create-abap-4-query" />
    <id>http://www.howforge.com/step-to-create-abap-4-query</id>
    <published>2006-03-07T10:16:52+07:00</published>
    <updated>2006-03-07T10:25:47+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>The ABAP/4 query is one method in ’SAP R/3 Report Development Tools’. You can create the simply report by this way. In this way, we have 4 mains steps to create it as following:</P><br />
<OL><br />
<LI><A href="http://www.howforge.com/how-to-create-user-groups-for-abap-4-query" target="_self">Create User Groups <EM>&lt;SQ03&gt;</EM></A><br />
<LI><A href="http://www.howforge.com/how-to-create-function-area-for-abap-4-query" target="_self">Create InfoSets <EM>&lt;SQ02&gt;</EM></A><br />
<LI>Assign user group to infoSet.(You can swap create infoSets as first and create user groups as second.)<br />
<LI><A href="http://www.howforge.com/how-to-create-queries-for-abap-4-query" target="_self">Create the query base on the selected infoSet<EM> &lt;SQ01&gt;</EM></A></LI></OL></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>The ABAP/4 query is one method in ’SAP R/3 Report Development Tools’. You can create the simply report by this way. In this way, we have 4 mains steps to create it as following:</P><br />
<OL><br />
<LI><A href="http://www.howforge.com/how-to-create-user-groups-for-abap-4-query" target="_self">Create User Groups <EM>&lt;SQ03&gt;</EM></A><br />
<LI><A href="http://www.howforge.com/how-to-create-function-area-for-abap-4-query" target="_self">Create InfoSets <EM>&lt;SQ02&gt;</EM></A><br />
<LI>Assign user group to infoSet.(You can swap create infoSets as first and create user groups as second.)<br />
<LI><A href="http://www.howforge.com/how-to-create-queries-for-abap-4-query" target="_self">Create the query base on the selected infoSet<EM> &lt;SQ01&gt;</EM></A></LI></OL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>How to insert alternative comand in SAP smartforms</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-to-insert-alternative-comand-in-sap-smartforms" />
    <id>http://www.howforge.com/how-to-insert-alternative-comand-in-sap-smartforms</id>
    <published>2006-02-22T09:22:36+07:00</published>
    <updated>2006-02-22T15:59:29+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>The alternative command looks like IF statement in ABAP/4.</P></p>
<blockquote>
<PRE>IF (condition) {<BR>*** True ***<BR>&nbsp; ...<BR>} ELSE {<BR>*** False ***<BR>&nbsp; ...<BR>}.</PRE><p></BLOCKQUOTE><br />
<P>You can insert alternative command as follows:</P><br />
<UL><br />
<LI>Select window that you want to insert&nbsp;alternative command&nbsp;and right click. System will list object that you can create.<BR><IMG height="199" alt="img146" hspace="0" src="http://www.howforge.com/files/img146.png" width="401" align="bottom" border="1"><BR>In the example, I have window name&nbsp;&rsquo;%WINDOW1&rsquo; and I want to insert alternative command in this window.<BR></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>The alternative command looks like IF statement in ABAP/4.</P></p>
<blockquote>
<PRE>IF (condition) {<BR>*** True ***<BR>&nbsp; ...<BR>} ELSE {<BR>*** False ***<BR>&nbsp; ...<BR>}.</PRE><p></BLOCKQUOTE><br />
<P>You can insert alternative command as follows:</P><br />
<UL><br />
<LI>Select window that you want to insert&nbsp;alternative command&nbsp;and right click. System will list object that you can create.<BR><IMG height="199" alt="img146" hspace="0" src="http://www.howforge.com/files/img146.png" width="401" align="bottom" border="1"><BR>In the example, I have window name&nbsp;&rsquo;%WINDOW1&rsquo; and I want to insert alternative command in this window.<BR><br />
<LI>On popup menu, you will select <EM>Create -&gt; Flow Logic -&gt; Alternative<BR></EM><IMG height="221" alt="img147" hspace="0" src="http://www.howforge.com/files/img147.png" width="400" align="bottom" border="1"><BR><BR><IMG height="224" alt="img148" hspace="0" src="http://www.howforge.com/files/img148.png" width="401" align="bottom" border="1"><BR>System will default value of&nbsp;Alternative name and description but you can change them.<BR><br />
<LI>In General Attributes tab, you can define condition to determine the alternative ways.<BR><IMG height="171" alt="img149" hspace="0" src="http://www.howforge.com/files/img149.png" width="399" align="bottom" border="1"><BR>System will default operator for concatenate these conditions by &rsquo;AND&rsquo; by you can add operator &rsquo;OR&rsquo; by select <IMG height="18" alt="img157" hspace="0" src="http://www.howforge.com/files/img157.png" width="18" align="bottom" border="1">.<BR><br />
<LI>Under alternative command, system define 2 ways&nbsp;when verify&nbsp;condition that defined in General Attributes. <BR><IMG height="54" alt="img150" hspace="0" src="http://www.howforge.com/files/img150.png" width="302" align="bottom" border="1"></LI><br />
<UL><br />
<LI>If system verify&nbsp;the alternative command is&nbsp;true, system will operate command in True node.<BR><IMG height="226" alt="img151" hspace="0" src="http://www.howforge.com/files/img151.png" width="400" align="bottom" border="1"><BR>In the example, we will show %TEXT1 if alternative command is true.<BR><br />
<LI>If system verify the alternative command is&nbsp;false, system will operate command in&nbsp;False node.<BR><IMG height="226" alt="img152" hspace="0" src="http://www.howforge.com/files/img152.png" width="399" align="bottom" border="1"><BR>In the example, we will show %TEXT2 if alternative command is false.<BR></LI></UL><br />
<LI>The output when alternative command is true:<BR><IMG height="158" alt="img153" hspace="0" src="http://www.howforge.com/files/img153.png" width="307" align="bottom" border="1"><BR><BR><IMG height="146" alt="img154" hspace="0" src="http://www.howforge.com/files/img154.png" width="404" align="bottom" border="1"><BR><br />
<LI>The output when alternative command is false:<BR><IMG height="136" alt="img155" hspace="0" src="http://www.howforge.com/files/img155.png" width="302" align="bottom" border="1"><BR><BR><IMG height="131" alt="img156" hspace="0" src="http://www.howforge.com/files/img156.png" width="404" align="bottom" border="1"></LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>ABAP/4 Example Code: ALV List by FM &#039;REUSE_ALV_LIST_DISPLAY&#039;</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/abap-4-example-code-alv-list-by-fm-reuse-alv-list-display" />
    <id>http://www.howforge.com/abap-4-example-code-alv-list-by-fm-reuse-alv-list-display</id>
    <published>2006-02-20T22:26:08+07:00</published>
    <updated>2006-02-20T22:28:36+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P><STRONG><U>Example</U></STRONG></P></p>
<blockquote>
<PRE>TYPE-POOLS: SLIS.<BR> <BR>DATA: it_spfli TYPE TABLE OF spfli WITH HEADER LINE,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it_cat TYPE SLIS_T_FIELDCAT_ALV,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa_cat TYPE slis_fieldcat_alv.<BR> <BR>START-OF-SELECTION.<BR>&nbsp; SELECT * FROM spfli<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTO TABLE it_spfli.<BR> <BR>&nbsp; PERFORM create_field_catalog.<BR> <BR>&nbsp; CALL FUNCTION &rsquo;REUSE_ALV_LIST_DISPLAY&rsquo;<BR>&nbsp;&nbsp;&nbsp; EXPORTING<BR>*&nbsp;&nbsp;&nbsp;&nbsp; I_INTERFACE_CHECK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &rsquo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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = it_spfli<BR>*&nbsp;&nbsp; EXCEPTIONS<BR>*&nbsp;&nbsp;&nbsp;&nbsp; PROGRAM_ERROR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1<BR>*&nbsp;&nbsp;&nbsp;&nbsp; OTHERS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<BR>&nbsp; IF SY-SUBRC &lt;&gt; 0.<BR>&nbsp;&nbsp;&nbsp; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.<BR>&nbsp; ENDIF.<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Form&nbsp; create_field_catalog<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>*&nbsp; --&gt;&nbsp; p1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*&nbsp; &lt;--&nbsp; p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>FORM create_field_catalog .<BR>&nbsp; IF it_cat[] is initial.<BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 1.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CARRID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 2.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CONNID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;NUMC&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;N&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 5.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 6.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp; ENDIF.<BR>ENDFORM.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " create_field_catalog </PRE><p></BLOCKQUOTE></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P><STRONG><U>Example</U></STRONG></P></p>
<blockquote>
<PRE>TYPE-POOLS: SLIS.<BR> <BR>DATA: it_spfli TYPE TABLE OF spfli WITH HEADER LINE,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it_cat TYPE SLIS_T_FIELDCAT_ALV,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa_cat TYPE slis_fieldcat_alv.<BR> <BR>START-OF-SELECTION.<BR>&nbsp; SELECT * FROM spfli<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTO TABLE it_spfli.<BR> <BR>&nbsp; PERFORM create_field_catalog.<BR> <BR>&nbsp; CALL FUNCTION &rsquo;REUSE_ALV_LIST_DISPLAY&rsquo;<BR>&nbsp;&nbsp;&nbsp; EXPORTING<BR>*&nbsp;&nbsp;&nbsp;&nbsp; I_INTERFACE_CHECK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = &rsquo; &rsquo;<BR>*&nbsp;&nbsp;&nbsp;&nbsp; I_BYPASSING_BUFFER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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BR>*&nbsp;&nbsp;&nbsp;&nbsp; PROGRAM_ERROR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1<BR>*&nbsp;&nbsp;&nbsp;&nbsp; OTHERS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<BR>&nbsp; IF SY-SUBRC &lt;&gt; 0.<BR>&nbsp;&nbsp;&nbsp; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.<BR>&nbsp; ENDIF.<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Form&nbsp; create_field_catalog<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>*&nbsp; --&gt;&nbsp; p1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*&nbsp; &lt;--&nbsp; p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>FORM create_field_catalog .<BR>&nbsp; IF it_cat[] is initial.<BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 1.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CARRID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 2.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CONNID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;NUMC&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;N&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 5.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 6.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_l&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_m&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-seltext_s&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp; ENDIF.<BR>ENDFORM.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " create_field_catalog </PRE><p></BLOCKQUOTE></p>
<blockquote><p>
<P>The output is: <BR><IMG height="317" alt="img145" hspace="0" src="http://www.howforge.com/files/img145.png" width="406" align="bottom" border="1"></P></BLOCKQUOTE><br />
<P dir="ltr">Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>Global data in SAP smartforms</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/global-data-in-sap-smartforms" />
    <id>http://www.howforge.com/global-data-in-sap-smartforms</id>
    <published>2006-02-20T17:53:23+07:00</published>
    <updated>2006-02-20T17:53:24+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>We can define global variables in SAP smartforms but these are not contained in form interface by define them in Global Settings -&gt; Global Definitions and select Global Data tab.</P><br />
<P><IMG height="220" alt="img144" hspace="0" src="http://www.howforge.com/files/img144.png" width="504" align="bottom" border="1"></P><br />
<P>See above picture, we can define variable from: </P><br />
<UL><br />
<LI>Data type (DATE, CHAR, NUMC etc.)</LI><br />
<LI>Structure in Data Dictionary</LI><br />
<LI>Defined Type in Types tab</LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>We can define global variables in SAP smartforms but these are not contained in form interface by define them in Global Settings -&gt; Global Definitions and select Global Data tab.</P><br />
<P><IMG height="220" alt="img144" hspace="0" src="http://www.howforge.com/files/img144.png" width="504" align="bottom" border="1"></P><br />
<P>See above picture, we can define variable from: </P><br />
<UL><br />
<LI>Data type (DATE, CHAR, NUMC etc.)</LI><br />
<LI>Structure in Data Dictionary</LI><br />
<LI>Defined Type in Types tab</LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></P></p>
    ]]></content>
  </entry>
  <entry>
    <title>Difference between MOVE ... TO and WRITE ... TO in ABAP/4</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/difference-between-move-to-and-write-to-in-abap-4" />
    <id>http://www.howforge.com/difference-between-move-to-and-write-to-in-abap-4</id>
    <published>2006-02-20T16:24:08+07:00</published>
    <updated>2006-02-20T16:24:09+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P><STRONG><U>See Example</U></STRONG></P></p>
<blockquote>
<PRE>DATA: gv_char1(20) TYPE c,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gv_char2(20) TYPE c,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dec1(10) TYPE p DECIMALS 2 VALUE &rsquo;122345.89&rsquo;.<BR> <BR>START-OF-SELECTION.<BR>* Date *<BR>&nbsp; WRITE:/ &rsquo;Date variable&rsquo;.<BR>&nbsp; WRITE sy-datum to gv_char1.<BR>&nbsp; WRITE:/ &rsquo;WRITE TO &rsquo;, gv_char1.<BR> <BR>&nbsp; MOVE sy-datum to gv_char2.<BR>&nbsp; WRITE:/ &rsquo;MOVE TO &rsquo;, gv_char2.<BR> <BR>  SKIP 1.<BR> <BR>* Decimal *<BR>&nbsp; WRITE:/ &rsquo;Decimal variable&rsquo;.<BR>&nbsp; WRITE dec1 to gv_char1.<BR>&nbsp; WRITE:/ &rsquo;WRITE TO &rsquo;, gv_char1.<BR> <BR>&nbsp; MOVE dec1 to gv_char2.<BR>&nbsp; WRITE:/ &rsquo;MOVE TO &rsquo;, gv_char2.</PRE><p></BLOCKQUOTE></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P><STRONG><U>See Example</U></STRONG></P></p>
<blockquote>
<PRE>DATA: gv_char1(20) TYPE c,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gv_char2(20) TYPE c,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dec1(10) TYPE p DECIMALS 2 VALUE &rsquo;122345.89&rsquo;.<BR> <BR>START-OF-SELECTION.<BR>* Date *<BR>&nbsp; WRITE:/ &rsquo;Date variable&rsquo;.<BR>&nbsp; WRITE sy-datum to gv_char1.<BR>&nbsp; WRITE:/ &rsquo;WRITE TO &rsquo;, gv_char1.<BR> <BR>&nbsp; MOVE sy-datum to gv_char2.<BR>&nbsp; WRITE:/ &rsquo;MOVE TO &rsquo;, gv_char2.<BR> <BR>  SKIP 1.<BR> <BR>* Decimal *<BR>&nbsp; WRITE:/ &rsquo;Decimal variable&rsquo;.<BR>&nbsp; WRITE dec1 to gv_char1.<BR>&nbsp; WRITE:/ &rsquo;WRITE TO &rsquo;, gv_char1.<BR> <BR>&nbsp; MOVE dec1 to gv_char2.<BR>&nbsp; WRITE:/ &rsquo;MOVE TO &rsquo;, gv_char2.</PRE><p></BLOCKQUOTE></p>
<blockquote><p>
<P>The output is: <BR><IMG height="128" alt="img142" hspace="0" src="http://www.howforge.com/files/img142.png" width="247" align="bottom" border="1"></P><br />
<P>MOVE ... TO collect result of value like structure in SAP but WRITE ... TO collect result of value as output display.</P></p>
<PRE>As above:<BR><STRONG><U>TYPE</U>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <U>Structure in SAP</U>       <U>Output Display</U></STRONG><BR>D               YYYYMMDD              DD.MM.YYYY<BR>P               999999.99             999.999,99</PRE><p></BLOCKQUOTE>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></p>
    ]]></content>
  </entry>
  <entry>
    <title>ABAP/4 Example Code: ALV Grid Control by applying object CL_GUI_ALV_GRID</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/abap-4-example-code-alv-grid-control-by-applying-object-cl-gui-alv-grid" />
    <id>http://www.howforge.com/abap-4-example-code-alv-grid-control-by-applying-object-cl-gui-alv-grid</id>
    <published>2006-02-20T15:47:53+07:00</published>
    <updated>2006-02-20T15:49:19+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>Create ZPROGRAM and create normal screen no. 100 under this program. And in screen 100, please create custom control name ’CUSTOM1’.</P><br />
<P><STRONG><U>Example</U></STRONG></P></p>
<blockquote>
<PRE>*** <STRONG>ZPROGRAM CODING</STRONG> ***<BR><BR>DATA: save_ok LIKE sy-ucomm,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ok_code LIKE sy-ucomm,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it_spfli TYPE TABLE OF spfli WITH HEADER LINE.<BR> <BR>DATA: G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GRID1&nbsp; TYPE REF TO CL_GUI_ALV_GRID,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it_cat TYPE LVC_T_FCAT,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa_cat TYPE LVC_S_FCAT.<BR> <BR>START-OF-SELECTION.<BR>&nbsp; SELECT * FROM spfli<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTO TABLE it_spfli.<BR>&nbsp; CALL SCREEN 100.<BR> <BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module&nbsp; STATUS_0100&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>MODULE STATUS_0100 OUTPUT.<BR>&nbsp; SET PF-STATUS &rsquo;100&rsquo;.<BR>&nbsp; SET TITLEBAR &rsquo;100&rsquo;.<BR>ENDMODULE.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " STATUS_0100&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module&nbsp; USER_COMMAND_0100&nbsp; INPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>MODULE USER_COMMAND_0100 INPUT.<BR>&nbsp; save_ok = ok_code.<BR>&nbsp; clear ok_code.<BR>&nbsp; CASE save_ok.<BR>&nbsp;&nbsp;&nbsp; WHEN &rsquo;BACK&rsquo;.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEAVE TO SCREEN 0.<BR>&nbsp; ENDCASE.<BR>ENDMODULE.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " USER_COMMAND_0100&nbsp; INPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module&nbsp; INITIAL_GRID&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>MODULE INITIAL_GRID OUTPUT.<BR>&nbsp; PERFORM create_field_catalog.<BR>&nbsp; PERFORM create_grid_control.<BR>ENDMODULE.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " INITIAL_GRID&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Form&nbsp; create_field_catalog<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>*&nbsp; --&gt;&nbsp; p1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*&nbsp; &lt;--&nbsp; p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>FORM create_field_catalog .<BR>&nbsp; IF it_cat[] is initial.<BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 1.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CARRID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 2.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CONNID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;NUMC&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;N&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 5.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 6.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR>&nbsp; ENDIF.<BR>ENDFORM.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " create_field_catalog<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Form&nbsp; create_grid_control<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>*&nbsp; --&gt;&nbsp; p1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*&nbsp; &lt;--&nbsp; p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>FORM create_grid_control .<BR>&nbsp; IF G_CUSTOM_CONTAINER1 is initial .<BR>&nbsp;&nbsp;&nbsp; CREATE OBJECT G_CUSTOM_CONTAINER1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPORTING CONTAINER_NAME = &rsquo;CUSTOM1&rsquo;.<BR>&nbsp;&nbsp;&nbsp; CREATE OBJECT GRID1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.<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>&nbsp; ENDIF.<BR>ENDFORM.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " create_grid_control </PRE><PRE>*** <STRONG>FLOW LOGIC ON SCREEN 100</STRONG> ***<BR>PROCESS BEFORE OUTPUT.<BR>&nbsp; MODULE STATUS_0100.<BR>&nbsp; MODULE INITIAL_GRID.<BR>*<BR>PROCESS AFTER INPUT.<BR>&nbsp; MODULE USER_COMMAND_0100.</PRE><p></BLOCKQUOTE></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>Create ZPROGRAM and create normal screen no. 100 under this program. And in screen 100, please create custom control name ’CUSTOM1’.</P><br />
<P><STRONG><U>Example</U></STRONG></P></p>
<blockquote>
<PRE>*** <STRONG>ZPROGRAM CODING</STRONG> ***<BR><BR>DATA: save_ok LIKE sy-ucomm,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ok_code LIKE sy-ucomm,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it_spfli TYPE TABLE OF spfli WITH HEADER LINE.<BR> <BR>DATA: G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GRID1&nbsp; TYPE REF TO CL_GUI_ALV_GRID,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it_cat TYPE LVC_T_FCAT,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wa_cat TYPE LVC_S_FCAT.<BR> <BR>START-OF-SELECTION.<BR>&nbsp; SELECT * FROM spfli<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INTO TABLE it_spfli.<BR>&nbsp; CALL SCREEN 100.<BR> <BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module&nbsp; STATUS_0100&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>MODULE STATUS_0100 OUTPUT.<BR>&nbsp; SET PF-STATUS &rsquo;100&rsquo;.<BR>&nbsp; SET TITLEBAR &rsquo;100&rsquo;.<BR>ENDMODULE.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " STATUS_0100&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module&nbsp; USER_COMMAND_0100&nbsp; INPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>MODULE USER_COMMAND_0100 INPUT.<BR>&nbsp; save_ok = ok_code.<BR>&nbsp; clear ok_code.<BR>&nbsp; CASE save_ok.<BR>&nbsp;&nbsp;&nbsp; WHEN &rsquo;BACK&rsquo;.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEAVE TO SCREEN 0.<BR>&nbsp; ENDCASE.<BR>ENDMODULE.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " USER_COMMAND_0100&nbsp; INPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module&nbsp; INITIAL_GRID&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>MODULE INITIAL_GRID OUTPUT.<BR>&nbsp; PERFORM create_field_catalog.<BR>&nbsp; PERFORM create_grid_control.<BR>ENDMODULE.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " INITIAL_GRID&nbsp; OUTPUT<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Form&nbsp; create_field_catalog<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>*&nbsp; --&gt;&nbsp; p1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*&nbsp; &lt;--&nbsp; p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>FORM create_field_catalog .<BR>&nbsp; IF it_cat[] is initial.<BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 1.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CARRID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Airline Code&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 2.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CONNID&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;NUMC&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;N&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Flight Conn. No&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Dep. city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 4.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPFROM&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Dep. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 5.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;CITYTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 20.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Arrival city&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR> <BR>&nbsp;&nbsp;&nbsp; clear wa_cat.<BR>&nbsp;&nbsp;&nbsp; wa_cat-col_pos&nbsp;&nbsp; = 6.<BR>&nbsp;&nbsp;&nbsp; wa_cat-fieldname = &rsquo;AIRPTO&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-datatype&nbsp; = &rsquo;CHAR&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-inttype&nbsp;&nbsp; = &rsquo;C&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-intlen&nbsp;&nbsp;&nbsp; = 3.<BR>&nbsp;&nbsp;&nbsp; wa_cat-reptext&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; wa_cat-coltext&nbsp;&nbsp; = &rsquo;Dest. airport&rsquo;.<BR>&nbsp;&nbsp;&nbsp; append wa_cat to it_cat.<BR>&nbsp; ENDIF.<BR>ENDFORM.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " create_field_catalog<BR>*&amp;---------------------------------------------------------------------*<BR>*&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Form&nbsp; create_grid_control<BR>*&amp;---------------------------------------------------------------------*<BR>*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>*&nbsp; --&gt;&nbsp; p1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*&nbsp; &lt;--&nbsp; p2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text<BR>*----------------------------------------------------------------------*<BR>FORM create_grid_control .<BR>&nbsp; IF G_CUSTOM_CONTAINER1 is initial .<BR>&nbsp;&nbsp;&nbsp; CREATE OBJECT G_CUSTOM_CONTAINER1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPORTING CONTAINER_NAME = &rsquo;CUSTOM1&rsquo;.<BR>&nbsp;&nbsp;&nbsp; CREATE OBJECT GRID1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.<BR> <BR>&nbsp;&nbsp;&nbsp; CALL METH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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; " create_grid_control </PRE><PRE>*** <STRONG>FLOW LOGIC ON SCREEN 100</STRONG> ***<BR>PROCESS BEFORE OUTPUT.<BR>&nbsp; MODULE STATUS_0100.<BR>&nbsp; MODULE INITIAL_GRID.<BR>*<BR>PROCESS AFTER INPUT.<BR>&nbsp; MODULE USER_COMMAND_0100.</PRE><p></BLOCKQUOTE></p>
<blockquote><p>
<P>The output is:<BR><IMG height="319" alt="img141" hspace="0" src="http://www.howforge.com/files/img141.png" width="400" align="bottom" border="1"></P></BLOCKQUOTE><br />
<P dir="ltr">Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A>&nbsp;</P></p>
    ]]></content>
  </entry>
  <entry>
    <title>How to insert variable in text element in SAP smartforms</title>
    <link rel="alternate" type="text/html" href="http://www.howforge.com/how-to-insert-variable-in-text-element-in-sap-smartforms" />
    <id>http://www.howforge.com/how-to-insert-variable-in-text-element-in-sap-smartforms</id>
    <published>2006-02-20T12:52:50+07:00</published>
    <updated>2006-02-20T12:52:51+07:00</updated>
    <author>
      <name>thitima</name>
    </author>
    <category term="ABAP/4" />
    <category term="English" />
    <category term="IT" />
    <category term="Programming" />
    <summary type="html"><![CDATA[<p><P>After we <A href="http://www.howforge.com/how-to-insert-text-element-in-sap-smartforms" target="_self">insert text element in SAP smartforms</A>, the inserted text element can contain variable. We will introduce step by step to insert variable&nbsp;in text element.</P><br />
<P><STRONG><U>Step by Step</U></STRONG></P><br />
<UL><br />
<LI>Double click&nbsp;text element that you want to insert variable in left tree navigator.<BR><IMG height="311" alt="img120" hspace="0" src="http://www.howforge.com/files/img120.png" width="401" align="bottom" border="1"><BR>In the example, i selected text element name &rsquo;TEXT1&rsquo;.<BR></LI></p>
    ]]></summary>
    <content type="html"><![CDATA[<p><P>After we <A href="http://www.howforge.com/how-to-insert-text-element-in-sap-smartforms" target="_self">insert text element in SAP smartforms</A>, the inserted text element can contain variable. We will introduce step by step to insert variable&nbsp;in text element.</P><br />
<P><STRONG><U>Step by Step</U></STRONG></P><br />
<UL><br />
<LI>Double click&nbsp;text element that you want to insert variable in left tree navigator.<BR><IMG height="311" alt="img120" hspace="0" src="http://www.howforge.com/files/img120.png" width="401" align="bottom" border="1"><BR>In the example, i selected text element name &rsquo;TEXT1&rsquo;.<BR></LI><br />
<LI>We can&nbsp;insert&nbsp;variable to editor by &nbsp;select <IMG height="19" alt="img121" hspace="0" src="http://www.howforge.com/files/img121.png" width="21" align="bottom" border="1">&nbsp;and input variable in popup screen.<BR><IMG height="85" alt="img122" hspace="0" src="http://www.howforge.com/files/img122.png" width="305" align="bottom" border="1"><BR><BR><IMG height="86" alt="img123" hspace="0" src="http://www.howforge.com/files/img123.png" width="304" align="bottom" border="1"><BR>In the example, i have variable name &rsquo;FNAME&rsquo; and i want to insert it to editor. The inserted variable name should&nbsp;have start and end&nbsp;character by &rsquo;&amp;&rsquo;.&nbsp;<BR></LI><br />
<LI>After you completely input information, you can select <IMG height="21" alt="img124" hspace="0" src="http://www.howforge.com/files/img124.png" width="18" align="bottom" border="1">&nbsp;for insert the selected variable to editor. System will back to editor and show inserted variable to it.<BR><IMG height="270" alt="img125" hspace="0" src="http://www.howforge.com/files/img125.png" width="402" align="bottom" border="1"><BR>Be careful, Don&rsquo;t input variable name&nbsp;directly in editor because system will assume that the variable name is a default text.<BR></LI><br />
<LI>Or you can input variable by select&nbsp;&nbsp;<IMG height="21" alt="img129" hspace="0" src="http://www.howforge.com/files/img129.png" width="19" align="bottom" border="1">&nbsp;in General Attributes tab. System will show editor as SAPscript editor.<BR><IMG height="317" alt="img130" hspace="0" src="http://www.howforge.com/files/img130.png" width="399" align="bottom" border="1"><BR><BR><IMG height="223" alt="img131" hspace="0" src="http://www.howforge.com/files/img131.png" width="404" align="bottom" border="1"><BR></LI><br />
<LI>You able input variable as SAPscript syntax and back to smartforms navigator.<BR><IMG height="23" alt="img132" hspace="0" src="http://www.howforge.com/files/img132.png" width="328" align="bottom" border="1"><BR><BR><IMG height="204" alt="img133" hspace="0" src="http://www.howforge.com/files/img133.png" width="401" align="bottom" border="1"><BR></LI><br />
<LI>Or you can drag and drop field by open field list navigator (Select <IMG height="18" alt="img134" hspace="0" src="http://www.howforge.com/files/img134.png" width="18" align="bottom" border="1">).<BR><IMG height="280" alt="img136" hspace="0" src="http://www.howforge.com/files/img136.png" width="401" align="bottom" border="1"><BR></LI><br />
<LI>Select field that you want to add to editor and drag and drop to editor.<BR><IMG height="284" alt="img140" hspace="0" src="http://www.howforge.com/files/img140.png" width="400" align="bottom" border="1"><BR><BR><IMG height="204" alt="img133" hspace="0" src="http://www.howforge.com/files/img133.png" width="401" align="bottom" border="1"><BR></LI><br />
<LI>You can delete this variable by select variable and press <IMG height="18" alt="img126" hspace="0" src="http://www.howforge.com/files/img126.png" width="20" align="bottom" border="1">. System will delete the selected variable from the editor.</LI><br />
<LI>You can modify this variable by select variable and press <IMG height="16" alt="img127" hspace="0" src="http://www.howforge.com/files/img127.png" width="19" align="bottom" border="1">. System will popup screen for modify the selected variable.<BR><IMG height="88" alt="img128" hspace="0" src="http://www.howforge.com/files/img128.png" width="308" align="bottom" border="1"><BR></LI><br />
<LI>The output is:<BR><IMG height="212" alt="img139" hspace="0" src="http://www.howforge.com/files/img139.png" width="403" align="bottom" border="1"></LI></UL><br />
<P>Technorati Tags: <A href="http://www.technorati.com/tag/ABAP" rel="tag">ABAP</A>, <A href="http://www.technorati.com/tag/SAP" rel="tag">SAP</A></P></p>
    ]]></content>
  </entry>
</feed>
