SAP Process On Value & Process On Help-Request

โšก Smart Summary

Process On Value-Request and Process On Help-Request are the screen events behind F4 and F1 in SAP ABAP. This page explains both events, the FIELD statements that trigger them, and the function modules that display documentation or possible entries.

  • โ“ POH Purpose: PROCESS ON HELP-REQUEST reacts to F1 and shows the field documentation stored in the ABAP Dictionary.
  • ๐Ÿ”Ž POV Purpose: PROCESS ON VALUE-REQUEST reacts to F4 and shows the possible entries defined by values, a check table, or a search help.
  • ๐Ÿงพ Fallback Rule: When the POH event is missing, the system falls back to the data element documentation, and displays nothing when that is missing too.
  • ๐Ÿšซ Transport Limit: The FIELD statement in POH does not transport the screen field to the program, because it only displays help.
  • ๐Ÿ“š Help Modules: HELP_OBJECT_SHOW_FOR_FIELD displays data element documentation, and HELP_OBJECT_SHOW displays any SAPscript document.
  • ๐Ÿ“‹ Value Modules: F4IF_FIELD_VALUE_REQUEST starts the dictionary input help, and F4IF_INT_TABLE_VALUE_REQUEST displays a list built inside the program.
  • โ†ฉ๏ธ Return Path: DYNPPROG, DYNPNR, and DYNPROFIELD return the chosen value to the screen field, while RETURN_TAB returns it into a table.

SAP Process On Value and Process On Help Request

What are POH and POV?

First, to begin with if you know nothing about Screen Flow logic and their uses in SAP, we recommend you check our tutorial on Dialog Program.

POH and POV are the two screen events that answer a help request from the user. POH reacts to the F1 key and explains what a field means, while POV reacts to the F4 key and lists the values that the field accepts. Both are declared in the flow logic of the screen, next to PBO and PAI.

Criteria POH (Process On Help-Request) POV (Process On Value-Request)
Triggered by The F1 key The F4 key, or the Possible entries button
Purpose Explains the meaning of the field Offers the values the field accepts
Default source Data element documentation in the ABAP Dictionary Fixed values, check table, or search help
Data transport None, the field is only displayed The selected value is written back to the screen field
Typical function module HELP_OBJECT_SHOW_FOR_FIELD F4IF_INT_TABLE_VALUE_REQUEST

Now, lets look into POH and POV in detail

Process on Help-Request (POH) : F1 Help

  • Whenever F1 is pressed the POH event for the specified data element is executed.
  • If the PROCESS ON HELP-REQUEST event does not exist in the process logic of a screen, the documentation of the field in the ABAP Dictionary is taken as a basis and displayed. Even if that does not exit no help is displayed.
  • To display field help documentation, you must code the following screen flow logic in the POH event:
PROCESS ON HELP-REQUEST
FIELD <f> [MODULE <mod>] WITH <num>
  • If there is screen-specific data element documentation for the field <f>, you can display it by specifying its number <num>.
  • The number <num> can be a literal or a variable. The variable must be declared and filled in the corresponding ABAP program.
  • Note, the FIELD statement does not transfer the contents of the screen field <f> to the ABAP program in the PROCESS ON HELP-REQUEST event. It just shows help documentation. That’s it.

The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document

HELP_OBJECT_SHOW_FOR_FIELD

  • This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary.
  • You pass the name of the component and structure or table to the import parameters FIELD and TABLE.

HELP_OBJECT_SHOW

  • Use this function module to display any SAPscript document.
  • You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME.
  • For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.

F1 explains the field. The next event lists what may be entered into it.

Process on Value (POV): F4

  • When the user chooses the function Possible entries (F4), the system displays the possible input values for a field (values, check table, matchcode), provided they were stored by the developer.
  • The event PROCESS ON VALUE-REQUEST is always processed if the user has called “Possible entries”.
  • To define Possible values for a field on screen, you need to defined following in POV event of screen flow logic:
