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

Suppressing an F4 help dynamically

Former Member
0 Likes
1,579

Hi all,

Is there any way I can suppress an F4 help in a screen based on some validations? I have statically attached a dictionary help to an input field, but do not want it to be displayed always.

Any help is greatly appreciated.

Thanks,

Nithya

1 ACCEPTED SOLUTION
Read only

former_member491305
Active Contributor
0 Likes
1,155

Hi,

Do like this.

In PBO Module,

LOOP AT SCREEN.

IF screen-name = 'W_LIFNR'.

if <condition1> = true.

screen-value_help = 1.

elseif <condition2> = true.

screen-value_help =0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Using this you can hide the values after pressing F4 for that particular field.

Hi all,

Is there any way I can suppress an F4 help in a screen based on some validations? I have statically attached a dictionary help to an input field, but do not want it to be displayed always.

Any help is greatly appreciated.

Thanks,

Nithya

5 REPLIES 5
Read only

former_member491305
Active Contributor
0 Likes
1,156

Hi,

Do like this.

In PBO Module,

LOOP AT SCREEN.

IF screen-name = 'W_LIFNR'.

if <condition1> = true.

screen-value_help = 1.

elseif <condition2> = true.

screen-value_help =0.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Using this you can hide the values after pressing F4 for that particular field.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,155

Hi,

There are two options

One Remove the static search help assignment and use Process-on-Value request module in your flow logic.

Then you can check you condition in the module and based on that either show the search help or display message "No input help available".

In the PBO module check the condtion and manipulate the SCREEN strucutre as show in the above reply.

Disable using SCREEN-VALUE_HELP = 0. MODIFY SCREEN in a LOOP AT SCREEN and ENDLOOP.

<b>But there is a disadvantage with this option that you cannot tell the user why it is disabled.</b> In the first option you can do that.

Regards,

Sesh

Read only

0 Likes
1,155

Hi,

Thank you both for your answers. I have a static search help assigned to a field in a table control actually. Now in my PBO, I have modified the screen and set value_help = 0. Still, I see the search help is available.

Am I missing something? Do I need to remove the static assignment and do the assignment itself dynamically after checking the condition? If yes, how do I do a dynamic search help assignment? I do not want to use process on value request, the search help is already available.

Thanks & Regards

Nithya

Read only

0 Likes
1,155

Hi ,

Are you assigning search help name explicitly for that field in search help attribute of the screen painter,or else is it coming automatically form dictinary search help.If the searchhelp is coming automatically from dictionary then we can't control that dynamically.But for the first case it will definitely work.also make sure that for table control you have to modify the screen attribute inside the LOOP ENDLOOP of the table control in PBO.Can you paste your code.

LOOP AT it_marc INTO x_marc WITH CONTROL tc2 CURSOR tc2-current_line.

MODULE tc2_get_lines.

ENDLOOP.

MODULE tc2_get_lines OUTPUT.

LOOP AT SCREEN.

IF screen-name = 'X_MARC-BWTTY'.

If x_marc-pstat = '1'.

screen-value_help = 1.

Else.

screen-value_help = 0.

Endif.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ENDIF.

ENDMODULE. "TC2_GET_LINES OUTPUT

Message was edited by:

Vigneswaran S

Read only

0 Likes
1,155

Hi,

I changed it to be called after initializing the table control lines and it works fine now. Previously it was before the wizard generated code for the table control and it did not work.

Thanks a lot.

Regards

Nithya