SAP MM_SELECT_PARTNER Function Module for DE-EN-LANG-SWITCH-NO-TRANSLATION
MM_SELECT_PARTNER is a standard mm select partner SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DE-EN-LANG-SWITCH-NO-TRANSLATION 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 mm select partner FM, simply by entering the name MM_SELECT_PARTNER into the relevant SAP transaction such as SE37 or SE38.
Function Group: EKPA
Program Name: SAPLEKPA
Main Program: SAPLEKPA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MM_SELECT_PARTNER 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 'MM_SELECT_PARTNER'"DE-EN-LANG-SWITCH-NO-TRANSLATION.
EXPORTING
EBELN = "Agreement Number
* TIME_SPOT = ' ' "
BSTYP = "
EKORG = "Purchasing Organization
LIFNR = "Vendor
* LTSNR = ' ' "Vendor Subrange
* WERKS = ' ' "Plant
* PARGR = ' ' "
* HITYP = ' ' "
* POPUP_ADMISSIBLE = 'X' "
IMPORTING
E_LLIEF = "
E_LIFRE = "
LLIEF_INPUT_ALLOWED = "
LIFRE_INPUT_ALLOWED = "
TABLES
* X_MMPA = "Partner
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLEKPA_001 Specification of Search Strategy for Mandatory Roles
EXIT_SAPLEKPA_002 User Exit: Automatically Adopt Partner from Vendor Master?
IMPORTING Parameters details for MM_SELECT_PARTNER
EBELN - Agreement Number
Data type: EKKO-EBELNOptional: No
Call by Reference: No ( called with pass by value option)
TIME_SPOT -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
BSTYP -
Data type: EKKO-BSTYPOptional: No
Call by Reference: No ( called with pass by value option)
EKORG - Purchasing Organization
Data type: EKKO-EKORGOptional: No
Call by Reference: No ( called with pass by value option)
LIFNR - Vendor
Data type: EKKO-LIFNROptional: No
Call by Reference: No ( called with pass by value option)
LTSNR - Vendor Subrange
Data type: EKPA-LTSNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WERKS - Plant
Data type: EKPO-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PARGR -
Data type: T161-PARGRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
HITYP -
Data type: T161-HITYPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
POPUP_ADMISSIBLE -
Data type: SY-CALLDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MM_SELECT_PARTNER
E_LLIEF -
Data type: EKKO-LLIEFOptional: No
Call by Reference: No ( called with pass by value option)
E_LIFRE -
Data type: EKKO-LIFREOptional: No
Call by Reference: No ( called with pass by value option)
LLIEF_INPUT_ALLOWED -
Data type: SY-CALLDOptional: No
Call by Reference: No ( called with pass by value option)
LIFRE_INPUT_ALLOWED -
Data type: SY-CALLDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MM_SELECT_PARTNER
X_MMPA - Partner
Data type: MMPAOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for MM_SELECT_PARTNER 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_ebeln | TYPE EKKO-EBELN, " | |||
| lt_x_mmpa | TYPE STANDARD TABLE OF MMPA, " | |||
| lv_e_llief | TYPE EKKO-LLIEF, " | |||
| lv_time_spot | TYPE EKKO, " SPACE | |||
| lv_bstyp | TYPE EKKO-BSTYP, " | |||
| lv_e_lifre | TYPE EKKO-LIFRE, " | |||
| lv_ekorg | TYPE EKKO-EKORG, " | |||
| lv_llief_input_allowed | TYPE SY-CALLD, " | |||
| lv_lifnr | TYPE EKKO-LIFNR, " | |||
| lv_lifre_input_allowed | TYPE SY-CALLD, " | |||
| lv_ltsnr | TYPE EKPA-LTSNR, " SPACE | |||
| lv_werks | TYPE EKPO-WERKS, " SPACE | |||
| lv_pargr | TYPE T161-PARGR, " SPACE | |||
| lv_hityp | TYPE T161-HITYP, " SPACE | |||
| lv_popup_admissible | TYPE SY-CALLD. " 'X' |
|   CALL FUNCTION 'MM_SELECT_PARTNER' "DE-EN-LANG-SWITCH-NO-TRANSLATION |
| EXPORTING | ||
| EBELN | = lv_ebeln | |
| TIME_SPOT | = lv_time_spot | |
| BSTYP | = lv_bstyp | |
| EKORG | = lv_ekorg | |
| LIFNR | = lv_lifnr | |
| LTSNR | = lv_ltsnr | |
| WERKS | = lv_werks | |
| PARGR | = lv_pargr | |
| HITYP | = lv_hityp | |
| POPUP_ADMISSIBLE | = lv_popup_admissible | |
| IMPORTING | ||
| E_LLIEF | = lv_e_llief | |
| E_LIFRE | = lv_e_lifre | |
| LLIEF_INPUT_ALLOWED | = lv_llief_input_allowed | |
| LIFRE_INPUT_ALLOWED | = lv_lifre_input_allowed | |
| TABLES | ||
| X_MMPA | = lt_x_mmpa | |
| . " MM_SELECT_PARTNER | ||
ABAP code using 7.40 inline data declarations to call FM MM_SELECT_PARTNER
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 EBELN FROM EKKO INTO @DATA(ld_ebeln). | ||||
| "SELECT single LLIEF FROM EKKO INTO @DATA(ld_e_llief). | ||||
| DATA(ld_time_spot) | = ' '. | |||
| "SELECT single BSTYP FROM EKKO INTO @DATA(ld_bstyp). | ||||
| "SELECT single LIFRE FROM EKKO INTO @DATA(ld_e_lifre). | ||||
| "SELECT single EKORG FROM EKKO INTO @DATA(ld_ekorg). | ||||
| "SELECT single CALLD FROM SY INTO @DATA(ld_llief_input_allowed). | ||||
| "SELECT single LIFNR FROM EKKO INTO @DATA(ld_lifnr). | ||||
| "SELECT single CALLD FROM SY INTO @DATA(ld_lifre_input_allowed). | ||||
| "SELECT single LTSNR FROM EKPA INTO @DATA(ld_ltsnr). | ||||
| DATA(ld_ltsnr) | = ' '. | |||
| "SELECT single WERKS FROM EKPO INTO @DATA(ld_werks). | ||||
| DATA(ld_werks) | = ' '. | |||
| "SELECT single PARGR FROM T161 INTO @DATA(ld_pargr). | ||||
| DATA(ld_pargr) | = ' '. | |||
| "SELECT single HITYP FROM T161 INTO @DATA(ld_hityp). | ||||
| DATA(ld_hityp) | = ' '. | |||
| "SELECT single CALLD FROM SY INTO @DATA(ld_popup_admissible). | ||||
| DATA(ld_popup_admissible) | = 'X'. | |||
Search for further information about these or an SAP related objects