<?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: PERFORM IN SCRIPT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329811#M512507</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;See the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:PERFORM GET_VAL IN PROGRAM ZGET_VAL&lt;/P&gt;&lt;P&gt;/:USING &amp;amp;IT_MARA-MATNR&amp;amp;&lt;/P&gt;&lt;P&gt;/:CHANGING &amp;amp;DESCR&amp;amp;&lt;/P&gt;&lt;P&gt;/:ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutine code&lt;/P&gt;&lt;P&gt;Form get_val tables in_tab structure itcsy&lt;/P&gt;&lt;P&gt;out_tab structure itcsy.&lt;/P&gt;&lt;P&gt;select * from makt into table it_makt&lt;/P&gt;&lt;P&gt;where matnr = in_tab-value.&lt;/P&gt;&lt;P&gt;data temp(40).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp = it_makt-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;out_tab-name = 'maktx'.&lt;/P&gt;&lt;P&gt;out_tab-value = temp.&lt;/P&gt;&lt;P&gt;append out_tab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if its helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jun 2007 07:21:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-03T07:21:51Z</dc:date>
    <item>
      <title>PERFORM IN SCRIPT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329808#M512504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HAI,&lt;/P&gt;&lt;P&gt;        HOW CAN I USE PERFORM IN SAP SCRIPT.&lt;/P&gt;&lt;P&gt;HOW TO RETURN A VALUE FROM SUBROUTINE AND HOW WILL I PRINT IT IN SCRIPT.&lt;/P&gt;&lt;P&gt;EXPLAIN WITH EXAMPLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANK YOU&lt;/P&gt;&lt;P&gt; ASHOK KUMAR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 06:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329808#M512504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T06:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM IN SCRIPT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329809#M512505</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;You can use it in the following way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the SAP SCRIPT you can write :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform get_address using g_adrnr changing a1 a2 a3 a4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p1 'Address1' &amp;amp;a1&amp;amp; " Prnting it on the output form&lt;/P&gt;&lt;P&gt;P1 'Address2' &amp;amp;a2&amp;amp;&lt;/P&gt;&lt;P&gt;P1 'Address3' &amp;amp;a3&amp;amp;&lt;/P&gt;&lt;P&gt;P1 'Address4' &amp;amp;a4&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P1 is the paragraph in the sap script. YOu can use default paragraph if you wish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;" This will send the g_adrnr to the form. The form will accept g_adrnr and  do the oprtations and return back a1 a2 a3 and a4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a1 a2 a3 and a4 could be 4 fields you fetch from say ADRC table.&lt;/P&gt;&lt;P&gt;form get_address will be in the print program for your sapscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please dont foget to reward if you find it useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reagrds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 06:52:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329809#M512505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T06:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM IN SCRIPT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329810#M512506</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;In the sap script you can call a perform as shown below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform &amp;lt;perform name&amp;gt; In program &amp;lt;program name&amp;gt;  &lt;/P&gt;&lt;P&gt;                                        using &amp;amp;&amp;lt; importing variaable 1&amp;gt;&amp;amp;&lt;/P&gt;&lt;P&gt;                                        changing &amp;amp;&amp;lt;exporting variable 2&amp;gt;&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the subroutine pool &amp;lt;program name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM &amp;lt;perform name&amp;gt; TABLES in_tab STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;                                                 out_tab STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;*Local Variable declaration&lt;/P&gt;&lt;P&gt;  DATA : l_day_name(15) TYPE c,&lt;/P&gt;&lt;P&gt;         l_date TYPE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR in_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;* note that here i am reading with index 1 as there is one variable i have passed *from sap script.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**for no: of variables passed you can read this in_tab as the variables you are **passing will be present in different rows of the table in_tab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; READ TABLE in_tab INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;logic that needs to be implemented for the importing variable.&lt;/P&gt;&lt;P&gt;and say get the value of the output variable in l_day_name.&lt;/P&gt;&lt;P&gt;and append that to out_tab_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     CLEAR out_tab.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*Pass the dayname to the sapscript.&lt;/P&gt;&lt;P&gt;      MOVE l_day_name TO out_tab-value.&lt;/P&gt;&lt;P&gt;      out_tab-name = 'L_DAY_NAME'.&lt;/P&gt;&lt;P&gt;      MODIFY out_tab INDEX 1.&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;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Mohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 07:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329810#M512506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T07:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM IN SCRIPT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329811#M512507</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;See the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/:PERFORM GET_VAL IN PROGRAM ZGET_VAL&lt;/P&gt;&lt;P&gt;/:USING &amp;amp;IT_MARA-MATNR&amp;amp;&lt;/P&gt;&lt;P&gt;/:CHANGING &amp;amp;DESCR&amp;amp;&lt;/P&gt;&lt;P&gt;/:ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutine code&lt;/P&gt;&lt;P&gt;Form get_val tables in_tab structure itcsy&lt;/P&gt;&lt;P&gt;out_tab structure itcsy.&lt;/P&gt;&lt;P&gt;select * from makt into table it_makt&lt;/P&gt;&lt;P&gt;where matnr = in_tab-value.&lt;/P&gt;&lt;P&gt;data temp(40).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp = it_makt-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;out_tab-name = 'maktx'.&lt;/P&gt;&lt;P&gt;out_tab-value = temp.&lt;/P&gt;&lt;P&gt;append out_tab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endform. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward me if its helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 07:21:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-in-script/m-p/2329811#M512507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-03T07:21:51Z</dc:date>
    </item>
  </channel>
</rss>

