<?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: Create ranges dynamically with unique name in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190424#M1519681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create dynamic tables at runtime. Just search the forum to find out how to do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Aug 2010 09:32:32 GMT</pubDate>
    <dc:creator>kerem_kayacan</dc:creator>
    <dc:date>2010-08-03T09:32:32Z</dc:date>
    <item>
      <title>Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190422#M1519679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement as mentioned below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an internal table ITAB1 containing field names  (say 'BUKRS', 'GJAHR', 'BLART' etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is required to loop in the above internal table ITAB1 and in each iteration define/create a separate range (sign/option/low/high) with a unique name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say in the first iteration i.e. for field BUKRS, it is required to define/create a range R_BUKRS, for the 2nd iteraction i.e. for field GJAHR, it is required to define/create a range R_GJAHR and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share your inputs for the above requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indrajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190422#M1519679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T09:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190423#M1519680</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 sort for the fields you want to use as range.&lt;/P&gt;&lt;P&gt;After sort read the first and last repord and it into the range table ((sign/option/low/high).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:28:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190423#M1519680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T09:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190424#M1519681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create dynamic tables at runtime. Just search the forum to find out how to do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190424#M1519681</guid>
      <dc:creator>kerem_kayacan</dc:creator>
      <dc:date>2010-08-03T09:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190425#M1519682</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 conditional statement "At End of" in side the loop and then upload the data in to range.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190425#M1519682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T09:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190426#M1519683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is not to populate an internal table dynamically, that is simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this requirement demands to define an internal table (with a dynamic name) dynamically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:45:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190426#M1519683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T09:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190427#M1519684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here in each loop pass the field symbol &amp;lt;fs&amp;gt; will act as a range for each field in the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPE-POOLS : abap.

TYPES:BEGIN OF type1,
      matnr TYPE mara-matnr,
      mtart TYPE mara-mtart,
      END OF type1.

DATA : i_details TYPE abap_compdescr_tab,
       wa_comp TYPE abap_compdescr,
       i_tab1 TYPE TABLE OF type1,
       wa_tab1 TYPE type1,
       ref_descr TYPE REF TO cl_abap_structdescr.

FIELD-SYMBOLS:&amp;lt;fs&amp;gt; TYPE table.

DATA:
   lr_sign_descr   TYPE REF TO cl_abap_elemdescr,
   lr_option_descr TYPE REF TO cl_abap_elemdescr,
   lr_value_descr  TYPE REF TO cl_abap_elemdescr,
   lr_struct_descr TYPE REF TO cl_abap_structdescr,
   lr_table_descr  TYPE REF TO cl_abap_tabledescr,
   component       TYPE cl_abap_structdescr=&amp;gt;component,
   lt_components   TYPE cl_abap_structdescr=&amp;gt;component_table,
   rt_range_table TYPE REF TO data.

ref_descr ?= cl_abap_typedescr=&amp;gt;describe_by_data( wa_tab1 ).
i_details[] = ref_descr-&amp;gt;components[].

lr_sign_descr   ?= cl_abap_elemdescr=&amp;gt;describe_by_name( 'DDSIGN' ).
lr_option_descr ?= cl_abap_elemdescr=&amp;gt;describe_by_name( 'DDOPTION' ).

