Ansicht
Dokumentation

BAPI_HELPVALUES_GET - Determine Allowed Input Values (F4) for Fields in BAPI Parameters

BAPI_HELPVALUES_GET - Determine Allowed Input Values (F4) for Fields in BAPI Parameters

Vendor Master (General Section)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This method determines the valid help values (F4) for a parameter or field of a structured BAPI parameter.

Example

Notes

The help values are based on check tables, fixed domain values, or value helps defined in a data element. If no search help of this type is defined, no help values can be specified.

This method can only be used for BAPI parameters. A check is made to see whether the field exists in the named parameter, in the method, and in the business object.

You must send the name or object type name of the business object, the method, and the parameter with the name defined in the BOR, to the Helpvalues.GetList method. If you have a field from a structured parameter, you also need to specify its name. You cannot obtain the total value help for all fields of a structure by not explicitly specifying a field when calling the method.

As an alternative, you can use details in the parameter ExplicitShlp to send specific search helps. The parameters ObjType, ObjName, Method, Parameter and Field must still be filled, so that the BAPI authorization checks can be made.

Note that this method only takes elementary search helps into account. For collective search helps, read the documentation on the method Helpvalues.GetSearchHelp.

The help values - together with other useful information - are returned in the parameter Helpvalues. The data is arranged in the left column by default.
The Description4HV parameter contains meta information that describes the column contents sent in the Helpvalues parameter. Note that SAP does not guarantee the stability of search helps. You must use the Description4HV parameter to correctly interpret the values sent in the Helpvalues parameter.

The Values4Field parameter only contains help values without short texts.

You can assign an authorization check to value helps. For data protection reasons, tables of type A (master data and transaction data) and tables of type L (temporary data) cannot be read.

Exceptions for master data can be defined with explicit authorization checks on the data element of the parameter or the parameter field. The values are only returned if the caller has the correct authorizations. Otherwise, an error message is triggered (see the Return parameter). The authorization required is documented in each individual BAPI.

Example

You want to determine the valid help values for the National field (country code). The field is in the BAPI Employee.GetList in the PersonalData parameter.

If you call the method with the following parameters:

ObjType
ObjName 'Employee'
Method 'GetList'
Parameter 'PersonalData'
Field 'National'
MaxOfRows '0'
DescriptionOnly 'X'

the Description4HV parameter contains:

TABNAME (Table) FIELDNAME (Field) ... FIELDTEXT (Description)
-----------------------------------------------------------------------
H_T005 LAND1 Country code
H_T005 LANDX Country
H_T005 NATIO Nationality

Note: If you use the test environment of the Function Builder for testing, you must select case-sensitive.

The help values are sent in the Helpvalues parameter. This parameter also usually contains other useful information, such as texts. This texts are in the logon language. The following values are in the Helpvalues parameter:
...
AT Austria Austrian
AU Australia Australian
...

The Values4Field parameter only contains the input values for the National field:
...
AT
AU
...

The information from the Helpvalues parameter can be offered by the application in a dialog. A line of the Helpvalues parameter can be selected to access the correct help value in the Values4Field parameter.

If you only want to select the countries that start with 'A', the following data must be in the Selection4Helpvalues parameter:

SELECT_FLD SIGN OPTION LOW HIGH
---------------------------------------------------------------------
LANDX I CP A*

Messages are returned in the Return parameter. The documentation for this parameter contains the return codes and their meanings.

Further information

For more information, see the BAPI Programming Guide in the SAP Library under CA-BFA.





Parameters

DESCRIPTIONONLY
DESCRIPTION_FOR_HELPVALUES
EXPLICIT_SHLP
FIELD
HELPVALUES
MAX_OF_ROWS
METHOD
OBJNAME
OBJTYPE
PARAMETER
RETURN
SELECTION_FOR_HELPVALUES
VALUES_FOR_FIELD

Exceptions

Function Group

BFHV

BAL Application Log Documentation   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 7489 Date: 20240523 Time: 113559     sap01-206 ( 99 ms )