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 Search Help on Module Pool Program not working

Former Member
0 Kudos

Hi,

I've got a screen with a few fields and on two of them I implemented a module ON VALUE-REQUEST.

The problem is that it never gets there and I can't understand why.

Screen Logic:

PROCESS BEFORE OUTPUT.

   MODULE STATUS_0100.

   MODULE modify_screen.

   MODULE clear_ok_code.

PROCESS AFTER INPUT.

   MODULE exit AT EXIT-COMMAND

   MODULE USER_COMMAND_0100.

PROCESS ON VALUE-REQUEST.

   FIELD dtbase MODULE F4_Date.

   FIELD centro MODULE F4_Centro.



Whenever I press F4 or the button for the search help, the program enters USER_COMMAND_0100 with ok_code = &F4 and then exits the module and never enters any of th F4_* I've created.


Can you help me understand why?


Thank you!

Carlos

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

Call SE41 and check the status (the one set in module STATUS_0100, I suppose you created it just before adding the USER_COMMAND module) for value &F4, remove it.

If unsuccessful, then delete and recreate the status.

Regards,

Raymond

14 REPLIES 14

Former Member
0 Kudos

On the screen layout, you have to make sure that 'possible entries' is checked for those fields.

Rob

0 Kudos

Hi Carlos,

Make sure that you have not provided any standard search help in screen painter.

Regards,

Swaroop

former_member1716
Active Contributor
0 Kudos

Hi Carlos,

Please check I Debugging Mode what function code does it have when it enter the respective Module.

Please note that with respect to Search help PAI events are given first priority, even though we have values declared in screen painter it wont be effective.

Please check through debugging and let us know on the result.

Regards,

Satish

former_member182915
Active Contributor

Hi Carlos,

if every thing well and good in program, control go to  process on value request event's

field <xyz> module <abc>.

For testing check in se80 DEMO_DYNPRO_F4_HELP_MODULE and debug it.

Former Member
0 Kudos

Hi,

I've checked on Screen Layout and I have the possible entries checkbox on both fields and no standard search help selected for any of the fields.

When pressing F4, the function code returned is &F4.

Every time the F4 is pressed, the program goes into PAI event and into the module USER_COMMAND_0100.

I can't get it to go to PROCESS ON VALUE-REQUEST.

The module USER_COMMAND_0100 has the following code:

CASE ok_code.

     WHEN 'CANCEL'.

       SET PARAMETER ID: 'IDCENTRO' FIELD space,

                         'IDCC' FIELD space,

                         'IDRECEBE' FIELD space,

                         'IDORDEM' FIELD space.

       LEAVE TO SCREEN 100.

ENDCASE.



Even with this flow logic

PROCESS AFTER INPUT.

PROCESS ON VALUE-REQUEST.

   FIELD dtbase MODULE F4_Date.

   FIELD centro MODULE F4_Centro.

the search help doesn't work. When I press F4, the program ends.

I've also looked at DEMO_DYNPRO_F4_HELP_MODULE but it's the same logic as I have on my program.

Thank you!

0 Kudos

Also make sure that &F4 is not defined as an EXIT command.

Rob

0 Kudos

Hi Rob,

&F4 is not defined as an EXIT command.

The F4 worked before I implemented the MODULE USER_COMMAND_0100 to handle the buttons on the GUI Status. After that they stopped working.

Thank you!

Former Member
0 Kudos

Hi,

I've just added a standard search help (H_T001W_C) for one of the fields but its not working either.

Every time I press F4, the PAI event gets triggered and the it doesn't do the search help.

I'm really lost here....

Thank you!

0 Kudos

You are putting 'CANCEL' in the wrong module.

USER_COMMAND_0100 is for normal functions.

Define a new module EXIT_0100 and put the logic for CANCEL there.

In the PAI, add a line

MODULE EXIT_0100 AT EXIT-COMMAND.

Rob

0 Kudos

Hi Rob,

This is my code:

Logic Flow

PROCESS BEFORE OUTPUT.

   MODULE STATUS_0100.

   MODULE modify_screen.

   MODULE clear_ok_code.

PROCESS AFTER INPUT.

   MODULE exit AT EXIT-COMMAND.

   MODULE USER_COMMAND_0100.

PROCESS ON VALUE-REQUEST.

   FIELD dtbase MODULE F4_Date.

   FIELD centro MODULE F4_Centro.


PAI:

*&---------------------------------------------------------------------*

*&      Module  USER_COMMAND_0100  INPUT

*&---------------------------------------------------------------------*

MODULE USER_COMMAND_0100 INPUT.

     CASE ok_code.

     WHEN 'SAVE_VAR'.

       LEAVE TO SCREEN 100.

   ENDCASE.

ENDMODULE.                 " USER_COMMAND_0100  INPUT

*&---------------------------------------------------------------------*

*&      Module  EXIT  INPUT

*&---------------------------------------------------------------------*

MODULE EXIT INPUT.

   CASE ok_code.

     WHEN 'BACK'.

       LEAVE PROGRAM.

     WHEN 'EXIT'.

       LEAVE PROGRAM.

     WHEN 'CANCEL'.

       SET PARAMETER ID: 'IDCENTRO' FIELD space,

                         'IDCC' FIELD space,

                         'IDRECEBE' FIELD space,

                         'IDORDEM' FIELD space.

       LEAVE TO SCREEN 100.

   ENDCASE.

ENDMODULE.                 " EXIT  INPUT

With debugging, the sequence is this:

PBO [STATUS_0100 ; modify_screen , clear_ok_code] -> Show screen -> Press F4 -> PAI [USER_COMMAND_0100] -> exit program because the &F4 is not considered in the CASE ok_code.

As you can see, the line FIELD dtbase MODULE F4_Date / FIELD centro MODULE F4_Centro is never reached when pressing F4.

Thank you!

raymond_giuseppi
Active Contributor

Call SE41 and check the status (the one set in module STATUS_0100, I suppose you created it just before adding the USER_COMMAND module) for value &F4, remove it.

If unsuccessful, then delete and recreate the status.

Regards,

Raymond

0 Kudos

Hi Raymond,

Thats it!

I've removed the function code for F4 (by default it was &F4) and everything is ok now.

From what I've understood, if we have a function code defined for F4 it will always enter the USER_COMMAND module and making the PROCESS ON VALUE-REQUEST useless/unreachable.

Thank you!

0 Kudos

Hi ,

I have screen 9004 in PAI of 9004 they are calling 9005 screen .

in 9005 having below fields. Date , comment , field3 and field4. field 3 having dropdown . Until this working OK.

Now based on field3 user want f4 help on field4.

I tried with POV for field4. but in output search icon is appearing but, once we click its not going to POV code and giving message "function code can not be selected "

I tried with custom search help option but nothing is working.

Please suggest


Regard,

Anup

Hello Anup,

While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread.
Posting in older threads is not the best way to get guidance.

If you're looking for help, you should ask a new question: https://answers.sap.com/questions/ask.html.

Here are some tips to help you craft an effective question for our community:
https://community.sap.com/resources/questions-and-answers
https://developers.sap.com/tutorials/community-qa.html

I encourage you to follow this guidance, as I'd really like to see you get a solution to your problem.

All the best,
Anne