<?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 PERFORM statement in SAP script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004197#M408341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have defined Perform statement in sap script as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_VBLNR&amp;amp; = &amp;amp;REGUH-VBLNR&amp;amp;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_GJAHR&amp;amp; = &amp;amp;REGUH-ZALDT&amp;amp;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_ZBUKR&amp;amp; = &amp;amp;REGUH-ZBUKR&amp;amp;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_CHECT&amp;amp; = *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM F_GET_CHEQUE IN PROGRAM ZFFIAP_PMNT_RMTT&lt;/P&gt;&lt;P&gt;USING &amp;amp;V_VBLNR&amp;amp;&lt;/P&gt;&lt;P&gt;USING &amp;amp;V_GJAHR&amp;amp;&lt;/P&gt;&lt;P&gt;USING &amp;amp;V_ZBUKR&amp;amp;&lt;/P&gt;&lt;P&gt;CHANGING &amp;amp;V_CHECT&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;In the program (se38), we have the subroutines defined as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM   F_GET_CHEQUE TABLES input_table  STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;                           output_table STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES PAYR.&lt;/P&gt;&lt;P&gt;  tables REGUH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear  PAYR.&lt;/P&gt;&lt;P&gt;DATA   V_VBLNR(10) TYPE C.&lt;/P&gt;&lt;P&gt;DATA   V_GJAHR(10) TYPE C.&lt;/P&gt;&lt;P&gt;data V_ZBUKR(10) TYPE C.&lt;/P&gt;&lt;P&gt;data v_gjahr_year(4) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE input_table WITH KEY name = 'V_VBLNR'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    V_VBLNR = input_table-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY name = 'V_GJAHR'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    V_GJAHR = input_table-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move v_gjahr+0(4) to v_gjahr_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE input_table WITH KEY name = 'V_ZBUKR'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    V_ZBUKR = input_table-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from PAYR where vblnr = V_VBLNR&lt;/P&gt;&lt;P&gt;   and gjahr = v_gjahr_year and zbukr = V_ZBUKR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    output_table-value = PAYR-CHECT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    output_table-value = ' '.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODIFY output_table&lt;/P&gt;&lt;P&gt;  TRANSPORTING value WHERE name = 'V_CHECT'.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "F_GET_CHEQUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now still the code is unable to retrieve the Cheque Number with the above code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What might be the reason..????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically when user enters the data in F110 screen and clicks Print icon,  the sap script and program will run in background mode.. Then remittance order will get printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even i am unable to debug it due to it's background mechanism....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2007 02:20:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-16T02:20:57Z</dc:date>
    <item>
      <title>PERFORM statement in SAP script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004197#M408341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have defined Perform statement in sap script as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_VBLNR&amp;amp; = &amp;amp;REGUH-VBLNR&amp;amp;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_GJAHR&amp;amp; = &amp;amp;REGUH-ZALDT&amp;amp;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_ZBUKR&amp;amp; = &amp;amp;REGUH-ZBUKR&amp;amp;&lt;/P&gt;&lt;P&gt;DEFINE &amp;amp;V_CHECT&amp;amp; = *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM F_GET_CHEQUE IN PROGRAM ZFFIAP_PMNT_RMTT&lt;/P&gt;&lt;P&gt;USING &amp;amp;V_VBLNR&amp;amp;&lt;/P&gt;&lt;P&gt;USING &amp;amp;V_GJAHR&amp;amp;&lt;/P&gt;&lt;P&gt;USING &amp;amp;V_ZBUKR&amp;amp;&lt;/P&gt;&lt;P&gt;CHANGING &amp;amp;V_CHECT&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;In the program (se38), we have the subroutines defined as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM   F_GET_CHEQUE TABLES input_table  STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;                           output_table STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES PAYR.&lt;/P&gt;&lt;P&gt;  tables REGUH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear  PAYR.&lt;/P&gt;&lt;P&gt;DATA   V_VBLNR(10) TYPE C.&lt;/P&gt;&lt;P&gt;DATA   V_GJAHR(10) TYPE C.&lt;/P&gt;&lt;P&gt;data V_ZBUKR(10) TYPE C.&lt;/P&gt;&lt;P&gt;data v_gjahr_year(4) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE input_table WITH KEY name = 'V_VBLNR'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    V_VBLNR = input_table-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY name = 'V_GJAHR'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    V_GJAHR = input_table-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move v_gjahr+0(4) to v_gjahr_year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE input_table WITH KEY name = 'V_ZBUKR'.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    V_ZBUKR = input_table-value.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from PAYR where vblnr = V_VBLNR&lt;/P&gt;&lt;P&gt;   and gjahr = v_gjahr_year and zbukr = V_ZBUKR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    output_table-value = PAYR-CHECT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    output_table-value = ' '.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MODIFY output_table&lt;/P&gt;&lt;P&gt;  TRANSPORTING value WHERE name = 'V_CHECT'.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "F_GET_CHEQUE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now still the code is unable to retrieve the Cheque Number with the above code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What might be the reason..????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically when user enters the data in F110 screen and clicks Print icon,  the sap script and program will run in background mode.. Then remittance order will get printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even i am unable to debug it due to it's background mechanism....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 02:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004197#M408341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T02:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM statement in SAP script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004198#M408342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your program for reading the table use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY  'V_GJAHR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;checck sy-subrc = 0.&lt;/P&gt;&lt;P&gt;V_GJAHR = input_table-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for out_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY  'V_CHECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;checck sy-subrc = 0.&lt;/P&gt;&lt;P&gt;output_table-value = PAYR-CHECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY output_table index sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 03:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004198#M408342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T03:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM statement in SAP script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004199#M408343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt; Good morning. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;  First of all check in the table whether data exist or not with that where condition. If no data then no cheque number will be diplayed, right? so check the data in table. Even the script was running in back ground job we can debug the script. it is possible. First activate debugger from the script level. after that set the breakpointin the program. Run F110 and enter required input values. Then execute properly. Then script will enter in to debugmode. Hope this helps you. Reply for queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 03:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004199#M408343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T03:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: PERFORM statement in SAP script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004200#M408344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;if it is running in the background than i would suggest you to check wheather the data is passing from driver program to your persorm statement,i think you can debug the driver prograam using \h command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrtyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 03:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-statement-in-sap-script/m-p/2004200#M408344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-16T03:52:27Z</dc:date>
    </item>
  </channel>
</rss>

