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: 

Module pool unable to trigger my selected f4 help value

siongchao_ng
Contributor
0 Kudos

Hi,

I added a custom field responsible person with custom search help ZPS_VERNR created in SE11.

Now I need to select to another value and populate the name of the vernr onto the highlighted text field.

But my PAI does not trigger. My process on value-request also does not trigger.

Nothing happened. Anyone have any idea?

8 REPLIES 8

raymond_giuseppi
Active Contributor

The PAI wont' be triggered by the F4 process (POV)

What did you code in the POV, did you use FM DYNP_VALUES_UPDATE to update current dynpro values without PAI/PBO cycle. (It's not common to use same module in PAI and POV.)

Hint: Read also Hierarchy of Search Help Calls

0 Kudos

I am using search help that is tied to the screen field so I dont have to use FM DYNP_VALUES_UPDATE

But before I get my selected F4 values, the PAI and the POV already run and my vernr is still 00000000. So I am unable to populate the name field. After F4 selecting value, I still need to hit "Enter" key for PAI, POV to run again in order to populate the name field.

Anyway for F4 to do the same as "enter" key?

0 Kudos
  • DYNP_VALUES_UPDATE allows you to update other fields in dynpro not bound with the field carrying the search help without triggering a PAI (add the fields to DYNPFIELDS table parameter)
  • If you don't want to use the FM, you could try to call CALL METHOD cl_gui_cfw=>set_new_ok_code in POV to simulate "Enter" key

Sandra_Rossi
Active Contributor
0 Kudos

If you have a search help which returns the text, you don't need ABAP code, you just need a DDIC structure for the screen to map the 2 screen fields (which should then be named zddic-zz_vernr and zddic-vernr_name instead of prps-zz_vernr).

There's no reason that zfips_populate_resp_person is not called when you press F4, unless you have mapped F4 to something else (via the "Reserved Function Keys").

Sandra_Rossi
Active Contributor
0 Kudos

I see that you implemented a customer exit, did you activate your code, did you activate the project, does it work in DEV but not in other system?

Sandra_Rossi
Active Contributor

Also make sure your POV module is not defined as MODULE ... OUTPUT, it should be of type INPUT.

MODULE zfips_populate_resp_person INPUT.
  ...
ENDMODULE.

Don't put MODULE zfips_populate_resp_person in the PROCESS AFTER INPUT logic, put it only after PROCESS ON VALUE-REQUEST.

siongchao_ng
Contributor
0 Kudos

When I press F4 the same module under PAI and POV did trigger but the problem here is before I can pick the employee number, codes such as below already run. My prps-zz_vernr is still 00000000 . So the name verna is not populated into the field on the screen prps-verna. Found that after selecting, I need to hit the "Enter" key for the PAI to run again and this time my prps-zz_vernr had my selected value and the name field prps-zz_verna can be populated.

Anyway for F4 to do the same as "enter" key?



select single verna from zfi_tcj04 into prps-zz_verna where vernr = prps-zz_vernr.

Sandra_Rossi
Active Contributor
0 Kudos

Not sure if you have read all that I have written, as you persist with your original idea, but you didn't say what you don't understand from my answers. You don't need ABAP code as I said. I guess you have incorrectly defined the fields, the search help, the linked fields. I can't know.

Defining PRPS-ZZ_VERNA is not very good because it's redundant information of ZFI_TCJ04 and can become obsolete if you change the name in ZFI_TCJ04.