<?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 Work with specific fields, based on user input in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047834#M1501618</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 am extracting all data from table FMGLFLEXT. First, I will go in and extract data for the year that the user has entered on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the user will also enter the prior period &amp;amp; current period. These periods have to do with the fields between TSL01 and TSL16. For example, if the user enters 2 and 7, I should only work with data between fields TSL02 and TSL07. &lt;/P&gt;&lt;P&gt;How is this possible? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jul 2010 03:15:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-12T03:15:47Z</dc:date>
    <item>
      <title>Work with specific fields, based on user input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047834#M1501618</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 am extracting all data from table FMGLFLEXT. First, I will go in and extract data for the year that the user has entered on the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the user will also enter the prior period &amp;amp; current period. These periods have to do with the fields between TSL01 and TSL16. For example, if the user enters 2 and 7, I should only work with data between fields TSL02 and TSL07. &lt;/P&gt;&lt;P&gt;How is this possible? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 03:15:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047834#M1501618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T03:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Work with specific fields, based on user input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047835#M1501619</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;This question is more generic. Please provide us with additional detials on your requirements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 03:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047835#M1501619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T03:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Work with specific fields, based on user input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047836#M1501620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure how much more detail I can provide. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user enters the prior period, current period &amp;amp; year on the selection screen. Maybe the account number as well, but that field has no impact on this issue.&lt;/P&gt;&lt;P&gt;I have to get the information from the table based on what the user has entered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, each period is its own field - TSL01 is period 1, TSL02 is period 2 and so on. So if the user enters prior period 2 and current period 7, I can only work with the fields between TSL02 and TSL07. How do I code and tell sap to only work with those fields that refer to the period the user has entered?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 03:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047836#M1501620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T03:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Work with specific fields, based on user input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047837#M1501621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on the selection screen, you will have to build dynamic where clause. Here is an some examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.abapcode.info/2007/12/how-to-use-dynamic-sql-in-abap-report.html" target="test_blank"&gt;http://www.abapcode.info/2007/12/how-to-use-dynamic-sql-in-abap-report.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.howforge.com/dynamic-where-clause-in-abap-4" target="test_blank"&gt;http://www.howforge.com/dynamic-where-clause-in-abap-4&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 03:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047837#M1501621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T03:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Work with specific fields, based on user input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047838#M1501622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you but can you explain how to use the dynamic where clause to solve my issue. I don't understand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 03:41:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047838#M1501622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T03:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Work with specific fields, based on user input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047839#M1501623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry, I misunderstand your question. you can use field symbols to get the fields. You will have to use a similar logic like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lv_inc TYPE n LENGTH 2.

  PARAMETERS: prior_period TYPE n LENGTH 2 value '02',
              current_period TYPE n LENGTH 2 value '07'.

DATA: &amp;lt;fs_field&amp;gt; TYPE any.
data: lv_field type string.

  SELECT * INTO TABLE lt_fmglflext FROM fmglflext.

  lv_inc = prior_period.

loop at lt_fmglflext.
  DO.
    lv_inc = lv_inc + 1.
    IF lv_inc &amp;gt; current_period.
      EXIT.
    ENDIF.
    CONCATENATE 'LT_FMGLFLEXT-TSL' lv_inc INTO lv_field.
    ASSIGN (lv_field) TO &amp;lt;fs_field&amp;gt;.  "&amp;lt;&amp;lt; Contains the vaue LT_FMGLFLEXT-TSL02, LT_FMGLFLEXT-TSL03 and so on
  ENDDO.

  lv_inc = prior_period.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramesh Kumar Pampapathi on Jul 12, 2010 6:24 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 04:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/work-with-specific-fields-based-on-user-input/m-p/7047839#M1501623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-12T04:21:42Z</dc:date>
    </item>
  </channel>
</rss>

