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: 

F4 Help

Former Member
0 Kudos
357

Hi Everybody,

I'm doing Module Pool Programming. I have got a F4 help on a screen field (Static values in domain of the field). Now my requirement is to retrieve the Code and Description on screen.

Since no SQL will work hence I looked for FM. I got two FM 'F4IF_FIELD_VALUE_REQUEST' and 'F4IF_INT_TABLE_VALUE_REQUEST'. But it doesn't help me in my problem.

Please give me some suggestions.

Regards,

Deva.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
134

Hi Again,

Thanx for the quick reply. But none of them suits my requirement.

I restate the problem. I have field on screen which has domain with static values defined. So I get F4 help on screen for the value (i.e Code). Now on screen I have another field where I have to retrieve the description against that Code of F4 help.

Since the values are not store in some table hence there is no question of query. Plus the Function Module will be of no help as no-query situation. So how will I retrieve the description????

thanx again for the replies earlier.

Regards,

Deva.

12 REPLIES 12

Former Member
0 Kudos
134

Hey,

Create a elementary search help with exit. Write ur query in that exit. It will work fine.

Regs,

Venkat

0 Kudos
134

Hello Venkat,

just a small query.

i know how to create elementary search help.

but what do you mean by "with exit".

if you can explain that in detail.

i will be very thankful.

jayanthi_jayaraman
Active Contributor
0 Kudos
134

Hi,

Actually, we are using the function module for the F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.

You should append values in f4tab.

Here is the sample code.

tables kna1.

data:

begin of t_values occurs 2,

value like kna1-begru,

end of t_values,

t_return like ddshretval occurs 0 with header line.

select-options s_begru for kna1-begru.

at selection-screen on value-request for s_begru-low.

t_values = 'PAR*'.

append t_values.

t_values = 'UGG'.

append t_values.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'BEGRU'

value_org = 'S'

tables

value_tab = t_values

return_tab = t_return

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

if sy-subrc = 0.

read table t_return index 1.

endif.

Former Member
0 Kudos
134

Hey,

And also attach that search help to the field.

regs,

Venkat

Vinod_Chandran
Active Contributor
0 Kudos
134

Hi Deva,

I think you can do this with the function module 'F4IF_INT_TABLE_VALUE_REQUEST'.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = <- Field Name

value_org = 'S'

tables

value_tab = t_values

return_tab = t_return

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

Thanks

Vinod

Former Member
0 Kudos
135

Hi Again,

Thanx for the quick reply. But none of them suits my requirement.

I restate the problem. I have field on screen which has domain with static values defined. So I get F4 help on screen for the value (i.e Code). Now on screen I have another field where I have to retrieve the description against that Code of F4 help.

Since the values are not store in some table hence there is no question of query. Plus the Function Module will be of no help as no-query situation. So how will I retrieve the description????

thanx again for the replies earlier.

Regards,

Deva.

0 Kudos
134

Hello Deva,

Are the values in some database table or internal table, which you want in F4.

PLEASE CONFIRM.

regards.

0 Kudos
134

Hi,

Use the function module DDIF_FIELDINFO_GET to retrive value and description of domain fixed values. This you can use in the F4 function module.

Also look at this post.

Thanks

Vinod

athavanraja
Active Contributor
0 Kudos
134

If the domian has static values, then you dont have to do anything. when defining the screen filed give it a name as data dictionary name (table-field) then you would get a promtp that do you want to refer to the dictionary filed. say yes.

This way you will automatically get the F4.

if you dont want to give the filed a name as explained above, after doing those steps, just change the name alone to the desiered name. it would still work.

Regards

Raja

Former Member
0 Kudos
134

Thanx Raja. You were still somewhere close.

I understand that if you have same DDIC name on screen the F4 help is directly available. And I have done exactly the same. It retireves the value defined in the respective field. But additionally I want to retrieve the description defined against that static value.

Any solutions???

Regards,

Deva.

0 Kudos
134

just create one more elementary search help, let this search help contain two field , which is your requirement.

then from se11 you attach this search help explicitly to that particular field.

or else during runtime retrieve the two fields in one internal table and attach this to that particular field. for which we have FM.

regard.

0 Kudos
134

do you mean to say that when the user selects a entry from the F4 popup , you want to get the description as well(along with the key selected), or you want the description to show up in the F4 pop up? (the second portion happens automatic, so i guess you are asking for the first one right?)

then you can use FM DDUT_DOMVALUES_GET to get all the domain value texts.

Regards

Raja