SAP PM_PARTNER_READ Function Module for Read Partners









PM_PARTNER_READ is a standard pm partner read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Partners 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 pm partner read FM, simply by entering the name PM_PARTNER_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: IPAR
Program Name: SAPLIPAR
Main Program: SAPLIPAR
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function PM_PARTNER_READ 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 'PM_PARTNER_READ'"Read Partners
EXPORTING
* PARVW = ' ' "Partner function
PARNR = "Partners
* NRART = ' ' "Partner type
* ADRNR = "
* CHECK_DEBITOR = 'X' "
* OBJNR = "Object Number
* NO_TABIX_DET = "

IMPORTING
PARNR_EXP = "Partner as export parameter (Conversion)
CUSTOMER_CONTACT = "Name of contact person
ADRNR_SD = "
ADRDA = "
ADRND = "
ADRNP = "
DIADRC_WA = "Company address
DIADRP_WA = "Private address
DIADR_WA = "Address
DIADRCPD_WA = "
XCPDK = "One-time indicator for customers
E_NRART = "Partner type (Export)
KTOKD = "Customer Account Group
VTEXT = "Name Partner Function

EXCEPTIONS
NO_VALID_PARNR = 1 NO_VALID_PARNR_TODAY = 2 NO_AUTHORITY = 3 PARVW_AND_NRART_INITAL = 4
.




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_SAPLIPAR_002 Selection of Notification Partners
EXIT_SAPLIPAR_003 Customizing Partner Check
EXIT_SAPLIPAR_004 Reading of the Additionally Supported Partner Types
EXIT_SAPLIPAR_005 F4 Help for Additonal Partner Types

IMPORTING Parameters details for PM_PARTNER_READ

PARVW - Partner function

Data type: IHPA-PARVW
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARNR - Partners

Data type: IHPA-PARNR
Optional: No
Call by Reference: No ( called with pass by value option)

NRART - Partner type

Data type: TPAR-NRART
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ADRNR -

Data type: IHPA-ADRNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_DEBITOR -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJNR - Object Number

Data type: IHPA-OBJNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_TABIX_DET -

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for PM_PARTNER_READ

PARNR_EXP - Partner as export parameter (Conversion)

Data type: IHPA-PARNR
Optional: No
Call by Reference: No ( called with pass by value option)

CUSTOMER_CONTACT - Name of contact person

Data type: SPHFIELDS-VALUE
Optional: No
Call by Reference: No ( called with pass by value option)

ADRNR_SD -

Data type: IHPAVB-ADRNR_KUPAV
Optional: No
Call by Reference: No ( called with pass by value option)

ADRDA -

Data type: IHPAVB-ADRDA
Optional: No
Call by Reference: No ( called with pass by value option)

ADRND -

Data type: IHPAVB-ADRND
Optional: No
Call by Reference: No ( called with pass by value option)

ADRNP -

Data type: IHPAVB-ADRNP
Optional: No
Call by Reference: No ( called with pass by value option)

DIADRC_WA - Company address

Data type: DIADRC
Optional: No
Call by Reference: Yes

DIADRP_WA - Private address

Data type: DIADRP
Optional: No
Call by Reference: Yes

DIADR_WA - Address

Data type: DIADR
Optional: No
Call by Reference: Yes

DIADRCPD_WA -

Data type: DIADRCPD
Optional: No
Call by Reference: No ( called with pass by value option)

XCPDK - One-time indicator for customers

Data type: KUPAV-XCPDK
Optional: No
Call by Reference: No ( called with pass by value option)

E_NRART - Partner type (Export)

Data type: TPAR-NRART
Optional: No
Call by Reference: No ( called with pass by value option)

KTOKD - Customer Account Group

Data type: KUPAV-KTOKD
Optional: No
Call by Reference: No ( called with pass by value option)

VTEXT - Name Partner Function

