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: 

Search help for field in ABAP Query

Former Member
0 Kudos

Hi Experts,

For a particular field in standard table the search help(F4) is not maintained in the table level, which is used in a ABAP query.

Is there any possibilities for user-defined Search help using InfoSet or Query?

Please help me in this regard.

Thanks in advance,

Balaganesh.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Assuming that you are asking about fields on the selection screen. If so, then this can be achieved by adding custom code in your InfoSet for the selection field for which you need F4 help. This can be done in the InfoSet maintenance (SQ02) as follows:

1. Choose the Code function (Shift+F8)

2. Change the "Code Section" to "Free Coding."

3. Enter code similar to this:


AT SELECTION-SCREEN ON VALUE-REQUEST FOR {enter your selection field here}.
* Add your custom F4 logic here (CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'...)

4. Check syntax, save, generate InfoSet

Now when you run the query that is based on this InfoSet and press F4 on the selection field, your custom code will be invoked.

Regards,

Jamie

0 Kudos

Hi Jamie,

Thanks for your reply...i have used the same logic as you have suggested.But then I am not sure what to use for standard ones .If we define our own parameters or select options then we can use

at selection screen on value request for (p_parameter/s_selectoptions).

But my problem is that I want f4 help for the standard one...

Say for eg i have used VBAK-VBELN as one of my selection screen field.

I want to write f4 help for this vbak-vbeln...

in this case am not sure how to write selection parameter vbak-vbeln.....

at selection-screen on value-request for ?????...hope u can understand my question..

thanks much,

Bala.

0 Kudos

Hi Bala,

I understand your question better now. Since you mention standard selections I assume that your InfoSet is based on a logical database instead of a table join, direct read, or custom data retrieval program. You are correct that the AT SELECTION-SCREEN ON VALUE REQUEST logic I mentioned earlier will not work for the standard selections of a logical database. The system gives you an error when generating your InfoSet if you try to use the standard selection name (in ECC 5.0 at least). I've tried various tricks to attempt to get it to work, but so far no luck.

You could, of course, use a different logical database as your InfoSet basis (e.g. VAV has a matchcode on VBAK-VBELN) or create your own data retrieval program and change your InfoSet to use the custom program instead of a logical database. In the second case you wouldn't need to deal with standard selections at all. I understand that these solutions are probably not what you need and, in the case of the custom data retrieval program, would be more complex (it may not be worth it to write a custom program just to allow F4 help... or maybe it would be... just depends).

Please keep us updated if you find a way to do it. I'll also report back if I happen to discover a way.

Best Regards,

Jamie

alejandro_bindi
Active Contributor
0 Kudos

If you end up modifying the code as James suggests, you could also use the MATCHCODE OBJECT addition.

Check this sample code (the char10 data element has no search help by default so here you assign it explicitly):


DATA:
  dbu_partner TYPE char10.
SELECT-OPTIONS:
  s_test FOR dbu_partner MATCHCODE OBJECT bupa.

Hope this helps,

Regards