F4 help functionality for a dynpro screen field using the PROCESS ON VALUE-REQUEST statement

原创 2012年03月30日 16:26:08

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抯 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........

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

  REFRESH dynpfields.
  CLEAR   dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELN'.
  dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELP'.
  dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.

  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname     = 'SAPLZZ_EKKO'    "Program name
      dynumb     = '0100'           "Screen number
    TABLES
      dynpfields = dynpfields
    EXCEPTIONS
      OTHERS     = 0.
ENDMODULE.                 " help_ekpo  INPUT

 

 

在PROCESS ON VALUE-REQUEST事件中获取屏幕值

在某项目中,需要用Search Help类似的功能弹出工厂信息,然后回填到字段中,在输入工厂时要根据输入的值来弹出某一个工厂,在PROCESS ON VALUE-REQUEST事件中捕捉不到屏幕的值,...

All About Process On Value and Process On Help

First ,to begin with if you know nothing about Screen Flow logic and their uses in SAP ,we recommend...

F4 help functionality for a dynpro screen field using the PROCESS ON VALUE-REQUEST statement

Pressing the F4 button on a dynpro screen field brings up a list of possible values you can enter in...

F4IF_FIELD_VALUE_REQUEST 和 F4IF_INT_TABLE_VALUE_REQUEST的不同

原文地址http://blog.csdn.net/liangziyisheng/article/details/6951941   F4IF_FIELD_VALUE_REQUEST主要功能是将表里...

All About Process On Value and Process On Help

First ,to begin with if you know nothing about Screen Flow logic and their uses in SAP ,we recommend...

Field 'ID' doesn't have a default value,ecould not execute statement

org.hibernate.exception.GenericJDBCException: could not execute statement at org.hibernate.exception...

capture screen activity to a movie file using AV Foundation on OS X 10.7 Lion and later

Technical Q&A QA1740 How to capture screen activity to a movie file using AV Foundation on OS X 1...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:F4 help functionality for a dynpro screen field using the PROCESS ON VALUE-REQUEST statement
举报原因:
原因补充:

(最多只允许输入30个字)