<?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: dynamic Ranges in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544926#M578736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes  we can ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RANGES tables&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the following variants of the TYPES and DATA statements to create internal tables of the same type as selection tables.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES|DATA &amp;lt;rangetab&amp;gt; TYPE RANGE OF &amp;lt;type&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES|DATA &amp;lt;rangetab&amp;gt; LIKE RANGE OF &amp;lt;obj&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;This defines internal standard tables whose line type is a structure as follows:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SIGN(1) TYPE C 
OPTION(2) TYPE C 
LOW TYPE &amp;lt;type&amp;gt; bzw. LIKE &amp;lt;obj&amp;gt; 
HIGH TYPE &amp;lt;type&amp;gt; bzw. LIKE &amp;lt;obj&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;This statement is simply a shortened form of the following statements:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF &amp;lt;rangetab&amp;gt; OCCURS 0,
         sign(1) TYPE c,
         option(2) TYPE c,
         low  LIKE &amp;lt;f&amp;gt;,
         high LIKE &amp;lt;f&amp;gt;,
      END OF &amp;lt;rangetab&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;please  seee this  link  @  page no.8&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://"&amp;gt;https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e701051a-0e01-0010-2096-81524fe2f32b&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward  points  if it is  usefull .....&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2007 14:39:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-13T14:39:46Z</dc:date>
    <item>
      <title>dynamic Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544923#M578733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would like to create an internal range table about a table, which Name is in a Field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had create a Table with following Fields:&lt;/P&gt;&lt;P&gt;FALL CHAR10&lt;/P&gt;&lt;P&gt;LFDNR INT2&lt;/P&gt;&lt;P&gt;ZUORD CHAR5&lt;/P&gt;&lt;P&gt;FNAME M_COMB_FNAME&lt;/P&gt;&lt;P&gt;SIGN SIGN&lt;/P&gt;&lt;P&gt;OPTIO OPTION&lt;/P&gt;&lt;P&gt;HIGH HIGH_RANGE&lt;/P&gt;&lt;P&gt;LOW LOW_RANGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first i would like to create an internal range table, about a table which name is standing in the Field FNAME. And if there is a new Tablename in the Field FNAME, than i would like to create a new internal range table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At First to create a Fieldsymbol:&lt;/P&gt;&lt;P&gt;assign (FNAME) to  ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now, to create the new range table.&lt;/P&gt;&lt;P&gt;But How?&lt;/P&gt;&lt;P&gt;there are "create data", but it´s not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then to fill the range table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anybody, who could help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 13:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544923#M578733</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-12T13:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544924#M578734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi see the   below code  ....  all Your   4  steps   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;1.At First to create a Fieldsymbol:&lt;/P&gt;&lt;P&gt;2.then, to identify the typ&lt;/P&gt;&lt;P&gt;3.to create the new range table.&lt;/P&gt;&lt;P&gt;4.to fill the range table...&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS: abap. 


DATA: ls_component   TYPE abap_componentdescr,        "Zeile der Strukturbeschreibung 
      lt_component   TYPE abap_component_tab,         "Tabelle der Strukturbeschreibung 
      lr_strucdescr  TYPE REF TO cl_abap_structdescr, "Referenz auf Datentyp der Struktur 
      lr_tabledescr  TYPE REF TO cl_abap_tabledescr,  "Referenz auf Datentyp der Tabelle 
      lr_data_struct TYPE REF TO data,                "Referenz auf die erzeugte Struktur 
      lr_data_table  TYPE REF TO data,                "Referenz auf die erzeugte Tabelle 
      l_count        TYPE        i.                   "Anzahl Komponenten 

FIELD-SYMBOLS:  &amp;lt;fs_comp&amp;gt;   TYPE ANY,                  "Um auf eine Komponente zu zugreifen 
                &amp;lt;fs_struct&amp;gt; TYPE ANY,                  "Um auf die Struktur zu zugreifen 
                &amp;lt;fs_table&amp;gt;  TYPE ANY TABLE.            "Um auf die Tabelle zu zugreifen 

* (1) identify components required in your dynamic table 
CLEAR ls_component. 
ls_component-name = 'CARRID'. 
ls_component-type ?= cl_abap_typedescr=&amp;gt;describe_by_name( 'SFLIGHT-CARRID' ). 
INSERT ls_component INTO TABLE lt_component. 