PROCESS ON VALUE-REQUEST

FIELD field name MODULE module name
  • For Possible values, within module defined above, you should use the general function module HELP_VALUES_GET_WITH_TABLE to get possible values from ABAP Dictionary.

There are some other functions that can also be used for input help :

F4IF_FIELD_VALUE_REQUEST

  • Calls the input help of the ABAP Dictionary dynamically.
  • You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME.
  • The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read.
  • If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen.
  • If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
MODULE VALUE_CARRIER INPUT.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

TABNAME    = 'DEMOF4HELP'

FIELDNAME  = 'CARRIER1'

DYNPPROG   =  PROGNAME

DYNPNR  =  DYNNUM

DYNPROFIELD= 'CARRIER'.

ENDMODULE.

F4IF_INT_TABLE_VALUE_REQUEST

  • This function module displays a value list that you created in an ABAP program.
  • The value list is passed to the function module as the table parameter VALUE_TAB.
  • If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the user’s selection is returned to the corresponding field on the screen.
  • If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING

RETFIELD         =  'CONNID'
DYNPPROG         =  PROGNAME
DYNPNR           =  DYNNUM
DYNPROFIELD      =  'CONNECTION'
VALUE_ORG        = 'S'
TABLES
VALUE_TAB        = VALUES_TAB.

That’s all to POH and POV. Leave your comments in case of any doubts.

How to Build an F4 Help from an Internal Table

A value list that does not exist in the ABAP Dictionary is built inside the program and handed to F4IF_INT_TABLE_VALUE_REQUEST. The steps below produce a working F4 help for a screen field.

  1. Declare the value table: Build an internal table whose first column holds the value that is written back to the screen. Fill it in a PBO module or in the value request module itself.
  2. Register the field in the flow logic: Add PROCESS ON VALUE-REQUEST to the screen and connect the field with FIELD … MODULE … so the module runs when F4 is pressed.
  3. Call the function module: Pass RETFIELD with the column name, DYNPROFIELD with the screen field name, and VALUE_ORG = ‘S’ because the list is passed as a structured table.
  4. Return the value: DYNPPROG and DYNPNR identify the program and the screen, so the selected row is written directly into the screen field without further code.
  5. Test it: Activate the screen, press F4 on the field, and check that the list appears and that the selection reaches the field.
* Flow logic of the screen
PROCESS ON VALUE-REQUEST.
  FIELD spfli-connid MODULE f4_connid.

* Module in the ABAP program
MODULE f4_connid INPUT.

  DATA: lt_values TYPE STANDARD TABLE OF spfli.

  SELECT * FROM spfli INTO TABLE lt_values
    WHERE carrid = spfli-carrid.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'CONNID'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'SPFLI-CONNID'
      value_org   = 'S'
    TABLES
      value_tab   = lt_values.

ENDMODULE.

๐Ÿ’ก Tip: Read the value of another screen field with the function module DYNP_VALUES_READ before filling the list. That is how a dependent F4 help, such as connections for the airline already entered, is built.

FAQs

Neither. F1 and F4 interrupt the screen and run their own event, then return to the same screen. Regular PAI processing only starts when the user triggers a normal function code.

A search help attached to the data element or the check table already produces the F4 list. POV coding is only needed when the values are calculated at runtime or depend on another field of the screen.

Pass DYNPROFIELD with the name of the column and use GET CURSOR LINE to find the row. The function module then writes the value into the correct row of the control on the next PBO.

Yes. AI assistants in ABAP development tools write the POV flow logic, the SELECT that fills the value table, and the call of F4IF_INT_TABLE_VALUE_REQUEST with the correct RETFIELD and DYNPROFIELD parameters.

No. F1 still reads the documentation stored in the ABAP Dictionary. AI assistants such as SAP Joule answer questions in plain language beside the screen, which complements the field documentation rather than replacing it.

Summarize this post with: