SAP CHECK_PURCH_SITE_ASSIGNMENT Function Module for Calls user exit method to validate site assignment









CHECK_PURCH_SITE_ASSIGNMENT is a standard check purch site assignment SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Calls user exit method to validate site assignment 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 check purch site assignment FM, simply by entering the name CHECK_PURCH_SITE_ASSIGNMENT into the relevant SAP transaction such as SE37 or SE38.

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



Function CHECK_PURCH_SITE_ASSIGNMENT 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 'CHECK_PURCH_SITE_ASSIGNMENT'"Calls user exit method to validate site assignment
EXPORTING
I_EKORG = "Purchasing organization
I_REFSITE = "Reference Plant
T_WERKS = "Plants

IMPORTING
T_VALID_WERKS = "Plants
T_INVALID_WERKS = "Plants
T_ERRORS = "EHS: Application Log; Interface for APPL_LOG_WRITE_MESSAG
.



IMPORTING Parameters details for CHECK_PURCH_SITE_ASSIGNMENT

I_EKORG - Purchasing organization

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

I_REFSITE - Reference Plant

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

T_WERKS - Plants

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

EXPORTING Parameters details for CHECK_PURCH_SITE_ASSIGNMENT

T_VALID_WERKS - Plants

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

T_INVALID_WERKS - Plants

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

T_ERRORS - EHS: Application Log; Interface for APPL_LOG_WRITE_MESSAG

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

Copy and paste ABAP code example for CHECK_PURCH_SITE_ASSIGNMENT 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_i_ekorg  TYPE EKORG, "   
lv_t_valid_werks  TYPE T_WERKS, "   
lv_i_refsite  TYPE REFSITE, "   
lv_t_invalid_werks  TYPE T_WERKS, "   
lv_t_werks  TYPE T_WERKS, "   
lv_t_errors  TYPE BALMI_TAB. "   

  CALL FUNCTION 'CHECK_PURCH_SITE_ASSIGNMENT'  "Calls user exit method to validate site assignment
    EXPORTING
         I_EKORG = lv_i_ekorg
         I_REFSITE = lv_i_refsite
         T_WERKS = lv_t_werks
    IMPORTING
         T_VALID_WERKS = lv_t_valid_werks
         T_INVALID_WERKS = lv_t_invalid_werks
         T_ERRORS = lv_t_errors
. " CHECK_PURCH_SITE_ASSIGNMENT




ABAP code using 7.40 inline data declarations to call FM CHECK_PURCH_SITE_ASSIGNMENT

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.

 
 
 
 
 
 


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!