SAP CR_WORKCENTER_PRE_READ Function Module for Read work centers in buffer









CR_WORKCENTER_PRE_READ is a standard cr workcenter pre 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 work centers in buffer 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 workcenter pre read FM, simply by entering the name CR_WORKCENTER_PRE_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function CR_WORKCENTER_PRE_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 'CR_WORKCENTER_PRE_READ'"Read work centers in buffer
EXPORTING
* CAP_ALL = ' ' "Pre-read of all capacities
* CAP_AVAIL = 'X' "If capacity read, then also with quotation
* CAP_BAS = ' ' "Pre-read scheduling capacities
* VIEW_RCR01 = ' ' "Access is carried out with view RCR01
* NO_TEXTS = ' ' "

TABLES
* TARBID = "Table of the work center IDs
* THROID = "
* RANGE_ARBPL = "
* RANGE_WERKS = "

EXCEPTIONS
WRONG_SELECTION = 1
.



IMPORTING Parameters details for CR_WORKCENTER_PRE_READ

CAP_ALL - Pre-read of all capacities

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

CAP_AVAIL - If capacity read, then also with quotation

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

CAP_BAS - Pre-read scheduling capacities

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

VIEW_RCR01 - Access is carried out with view RCR01

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

NO_TEXTS -

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

TABLES Parameters details for CR_WORKCENTER_PRE_READ

TARBID - Table of the work center IDs

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

THROID -

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

RANGE_ARBPL -

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

RANGE_WERKS -

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

EXCEPTIONS details

WRONG_SELECTION -

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

Copy and paste ABAP code example for CR_WORKCENTER_PRE_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:
lt_tarbid  TYPE STANDARD TABLE OF CRID, "   
lv_cap_all  TYPE C, "   SPACE
lv_wrong_selection  TYPE C, "   
lt_throid  TYPE STANDARD TABLE OF CRID, "   
lv_cap_avail  TYPE C, "   'X'
lv_cap_bas  TYPE C, "   SPACE
lt_range_arbpl  TYPE STANDARD TABLE OF RANGE_C8, "   
lv_view_rcr01  TYPE C, "   SPACE
lt_range_werks  TYPE STANDARD TABLE OF RANGE_C4, "   
lv_no_texts  TYPE C. "   SPACE

  CALL FUNCTION 'CR_WORKCENTER_PRE_READ'  "Read work centers in buffer
    EXPORTING
         CAP_ALL = lv_cap_all
         CAP_AVAIL = lv_cap_avail
         CAP_BAS = lv_cap_bas
         VIEW_RCR01 = lv_view_rcr01
         NO_TEXTS = lv_no_texts
    TABLES
         TARBID = lt_tarbid
         THROID = lt_throid
         RANGE_ARBPL = lt_range_arbpl
         RANGE_WERKS = lt_range_werks
    EXCEPTIONS
        WRONG_SELECTION = 1
. " CR_WORKCENTER_PRE_READ




ABAP code using 7.40 inline data declarations to call FM CR_WORKCENTER_PRE_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.

 
DATA(ld_cap_all) = ' '.
 
 
 
DATA(ld_cap_avail) = 'X'.
 
DATA(ld_cap_bas) = ' '.
 
 
DATA(ld_view_rcr01) = ' '.
 
 
DATA(ld_no_texts) = ' '.
 


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!