Data type: TPART-VTEXT
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_VALID_PARNR - Partner not available

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_VALID_PARNR_TODAY - Partner available, but not valid timewise

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AUTHORITY - You do not have authorization to display the data

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PARVW_AND_NRART_INITAL -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for PM_PARTNER_READ 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_parvw  TYPE IHPA-PARVW, "   SPACE
lv_parnr_exp  TYPE IHPA-PARNR, "   
lv_no_valid_parnr  TYPE IHPA, "   
lv_customer_contact  TYPE SPHFIELDS-VALUE, "   
lv_adrnr_sd  TYPE IHPAVB-ADRNR_KUPAV, "   
lv_adrda  TYPE IHPAVB-ADRDA, "   
lv_adrnd  TYPE IHPAVB-ADRND, "   
lv_adrnp  TYPE IHPAVB-ADRNP, "   
lv_parnr  TYPE IHPA-PARNR, "   
lv_diadrc_wa  TYPE DIADRC, "   
lv_no_valid_parnr_today  TYPE DIADRC, "   
lv_nrart  TYPE TPAR-NRART, "   SPACE
lv_diadrp_wa  TYPE DIADRP, "   
lv_no_authority  TYPE DIADRP, "   
lv_adrnr  TYPE IHPA-ADRNR, "   
lv_diadr_wa  TYPE DIADR, "   
lv_parvw_and_nrart_inital  TYPE DIADR, "   
lv_diadrcpd_wa  TYPE DIADRCPD, "   
lv_check_debitor  TYPE DIADRCPD, "   'X'
lv_objnr  TYPE IHPA-OBJNR, "   
lv_xcpdk  TYPE KUPAV-XCPDK, "   
lv_e_nrart  TYPE TPAR-NRART, "   
lv_no_tabix_det  TYPE C, "   
lv_ktokd  TYPE KUPAV-KTOKD, "   
lv_vtext  TYPE TPART-VTEXT. "   

  CALL FUNCTION 'PM_PARTNER_READ'  "Read Partners
    EXPORTING
         PARVW = lv_parvw
         PARNR = lv_parnr
         NRART = lv_nrart
         ADRNR = lv_adrnr
         CHECK_DEBITOR = lv_check_debitor
         OBJNR = lv_objnr
         NO_TABIX_DET = lv_no_tabix_det
    IMPORTING
         PARNR_EXP = lv_parnr_exp
         CUSTOMER_CONTACT = lv_customer_contact
         ADRNR_SD = lv_adrnr_sd
         ADRDA = lv_adrda
         ADRND = lv_adrnd
         ADRNP = lv_adrnp
         DIADRC_WA = lv_diadrc_wa
         DIADRP_WA = lv_diadrp_wa
         DIADR_WA = lv_diadr_wa
         DIADRCPD_WA = lv_diadrcpd_wa
         XCPDK = lv_xcpdk
         E_NRART = lv_e_nrart
         KTOKD = lv_ktokd
         VTEXT = lv_vtext
    EXCEPTIONS
        NO_VALID_PARNR = 1
        NO_VALID_PARNR_TODAY = 2
        NO_AUTHORITY = 3
        PARVW_AND_NRART_INITAL = 4
. " PM_PARTNER_READ




ABAP code using 7.40 inline data declarations to call FM PM_PARTNER_READ

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 PARVW FROM IHPA INTO @DATA(ld_parvw).
DATA(ld_parvw) = ' '.
 
"SELECT single PARNR FROM IHPA INTO @DATA(ld_parnr_exp).
 
 
"SELECT single VALUE FROM SPHFIELDS INTO @DATA(ld_customer_contact).
 
"SELECT single ADRNR_KUPAV FROM IHPAVB INTO @DATA(ld_adrnr_sd).
 
"SELECT single ADRDA FROM IHPAVB INTO @DATA(ld_adrda).
 
"SELECT single ADRND FROM IHPAVB INTO @DATA(ld_adrnd).
 
"SELECT single ADRNP FROM IHPAVB INTO @DATA(ld_adrnp).
 
"SELECT single PARNR FROM IHPA INTO @DATA(ld_parnr).
 
 
 
"SELECT single NRART FROM TPAR INTO @DATA(ld_nrart).
DATA(ld_nrart) = ' '.
 
 
 
"SELECT single ADRNR FROM IHPA INTO @DATA(ld_adrnr).
 
 
 
 
DATA(ld_check_debitor) = 'X'.
 
"SELECT single OBJNR FROM IHPA INTO @DATA(ld_objnr).
 
"SELECT single XCPDK FROM KUPAV INTO @DATA(ld_xcpdk).
 
"SELECT single NRART FROM TPAR INTO @DATA(ld_e_nrart).
 
 
"SELECT single KTOKD FROM KUPAV INTO @DATA(ld_ktokd).
 
"SELECT single VTEXT FROM TPART INTO @DATA(ld_vtext).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!