Application Development and Automation 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: 
Read only

F4 Help issue

Former Member
0 Likes
1,150

Hi

I have an issue. I have say 2 fields in selection screen . we are using F4 help on second field. My requirement is that suppose I have filled first field with some values then while pressing F4 help it should show only options relevant to the entry of first field only.

Kindly tell how to do that.

Regards

Suchender

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,087

Hi,

At the time of triggering 2nd F4 help call FM "DYNP_VALUES_READ" to get other field value. After getting that value use that value to get other field value.

Thanks

Mrinmoy

8 REPLIES 8
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,087

For the solution just check for the examples using the function module DYNP_VALUES_READ.

Read only

Former Member
0 Likes
1,088

Hi,

At the time of triggering 2nd F4 help call FM "DYNP_VALUES_READ" to get other field value. After getting that value use that value to get other field value.

Thanks

Mrinmoy

Read only

Read only

Read only

0 Likes
1,087

ok, but I have to use it for abap query for an additional field then where would I have to code it.

Read only

0 Likes
1,087

and also that both the fields are from different tables.

Read only

0 Likes
1,087

> and also that both the fields are from different tables.

That's a problem: one of the conditions to make the input of a search help from several fields, is that they must be from the same DDIC structure/table. Moreover, these fields must be linked to a search help in that structure/table, and they must be passed as parameters.

You can make a demo by using CDHDR table and fields OBJECTCLAS and OBJECTID:

- Start SE16, enter CDHDR. If you fill OBJECTCLAS with a value, and press F4 on OBJECTID, you'll get only values for the OBJECTCLAS value.

- You can play with it by copying CDHDR to ZCDHDR (and you can keep only the 2 fields). Note: you can convert ZCDHDR into a structure if you prefer.

You can then use the following code, and play with ZCDHDR in SE11, by changing search helps assigned to those 2 fields, and the parameters of these assignments, to understand how it works (you'll see that there is only one possible combination to make it work).


PARAMETERS objclass TYPE zcdhdr-objectclas.
PARAMETERS objid TYPE zcdhdr-objectid.
"the following works also, if you don't want to create and play with ZCDHDR
PARAMETERS objclass TYPE cdhdr-objectclas.
PARAMETERS objid TYPE cdhdr-objectid.

But the following won't work because they are not typed with the same structure/table:


PARAMETERS objclass TYPE Zcdhdr-objectclas.
PARAMETERS objid TYPE cdhdr-objectid.

If you can't make the fields point to the same structure/table, then you must program the F4 yourself with DYNP_VALUES_READ as already said above.

Read only

Former Member
0 Likes
1,087

just closing the thread