<?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: Scripts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017081#M412307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2007 08:57:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-16T08:57:07Z</dc:date>
    <item>
      <title>Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017072#M412298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to use subroutines in scripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAyak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:44:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017072#M412298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017073#M412299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write perform in the sapscript window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform perform_name in Zprogram using f1 f2 changing f3 f4.&lt;/P&gt;&lt;P&gt;Endperform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write your Z program in SE38 transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:47:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017073#M412299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017074#M412300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;See the example:&lt;/P&gt;&lt;P&gt;Say if you have to add the unit price (KOMVD-KBERT) then in the main window whereever tat value is picked write this routine &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;TOT_PRICE&amp;amp; &lt;/P&gt;&lt;P&gt;/: PERFORM F_GET_PRICE IN PROGRAM &amp;lt;subroutine prog name&amp;gt; /:USING &amp;amp;KOMVD-KBERT&amp;amp; /:CHANGING &amp;amp;TOT_PRICE&amp;amp; /:ENDPERFORM &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Then write the variable where ever you want it to be printed (mostly it will be in footer window) &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Then create subroutine pool program and you have to write the code. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FORM F_GET_PRICE tables int_cond structure itcsy &lt;/P&gt;&lt;P&gt;                                    outt_cond structure itcsy. data : value type kbert. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;statics   value1 type kbert. &lt;/P&gt;&lt;P&gt;Read int_cond table index 1. &lt;/P&gt;&lt;P&gt;value = int_cond-value. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;value1 = value1 + value. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Read outt_cond table index 1. &lt;/P&gt;&lt;P&gt;outt_cond-value = value1. &lt;/P&gt;&lt;P&gt;Modify outt_cond index 1. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017074#M412300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017075#M412301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer&lt;/P&gt;&lt;P&gt;call a subroutine from sap script&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com//abap/how-to-call-a-subroutine-form-sapscripts.htm" target="test_blank"&gt;http://www.sap-basis-abap.com//abap/how-to-call-a-subroutine-form-sapscripts.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017075#M412301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017076#M412302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Nayak..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Form  in Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:USING &amp;amp;EKKO-EBELN&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:CHANGING &amp;amp;CDECENT&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zkrpmm_perform_z1medruck .&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF it_input_table OCCURS 10.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;DATA : END OF it_input_table.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;déclaration de la table output_table contenant les&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;variables exportées&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF it_output_table OCCURS 0.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;DATA : END OF it_output_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : w_ebeln LIKE ekko-ebeln,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;w_vbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_zcdffa LIKE vbak-zcdffa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORM CDE_CENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FORM cde_cent TABLES input output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_input_table[] = input[].&lt;/P&gt;&lt;P&gt;it_output_table[] = output[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_input_table INDEX 1.&lt;/P&gt;&lt;P&gt;MOVE it_input_table-value TO w_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = w_ebeln&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = w_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE zcdffa FROM ekko&lt;/P&gt;&lt;P&gt;INTO w_zcdffa&lt;/P&gt;&lt;P&gt;WHERE ebeln = w_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_output_table-name = 'CDECENT'.&lt;/P&gt;&lt;P&gt;MOVE w_zcdffa TO it_output_table-value.&lt;/P&gt;&lt;P&gt;MODIFY it_output_table INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output[] = it_output_table[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=638501&amp;amp;messageID=2606221" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=638501&amp;amp;messageID=2606221&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it helps reward with points..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Rk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:48:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017076#M412302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017077#M412303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check these...&lt;/P&gt;&lt;P&gt; &amp;lt;a href="http://help.sap.com/saphelp_erp2005/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm"&amp;gt;http://help.sap.com/saphelp_erp2005/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM statement in program and scripts work in a different way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in reports u can any number of paramters along with ur perform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but with PERFORM in scripts u need to only pass values using 1 structure only - ITCSY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and which ever data you want to pass onto the FORM routine of the it should a passed to the stucture ITCSY.&lt;/P&gt;&lt;P&gt;and the return data from FORM in a external program back to Script should also passed through the structure ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unless and until you declare these output and input structues of your FORM routine as of type ITCSY you cannot pass data back and forth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; regards&lt;/P&gt;&lt;P&gt;ananth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017077#M412303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017078#M412304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines in sap-script is declared in the text editor of the form.&lt;/P&gt;&lt;P&gt;you define like -&lt;/P&gt;&lt;P&gt;/: perform &amp;lt;sub&amp;gt; in program &amp;lt;report&amp;gt;. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;/: using &amp;lt;var1&amp;gt; &lt;/P&gt;&lt;P&gt;/: changing&amp;lt;var2&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the form for this is defined in the called program like you define any other normal subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/sapscript/sapscript_executeabap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pankaj Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Pankaj Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017078#M412304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017079#M412305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to call a subroutine form SAPscripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Form :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:USING &amp;amp;EKKO-EBELN&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:CHANGING &amp;amp;CDECENT&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zkrpmm_perform_z1medruck .&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF it_input_table OCCURS 10.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;DATA : END OF it_input_table.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;déclaration de la table output_table contenant les&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;variables exportées&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF it_output_table OCCURS 0.&lt;/P&gt;&lt;P&gt;INCLUDE STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;DATA : END OF it_output_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : w_ebeln LIKE ekko-ebeln,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;w_vbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_zcdffa LIKE vbak-zcdffa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FORM CDE_CENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FORM cde_cent TABLES input output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_input_table[] = input[].&lt;/P&gt;&lt;P&gt;it_output_table[] = output[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE it_input_table INDEX 1.&lt;/P&gt;&lt;P&gt;MOVE it_input_table-value TO w_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = w_ebeln&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = w_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE zcdffa FROM ekko&lt;/P&gt;&lt;P&gt;INTO w_zcdffa&lt;/P&gt;&lt;P&gt;WHERE ebeln = w_ebeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_output_table-name = 'CDECENT'.&lt;/P&gt;&lt;P&gt;MOVE w_zcdffa TO it_output_table-value.&lt;/P&gt;&lt;P&gt;MODIFY it_output_table INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output[] = it_output_table[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kishore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017079#M412305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017080#M412306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nithari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the subroutines in the follwoing way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Script ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform subroutine_name in program zxyz&lt;/P&gt;&lt;P&gt;using   var1&lt;/P&gt;&lt;P&gt;changing var2&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;endperform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In program zxyz...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form subroutine_name TABLES IN_PAR STUCTURE ITCSY&lt;/P&gt;&lt;P&gt;                                                OUT_PAR STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Satya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:56:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017080#M412306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017081#M412307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:57:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017081#M412307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017082#M412308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Calling ABAP Subroutines: PERFORM  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax in a form window:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: PERFORM &amp;lt;form&amp;gt; IN PROGRAM &amp;lt;prog&amp;gt;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR2&amp;amp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR2&amp;amp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM &amp;lt;form&amp;gt; TABLES IN_TAB STRUCTURE ITCSY&lt;/P&gt;&lt;P&gt;OUT_TAB STRUCTURE ITCSY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (&amp;#145;First page&amp;#146;, &amp;#145;Next page&amp;#146;, &amp;#145;Last page&amp;#146;) is printed as local variable symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition in the SAPscript form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;PAGE&amp;amp;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;NEXTPAGE&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;BARCODE&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/ &amp;amp;BARCODE&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coding of the calling ABAP program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT QCJPERFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_BARCODE 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: PAGNUM LIKE SY-TABIX, "page number &lt;/P&gt;&lt;P&gt;NEXTPAGE LIKE SY-TABIX. "number of next page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IN_PAR WITH KEY &amp;#145;PAGE&amp;#146;.&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;PAGNUM = IN_PAR-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IN_PAR WITH KEY &amp;#145;NEXTPAGE&amp;#146;.&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;NEXTPAGE = IN_PAR-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE OUT_PAR WITH KEY &amp;#145;BARCODE&amp;#146;.&lt;/P&gt;&lt;P&gt;CHECK SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;IF PAGNUM = 1.&lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE = &amp;#145;|&amp;#146;. "First page &lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE = &amp;#145;||&amp;#146;. "Next page &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NEXTPAGE = 0.&lt;/P&gt;&lt;P&gt;OUT_PAR-VALUE+2 = &amp;#145;L&amp;#146;. "Flag: last page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY OUT_PAR INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017082#M412308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T08:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017083#M412309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write perform in the sapscript's text editor.&lt;/P&gt;&lt;P&gt;this perform should be maintained in a subrountine pool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform &amp;lt;perform_name&amp;gt; in &amp;lt;zprogram&amp;gt; using &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt; changing &amp;lt;f3&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the subroutine pool in SE38.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujatha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 09:17:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017083#M412309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T09:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017084#M412310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out the SAPScripts tutorials available at:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechnical.com/Tutorials/SAPScripts/ScriptMain.htm" target="test_blank"&gt;http://www.saptechnical.com/Tutorials/SAPScripts/ScriptMain.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 15:36:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/scripts/m-p/2017084#M412310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T15:36:16Z</dc:date>
    </item>
  </channel>
</rss>

