2010 Mar 30 10:06 AM
Hi Gurus,
I try to extrat from the table CSKS the cost element (KSTAR) only those starting by 8. I have written this code but I always receive a sy-subrc = 0.
PARAMETERS srch_str TYPE cska-kstar.
TYPES: BEGIN OF ty_cska,
kstar TYPE cska-kstar,
END OF ty_cska.
data:
i_cska TYPE STANDARD TABLE OF ty_cska.
CONCATENATE '8' '%' INTO srch_str.
select kstar from cska
into table i_cska
where kstar like srch_str.Anybode has an idea?
Thanx in advance for your help.
Regards,
Mohamed.
2010 Mar 30 10:08 AM
2010 Mar 30 10:08 AM
2010 Mar 30 10:15 AM
the records are stored like this : 0088993939, 004448488, 0073733888, 00639999, 008373733
I would need only the 0088993939 and 008373733.
The problem is with my code it took me all records which contain 8.
2010 Mar 30 10:18 AM
Hello
Try direct condition:
select kstar from cska
into table i_cska
where kstar like '008%'.
2010 Mar 30 10:23 AM
Thx for your quick response but sometimes it could happen some records like 0803373 0008777373 and I also need those.
2010 Mar 30 10:31 AM
check if this works for you ,
where kstar like '% 08, 008,0008,00008%'
2010 Mar 30 10:27 AM
maybe should think by yourself (hint: write several conditions and connect them with 'OR')