LOOP AT i_details INTO wa_comp.
  CLEAR lt_components[].
  CASE wa_comp-type_kind.
    WHEN 'N'.
      lr_value_descr ?= cl_abap_elemdescr=&amp;gt;get_n( p_length = wa_comp-length ).
    WHEN 'C'.
      lr_value_descr ?= cl_abap_elemdescr=&amp;gt;get_c( p_length = wa_comp-length ).
    WHEN 'X'.
      lr_value_descr ?= cl_abap_elemdescr=&amp;gt;get_x( p_length = wa_comp-length ).
    WHEN 'P'.
      lr_value_descr ?= cl_abap_elemdescr=&amp;gt;get_p( p_length = wa_comp-length p_decimals = wa_comp-decimals ).
    WHEN OTHERS.
      lr_value_descr ?= cl_abap_elemdescr=&amp;gt;describe_by_name( wa_comp-name ).
  ENDCASE.

  component-name = 'SIGN'.
  component-type = lr_sign_descr.
  INSERT component INTO TABLE lt_components.
  component-name = 'OPTION'.
  component-type = lr_option_descr.
  INSERT component INTO TABLE lt_components.
  component-name = 'LOW'.
  component-type = lr_value_descr.
  INSERT component INTO TABLE lt_components.
  component-name = 'HIGH'.
  component-type = lr_value_descr.
  INSERT component INTO TABLE lt_components.

  lr_struct_descr = cl_abap_structdescr=&amp;gt;create( p_components = lt_components p_strict = abap_true ).
  lr_table_descr  = cl_abap_tabledescr=&amp;gt;create( p_line_type = lr_struct_descr ).

  CREATE DATA rt_range_table TYPE HANDLE lr_table_descr.

  ASSIGN rt_range_table-&amp;gt;* TO &amp;lt;fs&amp;gt;.

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 09:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190427#M1519684</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-03T09:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190428#M1519685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it will not solve my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code snippet provided by you will cause the field symbol &amp;lt;fs&amp;gt; changed in each loop pass and point to a different range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after the last loop pass there is no way to access the ranges excpet the one created in last loop iteration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I need separate range names (or pointers) is beacuse I will use the same to populate 'where' clause of a  select statement that gets executed after &lt;/P&gt;&lt;P&gt;the loop is over. So when the select statement gets executed, all the ranges should exist,  else results will be erroneous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indrajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 10:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190428#M1519685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T10:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190429#M1519686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the number of ranges you need specific? If so define as many field-symbols as you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kerem Kayacan on Aug 3, 2010 1:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 10:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190429#M1519686</guid>
      <dc:creator>kerem_kayacan</dc:creator>
      <dc:date>2010-08-03T10:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190430#M1519687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No that is dynamic based on records maintained in a config table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the program I am fetching the records from the config table, so I can find out the number of records in the config table i.e. number of ranges that need to be created dynamically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 10:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190430#M1519687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T10:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190431#M1519688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your internal table dynamic  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No that is dynamic based on records maintained in a config table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the program I am fetching the records from the config table, so I can find out the number of records in the config table i.e. number of ranges that need to be created dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its pretty confusing ... does the internal table data hold the field names or your want to create ranges based on the fields of internal tabe ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 10:14:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190431#M1519688</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-03T10:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190432#M1519689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The internal table ITAB1 is NOT DYNAMIC and is used in the program to store data from a config (database) table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has got 2 fields - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       (1) Field name FNAME (say 'BUKRS','GJAHR','BLART' etc)&lt;/P&gt;&lt;P&gt;       (2) A deep structure VALUES to hold a range for the specified field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am looping in this internal table and in each loop pass I need to do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       (1) Define a new range with an unique name using the deep structure VALUES for the field FNAME&lt;/P&gt;&lt;P&gt;       (2) Form a dynamic where clause for a select - &lt;STRONG&gt;'(fname) IN &amp;lt;range&amp;gt;'&lt;/STRONG&gt; and add to an internal table LT_DYN_COND.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the loop I am using the table LT_DYN_COND for selection from a database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       SELECT * &lt;/P&gt;&lt;P&gt;                    FROM bsad&lt;/P&gt;&lt;P&gt;                    INTO TABLE lt_bsad&lt;/P&gt;&lt;P&gt;                    WHERE  (lt_dyn_cond).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the range name has to different for the different fields in ITAB1 table, else the select statement will not give properly filtered results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 10:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190432#M1519689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T10:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190433#M1519690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this Way it may resolve your Issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_EX_RANGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-&amp;gt; Macro to Create Ranges Dynamically in run time&lt;/P&gt;&lt;P&gt;define d_ranges.&lt;/P&gt;&lt;P&gt;ranges : r_&amp;amp;1 for &amp;amp;2.&lt;/P&gt;&lt;P&gt;end-of-definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-&amp;gt; Call Macro D_RANGES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d_ranges      BUKRS               "&amp;amp;1   "ITAB1-FIELD&lt;/P&gt;&lt;P&gt;                      'T001-BUKRS'.  "&amp;amp;2    "REF FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-&amp;gt; Fill             R_BUKRS    from Internal Table   "ITAB1-Value&lt;/P&gt;&lt;P&gt;r_bukrs-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_bukrs-option = 'EQ'. &lt;/P&gt;&lt;P&gt;r_bukrs-low = '1000'.&lt;/P&gt;&lt;P&gt;append r_bukrs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 13:48:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190433#M1519690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-03T13:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190434#M1519691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Indrajit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keshav has given you the core logic for your requirement. I'll use this as a reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;The reason I need separate range names (or pointers) is beacuse I will use the same to populate 'where' clause of a select statement that gets executed after the loop is over. &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made some adjustments to his code which will help retain the values of the ranges for each loop iteration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_rng TYPE STANDARD TABLE OF REF TO data,
      wa_rng TYPE REF TO data.

