<?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 Reg: Subroutine stmt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119188#M1187291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a code which is standard include RPUAUDFR. Now some part of code in this include is used in my code. I have bit confusion....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* groesste und kleinste PerNr finden:
  PERFORM get_min_max_from_range_tab TABLES persnr USING 'P'
                          CHANGING lowpernr higpernr sy_subrc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the perform, in which they used &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; statement. this is obsolete now. Now i am using like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM get_min_max_from_range_tab USING s_persnr
                                            'P'
                          CHANGING v_lowpernr v_higpernr sy_subrc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and form statement is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM get_min_max_from_range_tab
            USING fp_range_tab STRUCTURE s_DATUM
                                    value(fp_flag)
                               CHANGING fp_min
                                        fp_max
                                        fp_subrc.

  SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
  READ TABLE fp_range_tab INDEX 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this valid statement? If yes, i got this error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"FP_RANGE_TAB" is not an internal table "OCCURS n" specification is missing&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please remember one point all are without header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plase help me in this regard. This delivery date is today. Please help me....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Feb 2009 09:27:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-02T09:27:27Z</dc:date>
    <item>
      <title>Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119188#M1187291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a code which is standard include RPUAUDFR. Now some part of code in this include is used in my code. I have bit confusion....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* groesste und kleinste PerNr finden:
  PERFORM get_min_max_from_range_tab TABLES persnr USING 'P'
                          CHANGING lowpernr higpernr sy_subrc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the perform, in which they used &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; statement. this is obsolete now. Now i am using like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM get_min_max_from_range_tab USING s_persnr
                                            'P'
                          CHANGING v_lowpernr v_higpernr sy_subrc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and form statement is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM get_min_max_from_range_tab
            USING fp_range_tab STRUCTURE s_DATUM
                                    value(fp_flag)
                               CHANGING fp_min
                                        fp_max
                                        fp_subrc.

  SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
  READ TABLE fp_range_tab INDEX 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this valid statement? If yes, i got this error&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"FP_RANGE_TAB" is not an internal table "OCCURS n" specification is missing&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please remember one point all are without header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plase help me in this regard. This delivery date is today. Please help me....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:27:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119188#M1187291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119189#M1187292</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;Use this way...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM get_min_max_from_range_tab
            USING fp_range_tab type BAL_R_DATE       " Change
                                    value(fp_flag)
                               CHANGING fp_min
                                        fp_max
                                        fp_subrc.
  " You need to decalre the work area to access the records because fp_range_tab is table without header line.

DATA : l_range_tab like BAL_S_DATE.        " Add this line

  SORT fp_range_tab BY sign DESCENDING.
* NUR 'E'XCLUDE?
  READ TABLE fp_range_tab INTO l_range_tab INDEX 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Avinash Kodarapu on Feb 2, 2009 3:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119189#M1187292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119190#M1187293</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 try creating a data type in your se11 screen for your table and then create &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type1 TYPE demo_dt "demo_dt-data type name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type1 will have a structure similar to the table now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deepthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119190#M1187293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119191#M1187294</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;When declaring fp_range_tab(formal parameter) in form statement, use a table type in stead of structure s_datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_min_max_from_range_tab&lt;/P&gt;&lt;P&gt;            USING fp_range_tab type ty_DATUM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where ty_datum is a table type of structure s_datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Dwaraka.S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119191#M1187294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119192#M1187295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I used this way, but i got error like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;In PERFORM or CALL FUNCTION "GET_MIN_MAX_FROM_RANGE_TAB", the actual parameter "S_PERSNR" is incompatible with the formal parameter "FP_RANGE_TAB".&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM get_min_max_from_range_tab USING s_persnr[]
                                            'P'
                          CHANGING v_lowpernr v_higpernr sy_subrc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM get_min_max_from_range_tab
            USING fp_range_tab type BAL_R_DATE
                                    value(fp_flag)
                               CHANGING fp_min
                                        fp_max
                                        fp_subrc.
DATA : l_range_tab like BAL_S_DATE.
  CLEAR: fp_subrc.
  SORT fp_range_tab BY sign DESCENDING.
  READ TABLE fp_range_tab INTO l_range_tab INDEX 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me any inputs in this regard..........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:45:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119192#M1187295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119193#M1187296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this exmaple, it is the correct way :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF line,
        col1(1) TYPE c,
        col2(1) TYPE c,
      END OF line.

DATA: wa TYPE line,
      itab TYPE HASHED TABLE OF line WITH UNIQUE KEY col1,
      key(4) TYPE c VALUE 'col1'.

wa-col1 = 'X'. INSERT wa INTO TABLE itab.
wa-col1 = 'Y'. INSERT wa INTO TABLE itab.

PERFORM demo USING itab.

FORM demo USING p_table TYPE ANY TABLE.  " You can give the type here.
  ...
sort p_itab by ....
  READ TABLE p_table index 1
  ...
ENDFORM.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119193#M1187296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119194#M1187297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry it is not working. I does not taking Sign, option, low and high....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:51:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119194#M1187297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-02T09:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119195#M1187298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope this helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;start-of-selection.

data: it_t001 type standard table of t001.

select * into table it_t001 from t001.

perform write_itab using it_t001.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  WRITE_ITAB
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_IT_T001[]  text
*----------------------------------------------------------------------*
form WRITE_ITAB using p_it_t001.

field-symbols: &amp;lt;fs&amp;gt; type standard table.
field-symbols: &amp;lt;fs1&amp;gt; type T001.

assign p_it_t001 TO &amp;lt;fs&amp;gt;.

loop at &amp;lt;fs&amp;gt; ASSIGNING &amp;lt;FS1&amp;gt;.
WRITE: &amp;lt;FS1&amp;gt;-BUKRS.

endloop.

endform.                    " WRITE_ITAB&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;S. Chandramouli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2009 09:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119195#M1187298</guid>
      <dc:creator>former_member784222</dc:creator>
      <dc:date>2009-02-02T09:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Subroutine stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119196#M1187299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2009 15:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-subroutine-stmt/m-p/5119196#M1187299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-11T15:51:06Z</dc:date>
    </item>
  </channel>
</rss>

