<?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: DONT GET THE VALUE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303282#M159198</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;To call ABAP subroutines from within  a form we use the PERFORM... IN PROGRAM ... statement , the advantage of using it  is that the print program is not required to cahnge and we can get the new data from the subroutine which is placed in a Z report . To pass and get the values from th subroutine the parameters are passed which are of  type structure ITCSY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;     e.g. /:PERFORM get_date IN PROGRAM zreport 
            /:USING &amp;amp;SALESORDER&amp;amp;
            /:CHANGING &amp;amp;S_DATE&amp;amp;
            /:ENDPERFORM   
            The date &amp;amp;S_DATE&amp;amp; ....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;The  ABAP Code would be&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zreport.
TABLES ztab.
 
FORM get_date TABLES in_tab STRUCTURE ITCSY out_tab 
STRUCTURE ITCSY .
 
READ TABLE in_tab INDEX 1.
SELECT some_date FROM ztab WHERE salesorder = in_tab-value.
 
IF sy-subrc EQ 0.
READ TABLE out-tab INDEX 1.
MOVE ztab-somedate TO out_tab-value
MODIFY out_tab INDEX 1.
ENDIF.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            In the above code USING is used to pass the value to the subroutine while changing is used to recieve the value from the subroutine ,for further paramters we can use either USING or CHANGING .&lt;/P&gt;&lt;P&gt;  In the subroutine the type of paramter is always an internal table of type ITCSY  irrespective of the value passed.The VALUE field of the internal table is used to fill and recieve the values   .      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this for more info&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/sapfans/forum/r2all/messages/181.html" target="test_blank"&gt;http://www.sapfans.com/sapfans/forum/r2all/messages/181.html&lt;/A&gt;&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;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 Jun 2006 13:16:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-04T13:16:26Z</dc:date>
    <item>
      <title>DONT GET THE VALUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303280#M159196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IN SAPSCRIPT I GO OUT TO SE38 AND MAKE THIS CODE&lt;/P&gt;&lt;P&gt;BUT I DONT GET THE VALUE INTO OUT_TAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT OUT_TAB.&lt;/P&gt;&lt;P&gt;    CASE  OUT_TAB-NAME.&lt;/P&gt;&lt;P&gt;      WHEN 'KAWRT'.&lt;/P&gt;&lt;P&gt;        &amp;lt;b&amp;gt;OUT_TAB-VALUE = Z_KAWRT&amp;lt;/b&amp;gt; .&lt;/P&gt;&lt;P&gt;the debug enter but dont give the data into OUT_TAB-VALUE  why&amp;gt;??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      WHEN 'KBETR'.&lt;/P&gt;&lt;P&gt;      &amp;lt;b&amp;gt; OUT_TAB-VALUE = Z_KBETR.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;    MODIFY OUT_TAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Jun 2006 13:07:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303280#M159196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-04T13:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: DONT GET THE VALUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303281#M159197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY OUT_TAB index sy-tabix and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Jun 2006 13:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303281#M159197</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-06-04T13:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: DONT GET THE VALUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303282#M159198</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;To call ABAP subroutines from within  a form we use the PERFORM... IN PROGRAM ... statement , the advantage of using it  is that the print program is not required to cahnge and we can get the new data from the subroutine which is placed in a Z report . To pass and get the values from th subroutine the parameters are passed which are of  type structure ITCSY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;     e.g. /:PERFORM get_date IN PROGRAM zreport 
            /:USING &amp;amp;SALESORDER&amp;amp;
            /:CHANGING &amp;amp;S_DATE&amp;amp;
            /:ENDPERFORM   
            The date &amp;amp;S_DATE&amp;amp; ....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;The  ABAP Code would be&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zreport.
TABLES ztab.
 
FORM get_date TABLES in_tab STRUCTURE ITCSY out_tab 
STRUCTURE ITCSY .
 
READ TABLE in_tab INDEX 1.
SELECT some_date FROM ztab WHERE salesorder = in_tab-value.
 
IF sy-subrc EQ 0.
READ TABLE out-tab INDEX 1.
MOVE ztab-somedate TO out_tab-value
MODIFY out_tab INDEX 1.
ENDIF.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            In the above code USING is used to pass the value to the subroutine while changing is used to recieve the value from the subroutine ,for further paramters we can use either USING or CHANGING .&lt;/P&gt;&lt;P&gt;  In the subroutine the type of paramter is always an internal table of type ITCSY  irrespective of the value passed.The VALUE field of the internal table is used to fill and recieve the values   .      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this for more info&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapfans.com/sapfans/forum/r2all/messages/181.html" target="test_blank"&gt;http://www.sapfans.com/sapfans/forum/r2all/messages/181.html&lt;/A&gt;&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;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Jun 2006 13:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303282#M159198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-04T13:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: DONT GET THE VALUE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303283#M159199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put ur breakpoint at the modify statement in the loop.&lt;/P&gt;&lt;P&gt;Check if the modify is being successful.If not then this is the cause of the error.Change it to &lt;/P&gt;&lt;P&gt;modify out_tab index sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you mean to say that OUT_TAB-VALUE = Z_KAWRT itself is not assigning any value then check if Z_KAWRT is populated.If it is populated then the value should be getting passed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Jun 2006 13:17:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dont-get-the-value/m-p/1303283#M159199</guid>
      <dc:creator>nishanthbhandar</dc:creator>
      <dc:date>2006-06-04T13:17:22Z</dc:date>
    </item>
  </channel>
</rss>

