Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding dynamic internal table?

Former Member
0 Likes
733

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

Regards,

Vipin Saraika

4 REPLIES 4
Read only

Former Member
0 Likes
658

The values will always be starting with HSL?

Read only

0 Likes
658

ya it will always start from HSL

Read only

0 Likes
658

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).

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

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

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
658

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

Thanks

Nabheet