Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FUNCTION z_f4if_trigger_pai.
- *"----------------------------------------------------------------------
- *"*"Lokale Schnittstelle:
- *" TABLES
- *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
- *" RECORD_TAB STRUCTURE SEAHLPRES
- *" CHANGING
- *" REFERENCE(SHLP) TYPE SHLP_DESCR_T
- *" REFERENCE(CALLCONTROL) TYPE DDSHF4CTRL
- *"----------------------------------------------------------------------
- * If a value is picked from a search help, usually no "process after input" (PAI)
- * is triggered. Generally, this is useful system behaviour (there will be more
- * than one field on the dynpro, and the combined input should trigger PAI, not
- * the input of an isolated field). But sometimes, you want the immediate trigger.
- * For this purpose, you can attach this function module as F4 exit to your
- * search help.
- * If the fcode for "Enter" is not 'ENT1' in your scenario:
- * Change the value of lv_fcode to the value you need as "Enter" command
- DATA: lv_fcode TYPE syucomm VALUE 'ENT1'.
- * EXPORT different fcode to memory in the initialization step of a particular program
- * This keeps this function module reusable with the above default fcode
- IMPORT fcode TO lv_fcode FROM MEMORY ID 'FCODE_ENTER'. " (Doesn't change lv_fcode if nothing found)
- * Also, you can switch off this exit by "EXPORTing fcode from space" to memory,
- * because SAPGUI_SET_FUNCTION ignores fcode blank.
- IF callcontrol-step = 'RETURN'.
- * Um einen PAI auszulösen nach Auswahl eines Wertes
- CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
- EXPORTING
- functioncode = lv_fcode
- EXCEPTIONS
- function_not_supported = 0
- OTHERS = 0.
- ENDIF. "callcontrol-step = 'RETURN'.
- ENDFUNCTION.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement