SAP HR_SUGGEST_PAYEE_KEY Function Module for Suggest Payee Key
HR_SUGGEST_PAYEE_KEY is a standard hr suggest payee key SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Suggest Payee Key processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for hr suggest payee key FM, simply by entering the name HR_SUGGEST_PAYEE_KEY into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPAY01_UTILS
Program Name: SAPLHRPAY01_UTILS
Main Program:
Appliation area:
Release date: 17-Mar-1999
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_SUGGEST_PAYEE_KEY pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'HR_SUGGEST_PAYEE_KEY'"Suggest Payee Key.
EXPORTING
LONGTEXT = "Long Text for Payee Description
SHORTTEXT = "Short Text for Payee Description
INFOTYPE = "Not More Closely Defined Area, Possibly Used for Patchlevels
SUBTYPE = "Not More Closely Defined Area, Possibly Used for Patchlevels
MOLGA = "Country Grouping
* BEST_ONLY = ' ' "X: Return Best Hit Only
* MIN_SCORE = 4 "Minimum Score for Hits
IMPORTING
PAYEE_KEY = "Payee Keys
EXCEPTIONS
NO_MATCH = 1
IMPORTING Parameters details for HR_SUGGEST_PAYEE_KEY
LONGTEXT - Long Text for Payee Description
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SHORTTEXT - Short Text for Payee Description
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INFOTYPE - Not More Closely Defined Area, Possibly Used for Patchlevels
Data type: CHAR4Optional: No
Call by Reference: No ( called with pass by value option)
SUBTYPE - Not More Closely Defined Area, Possibly Used for Patchlevels
Data type: CHAR4Optional: No
Call by Reference: No ( called with pass by value option)
MOLGA - Country Grouping
Data type: T521C-MOLGAOptional: No
Call by Reference: No ( called with pass by value option)
BEST_ONLY - X: Return Best Hit Only
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MIN_SCORE - Minimum Score for Hits
Data type: PDefault: 4
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_SUGGEST_PAYEE_KEY
PAYEE_KEY - Payee Keys
Data type: T521C-EMFSLOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_MATCH - No proposal found
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_SUGGEST_PAYEE_KEY Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_longtext | TYPE STRING, " | |||
lv_no_match | TYPE STRING, " | |||
lv_payee_key | TYPE T521C-EMFSL, " | |||
lv_shorttext | TYPE T521C, " | |||
lv_infotype | TYPE CHAR4, " | |||
lv_subtype | TYPE CHAR4, " | |||
lv_molga | TYPE T521C-MOLGA, " | |||
lv_best_only | TYPE XFELD, " SPACE | |||
lv_min_score | TYPE P. " 4 |
  CALL FUNCTION 'HR_SUGGEST_PAYEE_KEY' "Suggest Payee Key |
EXPORTING | ||
LONGTEXT | = lv_longtext | |
SHORTTEXT | = lv_shorttext | |
INFOTYPE | = lv_infotype | |
SUBTYPE | = lv_subtype | |
MOLGA | = lv_molga | |
BEST_ONLY | = lv_best_only | |
MIN_SCORE | = lv_min_score | |
IMPORTING | ||
PAYEE_KEY | = lv_payee_key | |
EXCEPTIONS | ||
NO_MATCH = 1 | ||
. " HR_SUGGEST_PAYEE_KEY |
ABAP code using 7.40 inline data declarations to call FM HR_SUGGEST_PAYEE_KEY
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single EMFSL FROM T521C INTO @DATA(ld_payee_key). | ||||
"SELECT single MOLGA FROM T521C INTO @DATA(ld_molga). | ||||
DATA(ld_best_only) | = ' '. | |||
DATA(ld_min_score) | = 4. | |||
Search for further information about these or an SAP related objects