<?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 Filling a range with a class. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-a-range-with-a-class/m-p/4075694#M974537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a problem while updating a table.&lt;/P&gt;&lt;P&gt;I had to check several document numbers and later decide if I wanted to update them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As most of them are continous, I created a little algorithm to fill a range accordingly, if is a sole number or a between range which reduced the ammount of entries in the range greatly and solves a problem I had while updating the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to put this in a global class as we are moving to object oriented programming and this type of situation repeats itself in other programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to think of a solution wo would require very little knowledge to other users and with the smallest steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking about this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of non-object oriented programming a method that looked like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
method fill_ranges exporting entry_table "a table with the entries
                                          selection_field "in case is a table with more than one field
                                          flag_ie "Chooses Include or exclude
                            changing range " the range table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In this case I would check if the table range is a range table with the same type as the field in the entry_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, in object oriented programming ranges statement is not allowed, so I was thinking in making a method to pass a data reference to the new table, ask them to create a dynamic table and later use the fill_range method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a decent aproach? I was thinking it was better to have the table as an attribute, but generic types are not allowed, I also know of structure RSPARAMS_TT but I don't want to use a fixed structure, I would only be accepting numbers, probably integers, so 45 should be ennough, but I really want it to work in any possible solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jul 2008 21:32:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-04T21:32:55Z</dc:date>
    <item>
      <title>Filling a range with a class.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-a-range-with-a-class/m-p/4075694#M974537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a problem while updating a table.&lt;/P&gt;&lt;P&gt;I had to check several document numbers and later decide if I wanted to update them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As most of them are continous, I created a little algorithm to fill a range accordingly, if is a sole number or a between range which reduced the ammount of entries in the range greatly and solves a problem I had while updating the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to put this in a global class as we are moving to object oriented programming and this type of situation repeats itself in other programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to think of a solution wo would require very little knowledge to other users and with the smallest steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking about this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of non-object oriented programming a method that looked like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
method fill_ranges exporting entry_table "a table with the entries
                                          selection_field "in case is a table with more than one field
                                          flag_ie "Chooses Include or exclude
                            changing range " the range table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In this case I would check if the table range is a range table with the same type as the field in the entry_table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, in object oriented programming ranges statement is not allowed, so I was thinking in making a method to pass a data reference to the new table, ask them to create a dynamic table and later use the fill_range method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a decent aproach? I was thinking it was better to have the table as an attribute, but generic types are not allowed, I also know of structure RSPARAMS_TT but I don't want to use a fixed structure, I would only be accepting numbers, probably integers, so 45 should be ennough, but I really want it to work in any possible solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 21:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-a-range-with-a-class/m-p/4075694#M974537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T21:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Filling a range with a class.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/filling-a-range-with-a-class/m-p/4075695#M974538</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;I think it is possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can have a generic table in the exporting parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab type STANDARD TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this you can pass any table of type standard to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jul 2008 13:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/filling-a-range-with-a-class/m-p/4075695#M974538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-05T13:31:58Z</dc:date>
    </item>
  </channel>
</rss>

