SAP CLOI_WC_CAPACITY_READ Function Module for Retrieve the available capacity of a work center
CLOI_WC_CAPACITY_READ is a standard cloi wc capacity 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 Retrieve the available capacity of a 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 cloi wc capacity read FM, simply by entering the name CLOI_WC_CAPACITY_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: LOI1
Program Name: SAPLLOI1
Main Program: SAPLLOI1
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CLOI_WC_CAPACITY_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 'CLOI_WC_CAPACITY_READ'"Retrieve the available capacity of a work center.
EXPORTING
CAPACITY_ID = "
VERSION = "
START_DATE = "
END_DATE = "
TABLES
CAPACITY_PERIOD = "
EXCEPTIONS
CAPACITY_NOT_FOUND = 1 VERSION_NOT_FOUND = 2 OUT_OF_TIME_FENCE = 3 OTHERS = 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_SAPLLOI1_001 User exit for planned orders
EXIT_SAPLLOI1_002 User exit for production orders
EXIT_SAPLLOI1_003 User exit for current stock/requirements lists
EXIT_SAPLLOI1_004 User exit for run schedule headers
EXIT_SAPLLOI1_005 User exit for BOMs
EXIT_SAPLLOI1_006 User exit for routings
EXIT_SAPLLOI1_007 User exit for work centers
EXIT_SAPLLOI1_008 User exit for hierarchies/resource networks
EXIT_SAPLLOI1_009 User exit for calendars
IMPORTING Parameters details for CLOI_WC_CAPACITY_READ
CAPACITY_ID -
Data type: RC65K-KAPIDOptional: No
Call by Reference: No ( called with pass by value option)
VERSION -
Data type: RC65K-VERSNOptional: No
Call by Reference: No ( called with pass by value option)
START_DATE -
Data type: RC65K-DATUVOptional: No
Call by Reference: No ( called with pass by value option)
END_DATE -
Data type: RC65K-DATUBOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLOI_WC_CAPACITY_READ
CAPACITY_PERIOD -
Data type: E3KARELOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CAPACITY_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VERSION_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OUT_OF_TIME_FENCE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OTHERS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLOI_WC_CAPACITY_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_capacity_id | TYPE RC65K-KAPID, " | |||
lt_capacity_period | TYPE STANDARD TABLE OF E3KAREL, " | |||
lv_capacity_not_found | TYPE E3KAREL, " | |||
lv_version | TYPE RC65K-VERSN, " | |||
lv_version_not_found | TYPE RC65K, " | |||
lv_start_date | TYPE RC65K-DATUV, " | |||
lv_out_of_time_fence | TYPE RC65K, " | |||
lv_others | TYPE RC65K, " | |||
lv_end_date | TYPE RC65K-DATUB. " |
  CALL FUNCTION 'CLOI_WC_CAPACITY_READ' "Retrieve the available capacity of a work center |
EXPORTING | ||
CAPACITY_ID | = lv_capacity_id | |
VERSION | = lv_version | |
START_DATE | = lv_start_date | |
END_DATE | = lv_end_date | |
TABLES | ||
CAPACITY_PERIOD | = lt_capacity_period | |
EXCEPTIONS | ||
CAPACITY_NOT_FOUND = 1 | ||
VERSION_NOT_FOUND = 2 | ||
OUT_OF_TIME_FENCE = 3 | ||
OTHERS = 4 | ||
. " CLOI_WC_CAPACITY_READ |
ABAP code using 7.40 inline data declarations to call FM CLOI_WC_CAPACITY_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 KAPID FROM RC65K INTO @DATA(ld_capacity_id). | ||||
"SELECT single VERSN FROM RC65K INTO @DATA(ld_version). | ||||
"SELECT single DATUV FROM RC65K INTO @DATA(ld_start_date). | ||||
"SELECT single DATUB FROM RC65K INTO @DATA(ld_end_date). | ||||
Search for further information about these or an SAP related objects