Fonction SAP BAPI_HELPVALUES_GET_SEARCHHELP - Determine Search Help for F4 Process

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
FIELD BAPIF4A-FIELD C 30 X Field Name
METHOD BAPIF4A-METHOD C 32 X Verb
OBJNAME BAPIF4A-OBJNAME C 32 X Object Name
OBJTYPE BAPIF4A-OBJTYPE C 10 X Object type
PARAMETER BAPIF4A-PARAM C 32 X Element

Paramètre Reférence Type Long. Description
RETURN BAPIRETURN u 452 Return Parameter

Paramètre Reférence Long. Facultatif Description
DESCRIPTION_FOR_HELPVALUES BAPIF4E 292 X Description of BAPI Help Texts in BAPIF4C
SHLP_FOR_HELPVALUES_GET BAPISHLP 147 BAPI shlp Structure for Helpvalues Interface

Functionality
This function enables you to determine search helps for finding values(F4 help) for BAPI parameters.
You must specify either the object name (parameter ObjName) orthe object type of the object (parameter ObjType), the name ofthe method for the object (parameter Method), and the name ofthe parameter for the method (parameter Parameter). If theparameter is structured, you must also specify the name of the field inthe Field parameter.
If the function runs successfully, the name of a search help with typeand short text appears in the table parameter ShlpForHelpvalues.If a collective search help is defined for the parameter or for thefield of a structured parameter, then the return table contains thenames of all its elementary search helps with their types and shorttexts.
A entry of this type in a BAPISHLP table can be specified for the BAPIHelpvalues.GetList (BAPI_HELPVALUES_GET) to determine F4 valuehelps.
The table parameter DescriptionForHelpvalues specifies meta datafor restricting the data selected by the BAPI Helpvalues.GetList
.

Notes

Example
You want to define a search help for the VENDOR field of the BAPIparameter ReservationItems for the methodMaterialReservation.GetDetail. To enable this, the BAPIHelpvalues.GetSearchhelp requires the following parameters:
Parameter:,,,,Value:
---------------------------------------------
OBJTYPE,,,,
OBJNAME,,,,'MaterialReservation'
METHOD,,,,,,'GetDetail'
PARAMETER,,,,'ReservationItems'
FIELD,,,,,,'VENDOR'
If successful, the table parameter ShlpForHelpvalues containsthe following entries:
SHLPNAME,,,,SHLPTYP,,,,REPTITLE:
------------------------------------------------------------------------
-----------------------------------------
KREDI,,,,SH,,,,,,Vendors by Country/Company Code
KREDK,,,,SH,,,,,,Vendors by Company Code
KREDL,,,,SH,,,,,,Vendors by Country
KREDP,,,,SH,,,,,,Vendors by Personnel Number
...
One of these entries can be specified for the BAPIHelpvalues.GetList (BAPI_HELPVALUES_GET) in the parameterExplicitShlp, and used to determine a value help.

Description
Status information is returned in this parameter. These status messagesare usually for errors that have occurred during processing.
If there are no errors the Return parameter is not filled.

Value range
The following errors are reported in the Return parameter using theerror codes assigned to them:
Error code:,, Description
-----------------------------------------------------------------------
S&001,,Object type not available in BOR
S&002,,Object type method not available
S&003,,Object type method parameter not available
S&004,,Field not available in structure of the parameter
S&010,,Object name not available in BOR
S&033,,No search help defined for BAPI parameter or parameter field
S&039,,The search help asigned to the parameter is inconsistent

Description
From the parameter Field the BAPI is notified for which field thesearch help is to be determined
This parameter only needs to be filled for table or structureparameters.

Description
The parameter Method determines which method of the specified businessobject type has the parameter for which search help is to bedetermined.

Description
With the parameter ObjName the BAPI ascertains the name of the businessobjects for which search help is to be determined for its methodparameters.
You do not have to use this parameter, if the maximum 10 charactertechnical name of the business objects has been assigned in fieldObjType.

Description
With the parameter ObjType the maximum 10 character technical name ofthe business object type is transferred to the BAPI for which thesearch help is to be determined for the method parameters. You do nothave to use the parameter, if the name of the parameter is transferredin ObjName.

Description
In the field Parameter the name of the method parameter is transferredfor which search help is to be determined.

Description
You can use this data to restrict the value help when calling themethod Helpvlaues.GetList in the parameterSelectionForHelpvalues.
This data must also be used to interpret the values in the tableHelpvalues. Since SAP cannot guarantee the stability of searchhelps, this is the only way to make sure that the value helps areinterpreted dynamically, and without errors.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX

Example
If the method is called with the following parameters:
ObjType
ObjName 'Employee'
Method 'GetList'
Parameter 'PersonalData'
Field 'NATIONAL'
the parameter ShlpForHelpvaluesGet contains the following:
SHLPNAME,,SH,,TITLE,,,,REPTEXT
-----------------------------------------------------------
T005,,,,CT,,,,,,Name
The contents of Description4HV are:
TABNAME FIELDNAME POSI OFFSET LENG ... SCRTEXT_M
---------------------------------------------------------
T005 LAND1 1 0 000003 Country
T005T LANDX 2 3 000015 Name of country
The NATIONAL field has a search help that can specify a value help forthe Country Key (LAND1) and the Country Name (LANDX).This means that you can make a selection using both the criteriaCountry Key and Country Name in the parameterSelectionForHelpvalues of the method Helpvalues.GetList.If the field SELECT_FLD = 'LAND1' and the selection criteria SIGN='E',OPTION='BT', LOW='AA' and HIGH='BB' are set in the parameterSelectionForHelpvalues of the method Helpvalues.GetList,then the method Helpvalues.GetList returns all help values forthe BAPI parameter field National whose country keys arebetween AA and BB. However, if SELECT_FLD = 'LANDX' and the otherselection fields are set as above, help values are returned for theBAPI parameter field NATIONAL whose country names arebetween AA and BB.

Description
All the search helps found are returned in this table. If an elementarysearch help is assigned to the BAPI parameter, the table has anappropriate entry. If the help is a collective search help, the tablecontains all the collective search helps.
The table fields contain the information:
SHLPTYPE = Type of search help
SHLPNAME = Name of individual search help
TITLE = Short text of search help
REPTEXT = Header
When search help information is transferred to the BAPIHelpValues.GetList (function module BAPI_HELPVALUES_GET) only thesearch help type (SHLPTYPE) and the name (SHLPNAME) are important. Theshort text does not have to be transferred.

1618145FAQ: F4-Help using BAPI_HELPVALUES_GET
1502160FAQ: Accounting F4-Help, Description