CLEAR ls_component. 
ls_component-name = 'CONNID'. 
ls_component-type ?= cl_abap_typedescr=&amp;gt;describe_by_name( 'SFLIGHT-CONNID' ). 
INSERT ls_component INTO TABLE lt_component. 

CLEAR ls_component. 
ls_component-name = 'FLDATE'. 
ls_component-type ?= cl_abap_typedescr=&amp;gt;describe_by_name( 'SFLIGHT-FLDATE' ). 
INSERT ls_component INTO TABLE lt_component. 

* (2) create structure description in accordance to componentdata: 
IF lt_component IS NOT INITIAL. 
  lr_strucdescr = cl_abap_structdescr=&amp;gt;create( lt_component ). 
ENDIF. 

* (3) create table description for structure descriptiondata: 
lr_tabledescr = cl_abap_tabledescr=&amp;gt;create( p_line_type = lr_strucdescr ). 

* (4) create structure and assign 
CREATE DATA lr_data_struct TYPE HANDLE lr_strucdescr. 
ASSIGN lr_data_struct-&amp;gt;* TO &amp;lt;fs_struct&amp;gt;. 

* (5) create table and assign 
CREATE DATA lr_data_table TYPE HANDLE lr_tabledescr. 
ASSIGN lr_data_table-&amp;gt;* TO &amp;lt;fs_table&amp;gt; . 

* (6) fill table (from database) 
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE &amp;lt;fs_table&amp;gt;. 

* (7) output 
l_count = LINES( lt_component ). 

LOOP AT &amp;lt;fs_table&amp;gt; INTO &amp;lt;fs_struct&amp;gt;. 
  DO l_count TIMES. 
    ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_struct&amp;gt; TO &amp;lt;fs_comp&amp;gt;. 
    IF sy-index = 1. 
      WRITE: / &amp;lt;fs_comp&amp;gt;. 
    ELSE. 
      WRITE: &amp;lt;fs_comp&amp;gt;. 
    ENDIF. 
  ENDDO. 

ENDLOOP. "&amp;lt;fs_table&amp;gt;  INTO &amp;lt;fs_struct&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward  points if it is usefull...&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 05:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544924#M578734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T05:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544925#M578735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks four your big help.&lt;/P&gt;&lt;P&gt;Your Answer was very helpfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it´s possible to create a real rangetable (like DATA: variable TYPE RANGE OF TABLE) with this structure (lr_strucdescr or lr_tabledescr) and the structure from any table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 14:04:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544925#M578735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T14:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544926#M578736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes  we can ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;RANGES tables&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the following variants of the TYPES and DATA statements to create internal tables of the same type as selection tables.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES|DATA &amp;lt;rangetab&amp;gt; TYPE RANGE OF &amp;lt;type&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES|DATA &amp;lt;rangetab&amp;gt; LIKE RANGE OF &amp;lt;obj&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;This defines internal standard tables whose line type is a structure as follows:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SIGN(1) TYPE C 
OPTION(2) TYPE C 
LOW TYPE &amp;lt;type&amp;gt; bzw. LIKE &amp;lt;obj&amp;gt; 
HIGH TYPE &amp;lt;type&amp;gt; bzw. LIKE &amp;lt;obj&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;This statement is simply a shortened form of the following statements:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF &amp;lt;rangetab&amp;gt; OCCURS 0,
         sign(1) TYPE c,
         option(2) TYPE c,
         low  LIKE &amp;lt;f&amp;gt;,
         high LIKE &amp;lt;f&amp;gt;,
      END OF &amp;lt;rangetab&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;please  seee this  link  @  page no.8&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://"&amp;gt;https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e701051a-0e01-0010-2096-81524fe2f32b&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward  points  if it is  usefull .....&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 14:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544926#M578736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T14:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic Ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544927#M578737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it´s not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES|DATA  have to be a real Table and the Tablename standing in a variable in my case.&lt;/P&gt;&lt;P&gt;And i only know the structure like lr_strucdescr or lr_tabledescr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2007 08:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-ranges/m-p/2544927#M578737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-17T08:22:56Z</dc:date>
    </item>
  </channel>
</rss>

