2008 Aug 22 3:32 PM
Hi all
I need some help regarding search help that for a normal search help for a field we will get all the possible values for that but here i need to filter the field values based on the previous field entered value.
for example :
two fields are there
plant and work center,
for a normal search help work center may get 100 values from a defined table.
if we enter some value in plant field and then if we press search help for the work center field then the values of the work center should be filtered based on the above entered value.
Please help me in this issue..tell me whether it is possible or not
Thanks in advance.
siva.
Hi all
I need some help regarding search help that for a normal search help for a field we will get all the possible values for that but here i need to filter the field values based on the previous field entered value.
for example :
two fields are there
plant and work center,
for a normal search help work center may get 100 values from a defined table.
if we enter some value in plant field and then if we press search help for the work center field then the values of the work center should be filtered based on the above entered value.
Please help me in this issue..tell me whether it is possible or not
Thanks in advance.
siva.
2008 Aug 22 3:42 PM
You can specify a FM in your search help to do the filtering. Did you look at FM F4IF_SHLP_EXIT_EXAMPLE? It gives you detailed descriptions on how to use a search help exit.
It also explains how to implement your scenario where you have to filter the selected data.
2008 Aug 22 4:31 PM
Hi,
get the values of field1 into itab1.
get the corresponding values of field2 (wrt field1 entered) into itab2.
Use the FM available for F4 help by passing the itab2 as a parameter.
Be sure that the F4 help FM will be called only if the field1 is populated. Else it will give all the values.
thanks,
teja.
2008 Aug 22 4:59 PM
IF not <plant field> is initial
1. Copy F4IF_SHLP_EXIT_EXAMPLE to Z, call it from your programpass the plant data to it
2. Use the changing parameters SHLP and CALLCONTROL of that FM
3. Append your plant values into shlp-selopt[] table () like shown below
data begin of s_hselopt occurs 0.
include structure ddshselopt.
data end of s_hselopt.
CASE callcontrol-step.
WHEN 'SELECT'.
LOOP AT <plant table>
s_hselopt-shlpname = <SHelp Name>
s_hselopt-shlpfield = <Field Name - Wrk Ctr>
s_hselopt-sign = <Constant ('I')>
s_hselopt-option = <Constant ('EQ')>
s_hselopt-low = <plant table-plant>
APPEND s_hselopt.
CLEAR s_hselopt.
ENDLOOP.
shlp-selopt[] = s_hselopt[].
ENDCASE.
2008 Aug 25 6:27 AM
Hi,
I guess this link will solve your problem
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=f4if_shlp_exit_example&cat=sdn_all
Regards,
Manish
2008 Aug 25 6:40 AM
Hi,
U can use search help exit for this purpose.
1. Creat 1 view with ur conditions.
2. Use above view in ur Search help.
Pls chk below eg:
eg : tables -. pa0000 and pa0001
join cond -> pa0000-pernr = pa0001-pernr.
view fields
-
pernr
ename
stat2
endda
selection condition -> pa0000-stat2 EQ 3 AND pa0000-enddad EQ 99991231
SEARCH HELP
-
selection method -> above VIEW NAME
search help exit -> f4if_shlp_exit
dialog type -> D
Regards,
Anversha
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |