<?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 a structure based on Selection option field values? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695245#M889747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need an internal table not a structure.  Either count from from the low value to the high value adding a record to the table or select the entries from the Period master table for that selection range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 1&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ZCOUNT.

tables: t009b.

select-options:
  s_period   for t009b-poper no-extension.

data:
  gt_poper type table of poper,
  gs_poper type poper.

start-of-selection.

  move s_period-low to gs_poper.
  while gs_poper le s_period-high.
     append gs_poper to gt_poper.
     add 1 to gs_poper.
  endwhile.

  loop at gt_poper into gs_poper.
    write:/  gs_poper.
  endloop.
  
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 2&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZCOUNT.

tables: t009b.

select-options:
  s_period   for t009b-poper.

data:
  gt_poper type table of poper,
  gs_poper type poper.

start-of-selection.

  select poper
    from t009b
    into table gt_poper
    where bdatj = '2007'
     and poper in s_period.

  loop at gt_poper into gs_poper.
    write:/  gs_poper.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if t009b is the right table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ta... JR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2008 22:10:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-15T22:10:10Z</dc:date>
    <item>
      <title>Create a structure based on Selection option field values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695243#M889745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;             can anybody tell me is ther anyway to creat a strucitre after giving the values to selection screen .I have a req where fiscal period is entered based on this i have to create a structure suppose i he give 3 to 8 then i have to create a strucure with with some fields including period3 period4 like that until Period8 so is there anyway tocreate like that or not?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gopi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 21:41:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695243#M889745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T21:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create a structure based on Selection option field values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695244#M889746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can do this by using the RTTS classes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS cl_abap_structdescr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS-METHODS create&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;p_components TYPE component_table&lt;/P&gt;&lt;P&gt;p_strict TYPE abap_bool DEFAULT abap_true&lt;/P&gt;&lt;P&gt;RETURNING&lt;/P&gt;&lt;P&gt;value(p_result) TYPE REF TO cl_abap_structdescr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 21:48:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695244#M889746</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-04-15T21:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a structure based on Selection option field values?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695245#M889747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need an internal table not a structure.  Either count from from the low value to the high value adding a record to the table or select the entries from the Period master table for that selection range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 1&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  ZCOUNT.

tables: t009b.

select-options:
  s_period   for t009b-poper no-extension.

data:
  gt_poper type table of poper,
  gs_poper type poper.

start-of-selection.

  move s_period-low to gs_poper.
  while gs_poper le s_period-high.
     append gs_poper to gt_poper.
     add 1 to gs_poper.
  endwhile.

  loop at gt_poper into gs_poper.
    write:/  gs_poper.
  endloop.
  
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 2&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZCOUNT.

tables: t009b.

select-options:
  s_period   for t009b-poper.

data:
  gt_poper type table of poper,
  gs_poper type poper.

start-of-selection.

  select poper
    from t009b
    into table gt_poper
    where bdatj = '2007'
     and poper in s_period.

  loop at gt_poper into gs_poper.
    write:/  gs_poper.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if t009b is the right table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ta... JR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2008 22:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-structure-based-on-selection-option-field-values/m-p/3695245#M889747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-15T22:10:10Z</dc:date>
    </item>
  </channel>
</rss>

