Posted: Sun Oct 14, 2007 6:59 pm Post subject: Adding technical help to a dialog screen field ( F4 )
Pressing the F4 button on a dynpro screen field brings up a list of possible values you can enter into that field. This list of values is usually derived from the domain of the data dictionary definition the screen field is based on. Alternatively if you do not want this to happen or if the field does not reference a data dictionary field the F4 help functionality can be created manually. This is done by creating your own bespoke ABAP code and via the PROCESS ON VALUE-REQUEST event assigning it to the relevant screen field.
The below code shows you how to activate the PROCESS ON VALUE-REQUEST event for a specific field’s F4 value help functionality. It then shows you how to point this event to your bespoke ABAP code, which will display the value help to the user. Finally it shows you how to return the value select by the user to the dynpro screen field. * Screen flow logic........
Code:
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD EKPO-EBELP MODULE help_ekpo.
* populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
*&------------------------------------------------------------------*
*& Module help_responsibility INPUT
*&------------------------------------------------------------------*
* text
*-------------------------------------------------------------------*
MODULE help_ekpo INPUT.
**Transport values to table dynpro/screen table control
DATA: l_stepl LIKE sy-stepl,
l_indx LIKE sy-stepl.
DATA: dynpfields LIKE dynpread OCCURS 5 WITH HEADER LINE.
* Adjust for scroling within table control
CALL FUNCTION 'DYNP_GET_STEPL'
IMPORTING
povstepl = l_stepl
EXCEPTIONS
stepl_not_found = 0
OTHERS = 0.
l_indx = tc_ekpotable-top_line + l_stepl - 1.
"tc_ekpotable should already have been declared
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.