Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : Search Help

karthik_snair
Participant
0 Kudos

Hi Team,

I have a new requirement.

We have standard search help for Code Group (QPCT-CODEGRUPPE) and Code (QPCT-CODE).

Presently when I press F4 on these fiels , it displays all the codes that even though its unnecessary.

Now the requirement is , I have the Catalog value.Now with this value I need to filter the F4 with the Catalog so that user will get only the relevant one.

So the question is how do I pass this filter value to the standard search help?

Is that possible or do I need to separate code for F4 in each field.

Please let me know.

Thanks!

Karthik.S

1 ACCEPTED SOLUTION

Juwin
Active Contributor
0 Kudos

If you declare the selection screen fields with proper reference, SAP will take care of restricting the values automatically.

For Eg Declare the parameters as:


parameter:p_cat  type qpct-katalogart,

           p_code type qpct-codegruppe.

Now, if you execute the program and do an F4 on P_CODE field, then it will show all the possible values. Close the popup window and then put valid value in P_CAT field. If you do an F4 on P_CODE field again, then it will restrict the code group values automatically.

Thanks,

Juwin

3 REPLIES 3

Former Member
0 Kudos

Hi Karthik,

I think it's not possible to validate standard search help. So that my suggestion is create custom search help then u can do ur validation based on requirement.

Hope it'll help's u.

Regards,

jack.

Former Member
0 Kudos

Hi Karthik,

You cannot modify the stadard search help . Other workarond would be, copy the standard into Z-search help and write search help exit ( as search help exit is called repeatedly in connection with several events during the F4 process.) and do modifications as per your requirement.

For more information,refer FM documentation F4IF_SHLP_EXIT_EXAMPLE (Example for a search help exit).

Thanks

KH

Juwin
Active Contributor
0 Kudos

If you declare the selection screen fields with proper reference, SAP will take care of restricting the values automatically.

For Eg Declare the parameters as:


parameter:p_cat  type qpct-katalogart,

           p_code type qpct-codegruppe.

Now, if you execute the program and do an F4 on P_CODE field, then it will show all the possible values. Close the popup window and then put valid value in P_CAT field. If you do an F4 on P_CODE field again, then it will restrict the code group values automatically.

Thanks,

Juwin