‎2008 May 26 12:56 PM
Hi,
Can anyone tell me how to convert values in a field on an internal table into range? Thanks.
Regards,
Suhas
‎2008 May 26 12:57 PM
Make a range table (TYPE RANGE OF) with SIGN, OPTION, LOW and HIGH fields, loop through your itab, and for each value of the field you're interested in, create a record in the range table with
-SIGN = 'I'
-OPTION = 'EQ'
-LOW = field value
-HIGH = blank
matt
‎2008 May 26 1:06 PM
Hi,
Declaration of ranges
data: r_extid type range of TABLENAME,
r_exitid_l like line of r_extid.
Now loop on your internal table:
loop at it_itab into wa_itab.
r_exitid_l-sign = 'I'.
r_exitid_l-OPTION = 'EQ'.
r_exitid_l-LOW = wa_itab-FIELDNAME.
r_exitid_l-high = ' '.
append r_exitid_l to r_extid.
endloop.
Hope this is helpful.
‎2008 May 26 1:12 PM
HI,
Make a range table (TYPE RANGE OF) with SIGN, OPTION, LOW and HIGH fields, loop through your itab, or take BAPI structure for the range...for every field der will be range structure...den u can use that as IT...search for structure first ...for range...if not available...den go for Range Of.....and for each value of the field you're interested in, create a record in the range table with
-SIGN = 'I'
-OPTION = 'EQ'
-LOW = field value..
-HIGH = field value...
append ...
regards,
anilreddy
‎2008 May 26 1:14 PM