Skip to Content
author's profile photo Former Member
Former Member

Regarding dynamic internal table?

Hi All,

I have a requirement which is as follows:

firstly i have an select option where input needs to be given in high and low both (value i am taking from FAGLFLEXT table)

if users enter s_low = 'HSL01' and s_high = 'HSL06' (actually both are columns which we need to pass in select option)

now after giving the input is there any way to get all the complete columns vaue that is HSL01 to HSL06???

Please help me out


Vipin Saraika

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 08, 2014 at 10:29 AM

    The values will always be starting with HSL?

    Add a comment
    10|10000 characters needed characters exceeded

    • tables : faglflext.
      data : lv_fields type string.
      data : i_fagl type table of faglflext.

      data : sopt_low(2) type n,
      sopt_high(2) type n,
      lv_fld type string.

      select-options s_field for ekbe-bwtar OBLIGATORY.
      sopt_high = s_field-high+3(2).
      sopt_low = s_field-low+3(2).

      concatenate 'HSL' sopt_low into lv_fld.
      concatenate lv_fields lv_fld into lv_fields SEPARATED BY space.
      if sopt_high = sopt_low.
      add 1 to sopt_low.

      select (lv_fields) from faglflext into CORRESPONDING FIELDS OF table i_fagl UP TO 10 ROWS.

  • Posted on Jan 08, 2014 at 10:41 AM

    Hi Vipin

    There are various options

    • One is you can fetch all values from FAGLFLEXT and based on use the one which are in range
    • Seconldy before selecting data create a list of fields to be selected in LV_field = 'HSL01 HSL02 etc etc and then use in Select (lv_field) to fetch only those field values
    • A better option would be let use enter only period from 01 to 16 and you concatenate HSL stuff later

    What exactly is the output you want



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.