SAP PM_SD_CONTRACT_CHECK Function Module for









PM_SD_CONTRACT_CHECK is a standard pm sd contract check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 sd contract check FM, simply by entering the name PM_SD_CONTRACT_CHECK into the relevant SAP transaction such as SE37 or SE38.

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



Function PM_SD_CONTRACT_CHECK 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_SD_CONTRACT_CHECK'"
EXPORTING
VBELN = "SD document
* KUNUM = "
VPOSN = "Sales document item
DATE = "Reference date
TIME = "Reference time
EQUNR = "Equipment
TPLNR = "Functional location
WERKS = "Plant
KOKRS = "Controlling area
* MATNR = "

IMPORTING
X_PS_PSP_PNR = "

EXCEPTIONS
INVALID_ITEM = 1 REJECT_SD_ITEM = 2 INVALID_TECHNICAL_OBJECT = 3 NO_ACCOUNT_ASSIGNMENT = 4 INVALID_DATE = 5 NO_CONTRACT = 6 DIFFERENT_CONTROLLING_AREA = 7
.




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_SAPLISDI_001 Customer Exit for Determining Rejection of Billing Doc. Due to Warranty

IMPORTING Parameters details for PM_SD_CONTRACT_CHECK

VBELN - SD document

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

KUNUM -

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

VPOSN - Sales document item

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

DATE - Reference date

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

TIME - Reference time

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

EQUNR - Equipment

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

TPLNR - Functional location

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

WERKS - Plant

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

KOKRS - Controlling area

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

MATNR -

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

EXPORTING Parameters details for PM_SD_CONTRACT_CHECK

X_PS_PSP_PNR -

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

EXCEPTIONS details

INVALID_ITEM - Document item not available

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

REJECT_SD_ITEM - Reason for rejection in item

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

INVALID_TECHNICAL_OBJECT - No reference to technical object

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

NO_ACCOUNT_ASSIGNMENT - No CO object

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

INVALID_DATE - Period outside reference data

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

NO_CONTRACT - No maintenance agreement

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

DIFFERENT_CONTROLLING_AREA -

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

Copy and paste ABAP code example for PM_SD_CONTRACT_CHECK 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_vbeln  TYPE VEDA-VBELN, "   
lv_invalid_item  TYPE VEDA, "   
lv_x_ps_psp_pnr  TYPE VBAP-PS_PSP_PNR, "   
lv_kunum  TYPE VIQMEL-KUNUM, "   
lv_vposn  TYPE VEDA-VPOSN, "   
lv_reject_sd_item  TYPE VEDA, "   
lv_date  TYPE SY-DATUM, "   
lv_invalid_technical_object  TYPE SY, "   
lv_time  TYPE SY-UZEIT, "   
lv_no_account_assignment  TYPE SY, "   
lv_equnr  TYPE EQUI-EQUNR, "   
lv_invalid_date  TYPE EQUI, "   
lv_tplnr  TYPE IFLO-TPLNR, "   
lv_no_contract  TYPE IFLO, "   
lv_werks  TYPE CAUFVD-WERKS, "   
lv_different_controlling_area  TYPE CAUFVD, "   
lv_kokrs  TYPE CAUFVD-KOKRS, "   
lv_matnr  TYPE VIQMEL-MATNR. "   

  CALL FUNCTION 'PM_SD_CONTRACT_CHECK'  "
    EXPORTING
         VBELN = lv_vbeln
         KUNUM = lv_kunum
         VPOSN = lv_vposn
         DATE = lv_date
         TIME = lv_time
         EQUNR = lv_equnr
         TPLNR = lv_tplnr
         WERKS = lv_werks
         KOKRS = lv_kokrs
         MATNR = lv_matnr
    IMPORTING
         X_PS_PSP_PNR = lv_x_ps_psp_pnr
    EXCEPTIONS
        INVALID_ITEM = 1
        REJECT_SD_ITEM = 2
        INVALID_TECHNICAL_OBJECT = 3
        NO_ACCOUNT_ASSIGNMENT = 4
        INVALID_DATE = 5
        NO_CONTRACT = 6
        DIFFERENT_CONTROLLING_AREA = 7
. " PM_SD_CONTRACT_CHECK




ABAP code using 7.40 inline data declarations to call FM PM_SD_CONTRACT_CHECK

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 VBELN FROM VEDA INTO @DATA(ld_vbeln).
 
 
"SELECT single PS_PSP_PNR FROM VBAP INTO @DATA(ld_x_ps_psp_pnr).
 
"SELECT single KUNUM FROM VIQMEL INTO @DATA(ld_kunum).
 
"SELECT single VPOSN FROM VEDA INTO @DATA(ld_vposn).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_date).
 
 
"SELECT single UZEIT FROM SY INTO @DATA(ld_time).
 
 
"SELECT single EQUNR FROM EQUI INTO @DATA(ld_equnr).
 
 
"SELECT single TPLNR FROM IFLO INTO @DATA(ld_tplnr).
 
 
"SELECT single WERKS FROM CAUFVD INTO @DATA(ld_werks).
 
 
"SELECT single KOKRS FROM CAUFVD INTO @DATA(ld_kokrs).
 
"SELECT single MATNR FROM VIQMEL INTO @DATA(ld_matnr).
 


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!