‎2009 Feb 23 7:42 AM
Hi Abaper,
In my standard table there is a field concepto and it value are
'ALLOWOTH
'ALLOWROOM'
'ALLOWFB'
In this way all the values of this concepto field starts wit ALLOW.
Right now there are only 3 values as mentioned above. So we used the below Query(Harded coded)
SELECT xconcepto
FROM /ccsht/rs_linfol
INTO TABLE it_linfol
FOR ALL ENTRIES IN it_comp_hotel
WHERE xhotel_id EQ it_comp_hotel-xhotel_id
*WHERE xhotel_id IN p_hotid "it_comp_hotel-XHOTEL_ID
AND xfecha_prest IN p_date
AND ( xconcepto) EQ 'ALLOWOTH' OR xconcepto EQ 'ALLOWROOM' OR xconcepto EQ 'ALLOWFNB' ).
But Some more values are going to add in future. So we don't want to hard code the concepts.
Can any one help us to rectify this prolem.
Thanks and regards,
‎2009 Feb 23 7:49 AM
‎2009 Feb 23 7:46 AM
HI
we cant use offset in SAP query
so fetch data from your table .
And read the internal table with string what do u require .
Read <your Internal table> with key <your filed(5)> = 'ALLOW'.
append to another table .
it will work sure .
‎2009 Feb 23 7:46 AM
‎2009 Feb 23 7:48 AM
‎2009 Feb 23 7:49 AM
‎2009 Feb 23 8:34 AM
Hi,
Thanks for youe help.
My problem is solve.
Thanks & Regards,
Amit
‎2009 Feb 23 7:49 AM
Hi ,
u have make use of ranges in this case .
ex.
ranges: concepto for table-concepto.
concepto-sign = 'I' ."Include.
concepto-Option = CP."contains pattern
concepto-low = 'ALLOW*'.
append concepto.
clear concepto .
if concepto[] is not initial.
SELECT xconcepto
FROM /ccsht/rs_linfol
INTO TABLE it_linfol
FOR ALL ENTRIES IN it_comp_hotel
WHERE xhotel_id EQ it_comp_hotel-xhotel_id
*WHERE xhotel_id IN p_hotid "it_comp_hotel-XHOTEL_ID
AND xfecha_prest IN p_date
AND xconcepto in concepto
endif.
regards
Prabhu