<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Writing form routine for SAPscript.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482153#M225458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/: Perform Get_Pack in program ZGET_Pack&lt;/P&gt;&lt;P&gt;/: using &amp;amp;EBELN&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;PACK&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the program ZGET_PACK, You can use the following form statments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_PACK TABLES IN_PAR STUCTURE ITCSY&lt;/P&gt;&lt;P&gt;                      OUT_PAR STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_EBELN LIKE EKKO-EBELN,&lt;/P&gt;&lt;P&gt;      V_PACK(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Reading EBELN value&lt;/P&gt;&lt;P&gt;  READ TABLE IN_PAR WITH KEY &amp;#145;EBELN&amp;#146;.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    V_EBELN = IN_PAR-VALUE.	&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***-- Put your logic to the PACK data and at the end you&lt;/P&gt;&lt;P&gt;***-- need to pass the value of PACK back to the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE OUT_PAR WITH KEY &amp;#145;PACK&amp;#146;.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    OUT_PAR-VALUE  = V_PACK.&lt;/P&gt;&lt;P&gt;    MODIFY OUT_PAR INDEX SY-TABIX.	&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Aug 2006 19:23:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-22T19:23:49Z</dc:date>
    <item>
      <title>Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482147#M225452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to write a perform in SAPscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using EBELN from table ESSR I am supposed to get PACKNO and use that PACKNO field in Sapscript&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: Perform Get_Pack in program ZGET_Pack&lt;/P&gt;&lt;P&gt;/: using &amp;amp;EBELN&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;PACK&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I create program ZGET_PACK with type 'S' in se38 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I write form endform in the 'S' type program for above perform ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 17:26:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482147#M225452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T17:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482148#M225453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you dont have to create it as type 's'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use type 'e'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 17:32:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482148#M225453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T17:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482149#M225454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. But how do I write form-endform for it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 17:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482149#M225454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T17:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482150#M225455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;report something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form get_something.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need to write a start of selection&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 18:45:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482150#M225455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T18:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482151#M225456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The driver program has two parameters of structure of ITCSY.&lt;/P&gt;&lt;P&gt;2) ITCSY structure will take all import and export parameters.&lt;/P&gt;&lt;P&gt;3) ITCSY has two fields with NAME and VALUE.&lt;/P&gt;&lt;P&gt;NAME is the parameter name like 'EBELN' and&lt;/P&gt;&lt;P&gt;VALUE is the value for the parameter you pass to routine for export parameters and is the value you get out of routine for import parameters.&lt;/P&gt;&lt;P&gt;4) FORM...ENDFORM is independent to program type whether it is 'S' or 'E' or '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try as follows for routine in program ZGET_PACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FORM GET_PACK TABLES IT_INPUT STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;                     IT_OUTPUT STRUCTURE ITCSY.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;V_EBELN TYPE ESSR-EBELN,&lt;/P&gt;&lt;P&gt;V_PACK TYPE ESSR-PACKNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_INPUT WITH KEY 'EBELN'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;MOVE IT_INPUT-VALUE TO V_EBELN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*WRITE YOUR QUERY TO GET VALUE OF PACK INTO V_PACK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_OUTPUT WITH KEY 'PACK'.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    MOVE PACK TO IT_OUTPUT-VALUE.&lt;/P&gt;&lt;P&gt;    MODIFY IT_OUTPUT INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ENDFORM.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 19:01:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482151#M225456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T19:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482152#M225457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;all the paramters you pass from SCRIPT with USING command will come into ITAB.&lt;/P&gt;&lt;P&gt;all parameters with CHANGING command will comes into OTAB&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM  Get_Pack TABLES ITAB   STRUCTURE ITCSY
                      OTAB   STRUCTURE ITCSY.
data: v_ebeln type ekko-ebeln.

*--TO read the values from the ITAB you have to use this logic.
  READ TABLE ITAB WITH KEY NAME = 'EBELN'
         TRANSPORTING VALUE.
  IF SY-SUBRC = 0.
    CONDENSE ITAB-VALUE.
    V_EBELN = ITAB-VALUE.
  ENDIF.
*--to modify PACK value
*--write your logic to get the value into V_PACK_VALUE. 
   OTAB-VALUE = V_pack_value.
   condense OTAB-VALUE&amp;gt;
   MODIFY OTAB  TRANSPORTING VALUE 
             WHERE NAME = 'PACK'.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create the program either as Executable or subroutine pool in SE38. there will not be any difference,i guess.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srikanth Kidambi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 19:23:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482152#M225457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T19:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Writing form routine for SAPscript....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482153#M225458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/: Perform Get_Pack in program ZGET_Pack&lt;/P&gt;&lt;P&gt;/: using &amp;amp;EBELN&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;PACK&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the program ZGET_PACK, You can use the following form statments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_PACK TABLES IN_PAR STUCTURE ITCSY&lt;/P&gt;&lt;P&gt;                      OUT_PAR STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_EBELN LIKE EKKO-EBELN,&lt;/P&gt;&lt;P&gt;      V_PACK(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Reading EBELN value&lt;/P&gt;&lt;P&gt;  READ TABLE IN_PAR WITH KEY &amp;#145;EBELN&amp;#146;.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    V_EBELN = IN_PAR-VALUE.	&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***-- Put your logic to the PACK data and at the end you&lt;/P&gt;&lt;P&gt;***-- need to pass the value of PACK back to the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE OUT_PAR WITH KEY &amp;#145;PACK&amp;#146;.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    OUT_PAR-VALUE  = V_PACK.&lt;/P&gt;&lt;P&gt;    MODIFY OUT_PAR INDEX SY-TABIX.	&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Aug 2006 19:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/writing-form-routine-for-sapscript/m-p/1482153#M225458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-22T19:23:49Z</dc:date>
    </item>
  </channel>
</rss>

