<?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 Problems with range parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754448#M1303760</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;my problem is that I need a selection mask with a range parameter but without doing this with select-options because under the mask there should appear the SALV Table(in a container).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Report test.

TYPES: gs_matnr TYPE RANGE OF mara-matnr. 
DATA: p_matnr TYPE gs_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method data_select. "selects p_matnr from a table&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method fill_output_list. "fills the results into a SALV Table&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On my Dynpro I created two fields: p_matnr-low and p_matnr-high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user fills out the mask and the parameter will given to data_select method. After that it'll be processed in fill_output_list. Eventually the SALV Table is shown by: "objectreference-&amp;gt;ino_salv_table-&amp;gt;refresh( )" in PAI module .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how to send the range parameter to both methods?&lt;/P&gt;&lt;P&gt;I did following but it doesn't work properly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD objectreference-&amp;gt;data_select
                         IMPORTING 
                         ipf_matnr = p_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuncay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2009 11:55:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-03T11:55:51Z</dc:date>
    <item>
      <title>Problems with range parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754448#M1303760</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;my problem is that I need a selection mask with a range parameter but without doing this with select-options because under the mask there should appear the SALV Table(in a container).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Report test.

TYPES: gs_matnr TYPE RANGE OF mara-matnr. 
DATA: p_matnr TYPE gs_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method data_select. "selects p_matnr from a table&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method fill_output_list. "fills the results into a SALV Table&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On my Dynpro I created two fields: p_matnr-low and p_matnr-high&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user fills out the mask and the parameter will given to data_select method. After that it'll be processed in fill_output_list. Eventually the SALV Table is shown by: "objectreference-&amp;gt;ino_salv_table-&amp;gt;refresh( )" in PAI module .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how to send the range parameter to both methods?&lt;/P&gt;&lt;P&gt;I did following but it doesn't work properly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD objectreference-&amp;gt;data_select
                         IMPORTING 
                         ipf_matnr = p_matnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuncay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 11:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754448#M1303760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T11:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with range parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754449#M1303761</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 this structure SELOPT or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: p_matnr TYPE STATNDARD TABLE OF RANGE_MATNR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 11:59:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754449#M1303761</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T11:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with range parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754450#M1303762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Avinash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your fast response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I implemented your suggestion but it doesn't works because of an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Report test.
 
TYPES: gs_matnr TYPE RANGE OF mara-matnr. 
DATA: p_matnr TYPE STANDARD TABLE OF gs_matnr.
 

CLASS lcl_mat_liste DEFINITION.
  PUBLIC SECTION.
    METHODS: data_select
                         IMPORTING
                              ipf_matnr TYPE gs_matnr,
                      fill_out.
   ENDCLASS.

MODULE status_7000 OUTPUT.
  SET PF-STATUS 'SALV_TABLE_STANDARD'.
  SET TITLEBAR '7000'.

  IF ( go_mat_liste IS INITIAL ).
    CREATE OBJECT go_mat_liste.
  go_mat_liste-&amp;gt;ino_salv_table-&amp;gt;display( ). "Gib erst leere Tabelle aus
  ENDIF.
ENDMODULE.

MODULE user_command_7000 INPUT.
  CASE ok_code.
    WHEN 'BACK' OR 'LEAVE' OR 'EXIT'.
      LEAVE PROGRAM.
    WHEN 'ENTER'.

     CALL METHOD go_mat_liste-&amp;gt;data_select
                 EXPORTING
                  ipf_matnr = p_matnr.   "*ERROR: Data type of ipf_matnr does not fit to p_matnr!* 
      
     CALL METHOD go_mat_liste-&amp;gt;fill_out( ).
     go_mat_liste-&amp;gt;ino_salv_table-&amp;gt;refresh( ).

ENDMODULE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Tuncay Zaya on Jun 3, 2009 2:27 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 12:27:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754450#M1303762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T12:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with range parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754451#M1303763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to specify &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;p_matnr[]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;p_matnr&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because the method is looking for a table, not the header line of the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 17:07:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754451#M1303763</guid>
      <dc:creator>bryan_cain</dc:creator>
      <dc:date>2009-06-03T17:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with range parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754452#M1303764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tuncay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is still an error in your coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: gs_matnr TYPE RANGE OF mara-matnr.  " &amp;lt;&amp;lt;&amp;lt; already a table type w/o header line
DATA: p_matnr TYPE STANDARD TABLE OF gs_matnr.  " &amp;lt;&amp;lt;&amp;lt; presumably complex type

" Better:
TYPES: ty_rng_matnr    TYPE RANGE OF matnr.
DATA:
  gt_rng_matnr               TYPE ty_rng_matnr.

...
CLASS lcl_mat_liste DEFINITION.
  PUBLIC SECTION.
    METHODS: data_select
                         IMPORTING
                              ipf_matnr TYPE ty_rng_matnr,
                      fill_out.
   ENDCLASS.
...
CALL METHOD go_mat_liste-&amp;gt;data_select
                 EXPORTING
                  ipf_matnr = gt_rng_matnr. 
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 20:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754452#M1303764</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-06-03T20:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with range parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754453#M1303765</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;thanks for your solutions but I took another way to solve it.&lt;/P&gt;&lt;P&gt;Now I'm using SUBSCREENS as my Inputfield so I can use SELOPT. So I don't need TYPE RANGE OF or other stuff. SELOPT is building for me ranges of matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Listing: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN BEGIN OF SCREEN 7500 AS SUBSCREEN.
*SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
PARAMETERS: p_lgnum LIKE mlgn-lgnum OBLIGATORY,
            p_werks LIKE mard-werks OBLIGATORY,
            pa_mtart TYPE mtart OBLIGATORY DEFAULT 'ZMB',
            pa_mstav TYPE mstav.
SELECT-OPTIONS p_matnr FOR gs_matnr.
PARAMETERS: pa_meinh TYPE lrmei.

*SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 7500.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS BEFORE OUTPUT.
MODULE STATUS_7000.
CALL SUBSCREEN SELECT INCLUDING sy-repid '7500'.
MODULE SALV_7000.

PROCESS AFTER INPUT.
 CALL SUBSCREEN SELECT.
 MODULE USER_COMMAND_7000.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tuncay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 09:58:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-range-parameter/m-p/5754453#M1303765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T09:58:05Z</dc:date>
    </item>
  </channel>
</rss>

