2006 Jun 14 7:38 PM
HI guys,
how can i give search help for parameters to restrict the search help like the values starts only with (SARA)
is there any method for this?
Thanx
Basha
2006 Jun 14 7:41 PM
You would need to special code your own search help.
For example, say I wanted to only show the company codes in the US for the S_BUKRS select option help.
report zrich_0001 .
tables: t001.
data: begin of it001 occurs 0,
bukrs type t001-bukrs,
butxt type t001-butxt,
ort01 type t001-ort01,
land1 type t001-land1,
end of it001.
select-options s_bukrs for t001-bukrs.
initialization.
<b> select bukrs butxt ort01 land1 into table it001 from t001
where land1 = 'US'.</b>
sort it001 ascending by bukrs.
delete adjacent duplicates from it001 comparing bukrs.
at selection-screen on value-request for s_bukrs-low.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BUKRS'
dynprofield = 'S_BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = it001.
start-of-selection.
Regards,
Rich Heilman
HI guys,
how can i give search help for parameters to restrict the search help like the values starts only with (SARA)
is there any method for this?
Thanx
Basha
2006 Jun 14 7:41 PM
You would need to special code your own search help.
For example, say I wanted to only show the company codes in the US for the S_BUKRS select option help.
report zrich_0001 .
tables: t001.
data: begin of it001 occurs 0,
bukrs type t001-bukrs,
butxt type t001-butxt,
ort01 type t001-ort01,
land1 type t001-land1,
end of it001.
select-options s_bukrs for t001-bukrs.
initialization.
<b> select bukrs butxt ort01 land1 into table it001 from t001
where land1 = 'US'.</b>
sort it001 ascending by bukrs.
delete adjacent duplicates from it001 comparing bukrs.
at selection-screen on value-request for s_bukrs-low.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BUKRS'
dynprofield = 'S_BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = it001.
start-of-selection.
Regards,
Rich Heilman
2006 Jun 14 8:10 PM
HI Rich,
Ur reply given me some idea but how can i assign a search help directly as sara*
Enduser press f4 then it searches for sara* directly so no need of typing sara* by enduser.
Regards
Basha
2006 Jun 14 8:26 PM
If you had a custom search help, then try to give 'SARA*' in default column. (Have'nt tried as I don't have access to system now)
Or else worst way is to control in search help exit. Refer to this link <a href="http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm">Search Help Exit</a>
Regds
Manohar
2006 Jun 14 8:30 PM
Can you please let us know which database field this is that you are using and the table for values?
All you need to do is put 'SARA*' in your WHERE clause of the SELECT statement. So where is the issue?
2006 Jun 14 8:48 PM
Hi,
I tried with SARA* in default column and i cant activate it cos of errors and also tried in where clause in select statement. it says no values found cos no values r there with sara* in database.
DATABASE: Table : TCG81
Field : SLSTID
Regards
Basha
2006 Jun 14 8:53 PM
Try with codes 'SARA*' (have'nt treid as I don't have access to system)
Regds
Manohar
2006 Jun 14 8:54 PM
Is your select statement something like this?
SELECT slstid INTO TABLE value_tab
FROM tcg81
WHERE slstid LIKE 'SARA%'.Sorry, it should be '%' not '*'.
Message was edited by: Srinivas Adavi
2006 Jun 14 8:56 PM
If there are no values there that start with 'SARA' then why are you restricting the values to this non-existant pattern?
2006 Jun 14 9:02 PM
thanx srini got it...
sara% is the correct one.
thanx..
i mean it doesn't shown bcos it looks for directly sara* ..
anyway thanx guys..
Regards
Basha
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |