2013 Jul 19 7:58 AM
Hi Experts,
I am writing a report in my FI module. In that my requirement is in the selection screen I have group of input fields like Article, Article description and so on. So when the user can filter using Article number as input as well as with the Article description also. So now the user is asking if wants to filter with Article description he wants to give (**with some part of the description**) like if the Article description is "Blue color T-shirt" he will give "**Blue**". So how can I achieve this? Please help me..
Thanks
2013 Jul 19 9:59 AM
Hi Sudheer,
To achieve your requirement you must use "Regular Expressions" along with FIND statement.
With the combination of Regular Expression and FIND statement you can find set of characters in a string etc...
There are lot of examples on internet to achieve this.
Try it and let me know if you require more help.
Thanks & Regards,
Abdul
2013 Jul 19 10:12 AM
Hi Sudheer,
Use operator like in your select query it will work. I have tested the below code in my system.
PARAMETER: p_name type zupload_data-name.
DATA: T_DATA TYPE STANDARD TABLE OF ZUPLOAD_DATA,
L_NAME TYPE STRING.
CONCATENATE '%' p_name '%' INTO L_NAME.
SELECT * FROM ZUPLOAD_DATA
INTO TABLE T_DATA
WHERE NAME LIKE L_NAME.
In your example even if user enter only 'BLUE' it will work.
Regards,
Vinay
2013 Jul 19 10:35 AM
Sudheer if user wants to enter **BLUE** then use below code for your reference.
parameter: p_name type zupload_data-name.
select-options: s_name for zupload_data-name no-display.
data: T_DATA TYPE STANDARD TABLE OF ZUPLOAD_DATA.
s_name-sign = 'I'.
s_name-option = 'CP'.
s_name-low = p_name.
append s_name.
SELECT * FROM ZUPLOAD_DATA
INTO TABLE T_DATA
WHERE NAME in s_name.
Hope it helps.
Regards,
Vinay
2013 Jul 19 10:42 AM
http://scn.sap.com/thread/3393569
Delete adjacent duplicates statement is missing in SCN i think
2013 Jul 19 10:05 PM
hi
assuming Article description is a field in a table.
lets assume field as ztable-artdesc
declare as
*** declaring internal table
data znewtab type table of ztable.
*** Declare select options for field.
SELECT-OPTION zartdesc FOR ztable-artdesc.
then use select stament as
*** check select option for initial.
if not zartdesc is initial.
Select article artdesc into znewtab from ztable
where znewdesc IN zartdesc.
endif.
try in this format .
with regards
Prakash.s