SAP CR_WORKSTATION_CHECK Function Module for Check existence of the work center









CR_WORKSTATION_CHECK is a standard cr workstation check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check existence of the work center 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 cr workstation check FM, simply by entering the name CR_WORKSTATION_CHECK into the relevant SAP transaction such as SE37 or SE38.

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



Function CR_WORKSTATION_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 'CR_WORKSTATION_CHECK'"Check existence of the work center
EXPORTING
ARBPL = "Work center
* MSGTY = 'E' "Message type
WERKS = "Plant

IMPORTING
ARBID = "Work center ID
ID = "Use ARBID now !!!!!
KTEXT = "Short text
OBJTY = "Object type work center
VERWE = "Work center category
LVORM = "Deletion flag
XSPRR = "Lock indicator

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for CR_WORKSTATION_CHECK

ARBPL - Work center

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

MSGTY - Message type

Data type: SY-MSGTY
Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WERKS - Plant

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

EXPORTING Parameters details for CR_WORKSTATION_CHECK

ARBID - Work center ID

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

ID - Use ARBID now !!!!!

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

KTEXT - Short text

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

OBJTY - Object type work center

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

VERWE - Work center category

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

LVORM - Deletion flag

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

XSPRR - Lock indicator

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

EXCEPTIONS details

NOT_FOUND - Not found

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

Copy and paste ABAP code example for CR_WORKSTATION_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_arbid  TYPE CRHD-OBJID, "   
lv_arbpl  TYPE CRHD-ARBPL, "   
lv_not_found  TYPE CRHD, "   
lv_id  TYPE P3000-OBJID, "   
lv_msgty  TYPE SY-MSGTY, "   'E'
lv_ktext  TYPE CRTX-KTEXT, "   
lv_werks  TYPE CRHD-WERKS, "   
lv_objty  TYPE CRHD-OBJTY, "   
lv_verwe  TYPE CRHD-VERWE, "   
lv_lvorm  TYPE CRHD-LVORM, "   
lv_xsprr  TYPE CRHD-XSPRR. "   

  CALL FUNCTION 'CR_WORKSTATION_CHECK'  "Check existence of the work center
    EXPORTING
         ARBPL = lv_arbpl
         MSGTY = lv_msgty
         WERKS = lv_werks
    IMPORTING
         ARBID = lv_arbid
         ID = lv_id
         KTEXT = lv_ktext
         OBJTY = lv_objty
         VERWE = lv_verwe
         LVORM = lv_lvorm
         XSPRR = lv_xsprr
    EXCEPTIONS
        NOT_FOUND = 1
. " CR_WORKSTATION_CHECK




ABAP code using 7.40 inline data declarations to call FM CR_WORKSTATION_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 OBJID FROM CRHD INTO @DATA(ld_arbid).
 
"SELECT single ARBPL FROM CRHD INTO @DATA(ld_arbpl).
 
 
"SELECT single OBJID FROM P3000 INTO @DATA(ld_id).
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_msgty).
DATA(ld_msgty) = 'E'.
 
"SELECT single KTEXT FROM CRTX INTO @DATA(ld_ktext).
 
"SELECT single WERKS FROM CRHD INTO @DATA(ld_werks).
 
"SELECT single OBJTY FROM CRHD INTO @DATA(ld_objty).
 
"SELECT single VERWE FROM CRHD INTO @DATA(ld_verwe).
 
"SELECT single LVORM FROM CRHD INTO @DATA(ld_lvorm).
 
"SELECT single XSPRR FROM CRHD INTO @DATA(ld_xsprr).
 


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!