LOOP AT i_details INTO wa_comp.

  IF &amp;lt;fs&amp;gt; IS ASSIGNED.
    UNASSIGN &amp;lt;fs&amp;gt;.
  ENDIF.
..........................................
..........................................

  CREATE DATA rt_range_table TYPE HANDLE lr_table_descr.
  ASSIGN rt_range_table-&amp;gt;* TO &amp;lt;fs&amp;gt;.

  APPEND rt_range_table TO it_rng.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&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;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Aug 2010 14:09:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190434#M1519691</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-08-03T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190435#M1519692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just stumbled onto this when searching for a similar need.&amp;nbsp; In my case, I needed to create a subroutine that would check ranges dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you can do something like this and it will work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate 'GR_' p_fieldname '[]' into lv_assign.&lt;/P&gt;&lt;P&gt;assign (lv_assign) to &amp;lt;lfs_rangetab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check itab-field in &amp;lt;lfs_rangetab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found this very helpful that when you dynamically construct a fieldname, if you put the brackets at the end, SAP does in fact interpret it as an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in my case, I defined a bunch of ranges:&lt;/P&gt;&lt;P&gt;ranges:&lt;/P&gt;&lt;P&gt;&amp;nbsp; gr_vkorg&amp;nbsp; for mvke-vkorg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; gr_vtweg for mvke-vtweg,&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in my code, I wanted to make sure my extract was only exporting values which were collected earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I dynamically assigned the fields to the global range tables using this construct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 17:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190435#M1519692</guid>
      <dc:creator>ray_mannion</dc:creator>
      <dc:date>2012-05-07T17:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190436#M1519693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Indrajit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a similar requirement to create a dynamic range table with unique name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to populate the range table and then i have to create a dynamic where clause to fetch data from table dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me how we can approach this requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Suresh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 08:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190436#M1519693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-11-13T08:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create ranges dynamically with unique name</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190437#M1519694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://mysapgw.wordpress.com/2012/01/25/filter-string-how-to/"&gt;https://mysapgw.wordpress.com/2012/01/25/filter-string-how-to/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hate to dig this one up from the grave, but I have the exact requirement.&amp;nbsp; Now I found a solution however it involves creating static tables that I use to uniquely identify my ranges.&amp;nbsp; My need is to have the ranges created dynamically AND be unique.&amp;nbsp; Above is the original solution I found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that a possible solution has been posted by Suhas, but I'm not sure how the itab would make the ranges unique. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Rene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2016 16:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-ranges-dynamically-with-unique-name/m-p/7190437#M1519694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-01-20T16:11:29Z</dc:date>
    </item>
  </channel>
</rss>

