<?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 Code correction reg. subroutine in sapscript in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738251#M320972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote a subroutine for my modified sapscript program. In that subroutine, I am retrieving price values (vbap-kzwi5) and passing it to the output table like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: zvbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;P&gt;       zposnr LIKE vbap-posnr,&lt;/P&gt;&lt;P&gt;       zkwmeng LIKE vbdpa-kwmeng,&lt;/P&gt;&lt;P&gt;       kzvalue LIKE vbap-kzwi5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_kz TABLES input_par STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;output_par STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;READ TABLE input_par WITH KEY name = 'VBDKA-VBELN' .&lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY name = 'VBDPA-POSNR' &lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zposnr.&lt;/P&gt;&lt;P&gt;&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  = zvbeln&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    output = zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE kzwi5 kwmeng FROM vbap&lt;/P&gt;&lt;P&gt;  INTO (kzvalue, zkwmeng) WHERE vbeln = zvbeln&lt;/P&gt;&lt;P&gt;  AND posnr = zposnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MOVE: 'KZ' TO output_par-name.&lt;/P&gt;&lt;P&gt; MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;  APPEND output_table .&lt;/P&gt;&lt;P&gt;  CLEAR 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;&lt;/P&gt;&lt;P&gt;Now my question is - Tthe output_par-value is still not getting the value of kzvalue when I debugged the program even after 'Move' statement. Can you please look at it and tell me the necessary code correction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Dec 2006 16:03:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-14T16:03:31Z</dc:date>
    <item>
      <title>Code correction reg. subroutine in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738251#M320972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote a subroutine for my modified sapscript program. In that subroutine, I am retrieving price values (vbap-kzwi5) and passing it to the output table like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: zvbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;P&gt;       zposnr LIKE vbap-posnr,&lt;/P&gt;&lt;P&gt;       zkwmeng LIKE vbdpa-kwmeng,&lt;/P&gt;&lt;P&gt;       kzvalue LIKE vbap-kzwi5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_kz TABLES input_par STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;output_par STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;READ TABLE input_par WITH KEY name = 'VBDKA-VBELN' .&lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY name = 'VBDPA-POSNR' &lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zposnr.&lt;/P&gt;&lt;P&gt;&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  = zvbeln&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    output = zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE kzwi5 kwmeng FROM vbap&lt;/P&gt;&lt;P&gt;  INTO (kzvalue, zkwmeng) WHERE vbeln = zvbeln&lt;/P&gt;&lt;P&gt;  AND posnr = zposnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MOVE: 'KZ' TO output_par-name.&lt;/P&gt;&lt;P&gt; MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;  APPEND output_table .&lt;/P&gt;&lt;P&gt;  CLEAR 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;&lt;/P&gt;&lt;P&gt;Now my question is - Tthe output_par-value is still not getting the value of kzvalue when I debugged the program even after 'Move' statement. Can you please look at it and tell me the necessary code correction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 16:03:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738251#M320972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T16:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Code correction reg. subroutine in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738252#M320973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how is this moving to out put_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;APPEND output_table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append output_par.     "chk this table ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then append output_par to output_table ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this the one missing .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 16:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738252#M320973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T16:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Code correction reg. subroutine in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738253#M320974</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;Check the changes..Marked in bold..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_kz TABLES input_par STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;output_par STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;READ TABLE input_par WITH KEY name = 'VBDKA-VBELN' .&lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE &amp;lt;b&amp;gt;input_par&amp;lt;/b&amp;gt; WITH KEY name = 'VBDPA-POSNR' &lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zposnr.&lt;/P&gt;&lt;P&gt;&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 = zvbeln&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;READ TABLE output_par index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE kzwi5 kwmeng FROM vbap&lt;/P&gt;&lt;P&gt;INTO (kzvalue, zkwmeng) WHERE vbeln = zvbeln&lt;/P&gt;&lt;P&gt;AND posnr = zposnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*MOVE: 'KZ' TO output_par-name.   "commented this line&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MODIFY output_par INDEX 1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;*CLEAR output_table.  " commented this line&amp;lt;/b&amp;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;&lt;/P&gt;&lt;P&gt;Sapscript.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;&lt;P&gt;This is how you should be calling the subroutine in your sapscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;V_VALUE&amp;amp; := ' '&lt;/P&gt;&lt;P&gt;/: PERFORM get_kz IN PROGRAM ZREPORT&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;VBDKA-VBELN&amp;amp;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;VBDPA-POSNR&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;V_VALUE&amp;amp;&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P1  The sub total value us &amp;amp;V_VALUE&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 16:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738253#M320974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T16:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Code correction reg. subroutine in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738254#M320975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code shud be of the form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE output_par WITH KEY name = 'VBDKA-VBELN' .&lt;/P&gt;&lt;P&gt;MOVE: 'KZ' TO output_par-name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE output_par WITH KEY name = 'VBDPA-POSNR' &lt;/P&gt;&lt;P&gt;MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;append output_par.&lt;/P&gt;&lt;P&gt;clear output_par.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Viky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 16:16:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738254#M320975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T16:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Code correction reg. subroutine in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738255#M320976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you do following changes and check if the kzvalue is getting populated with some value after the 'select' from vbap table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_kz TABLES input_par STRUCTURE itcsy&lt;/P&gt;&lt;P&gt;output_par STRUCTURE itcsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: zvbeln LIKE vbak-vbeln,&lt;/P&gt;&lt;P&gt;zposnr LIKE vbap-posnr,&lt;/P&gt;&lt;P&gt;zkwmeng LIKE vbdpa-kwmeng,&lt;/P&gt;&lt;P&gt;kzvalue LIKE vbap-kzwi5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_par WITH KEY name = 'VBELN' .&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE input_table WITH KEY name = 'POSNR' &lt;/P&gt;&lt;P&gt; check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE input_par-value TO zposnr.&lt;/P&gt;&lt;P&gt;&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 = zvbeln&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = zvbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE kzwi5 kwmeng FROM vbap&lt;/P&gt;&lt;P&gt;INTO (kzvalue, zkwmeng) WHERE vbeln = zvbeln&lt;/P&gt;&lt;P&gt;AND posnr = zposnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; read table output_par with key name = 'KZ'.&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;output_par-value = kzvalue.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify output_par transporting value&lt;/P&gt;&lt;P&gt;                        where name = 'KZ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Comment out below code&lt;/P&gt;&lt;P&gt;*MOVE: 'KZ' TO output_par-name.&lt;/P&gt;&lt;P&gt;*MOVE: kzvalue TO output_par-value.&lt;/P&gt;&lt;P&gt;*APPEND output_table .&lt;/P&gt;&lt;P&gt;*CLEAR 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;Also change your piece of code in sapscript as follows:&lt;/P&gt;&lt;P&gt;/: PERFORM get_kz in program zpgmname &lt;/P&gt;&lt;P&gt;/: using &amp;amp;VBELN&amp;amp;&lt;/P&gt;&lt;P&gt;/: using &amp;amp;POSNR$&lt;/P&gt;&lt;P&gt;/: changing &amp;amp;KZ&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will give you an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward for helpful replies!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 16:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738255#M320976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T16:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Code correction reg. subroutine in sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738256#M320977</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;Please reward points for helpful answers and close the thread if the problem is solved..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 18:14:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/code-correction-reg-subroutine-in-sapscript/m-p/1738256#M320977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-14T18:14:26Z</dc:date>
    </item>
  </channel>
</rss>

