Start of Content Area

Function documentation Providing Input Help (F4 Help)  Locate the document in its SAP Library structure

Use

Users of an SAP System can use the F4 key to obtain information about the possible input values for a certain field on the screen.

Information about the possible values for a field should also be available to those users who are working with the data in the SAP System from an external program, via BAPI calls. For example, the user of a Visual Basic program, which incorporates a BAPI to display or modify data in an SAP System, should have transparent access to the functions of the F4 input help.

Features

In order to provide input help, a calling program can use the BAPI HelpValues.GetList(). This method is based on the RFC-enabled function module BAPI_HELPVALUES_GET, which obtains the possible input values for a field that is passed in a BAPI call. For detailed information about the structure and use of the HelpValues.GetList() BAPI, see the documentation on the function module BAPI_HELPVALUES_GET, which implements the Helpvalues.GetList method.

To determine the possible input values for a field in the check table, the BAPI HelpValues.GetList() uses the elementary search help or the domain fixed values linked to the field in the ABAP Dictionary.

For this reason, you have to create or specify relevant check tables, elementary search helps (matchcodes) or domain fixed values. Only then can the calling program access the relevant input values for your BAPI fields using the BAPI HelpValues.GetList().

Note 

As of Release 4.5A, you have to specify a foreign key, if a check table has been defined in the domain. Otherwise F4 input help cannot be displayed.

Authorization Check

In some cases you will only want to allow only those persons with a specific user profile to access information in F4 input help. To do this you can carry out authorization checks within the BAPI using table BAPIF4T.

Table BAPIF4T is provided for this purpose. This table comprises the following fields, which you have to fill with the values for your BAPI.

The technical name of the SAP business object type, for example, BUS1065.

The name of a BAPI for the business object type named above, for example, GetList.

The name of a data element for which a possible entry is specified. For example, an elementary input help could be specified for the data element PERNR_D and be protected from unauthorized access.

The name of the function module that you have to create and that checks authorizations for the data element. This function module must have the following predefined interface:

*"-------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(OBJTYPE) LIKE BAPIF4F-OBJTYPE
*" VALUE(METHOD) LIKE BAPIF4F-METHOD
*" VALUE(DTEL) LIKE BAPIF4F-DTEL
*" VALUE(SHLPNAME) LIKE BAPIF4F-SHLPNAME
*" VALUE(TABNAME) LIKE BAPIF4F-TABNAME
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIF4F-RETURN
*"---------------------------------------------------------

As the template for your function module you can use the function module BF_BAPI_F4_AUTHORITY which provides exactly this interface. Copy this function module and follow the documentation provided with it.

The additional parameter SHLPNAME contained in the function module interface provides the name of the active input help for the table or for the data element. The parameter TABNAME contains the name of the value table.

The return code of the parameter RETURN is:

During runtime the function module is called dynamically by the BAPI HelpValues.GetList().

An authorization check can be carried out at business object type, method or data element level:

To check authorizations at this level…

... ......the following fields in table BAPIF4T must be filled.

Business object type

OBJTYPE, FNAM

BAPI

OBJTYPE, METHOD, FNAM

Data Element

OBJTYPE, METHOD, DTEL, FNAM

 

 

 

 

End of Content Area