SAP CO_ZA_AVAILABILITY_CAP_CHECK Function Module for Capacity Availability Check
CO_ZA_AVAILABILITY_CAP_CHECK is a standard co za availability cap 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 Capacity Availability Check 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 co za availability cap check FM, simply by entering the name CO_ZA_AVAILABILITY_CAP_CHECK into the relevant SAP transaction such as SE37 or SE38.
Function Group: COZA
Program Name: SAPLCOZA
Main Program: SAPLCOZA
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_ZA_AVAILABILITY_CAP_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 'CO_ZA_AVAILABILITY_CAP_CHECK'"Capacity Availability Check.
EXPORTING
I_CAUFVD = "Structure order header
* I_OPEN_CALL = ' ' "Call up on order creation
* I_REL_CALL = ' ' "Call up on order release
* I_NO_DIALOG = ' ' "Not online
* I_MSG_OBJ_DEP = ' ' "
IMPORTING
RETCODE_EXP = "Return code: 0: No overload
E_CAUFVD = "
IMPORTING Parameters details for CO_ZA_AVAILABILITY_CAP_CHECK
I_CAUFVD - Structure order header
Data type: CAUFVDOptional: No
Call by Reference: Yes
I_OPEN_CALL - Call up on order creation
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_REL_CALL - Call up on order release
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_NO_DIALOG - Not online
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MSG_OBJ_DEP -
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_ZA_AVAILABILITY_CAP_CHECK
RETCODE_EXP - Return code: 0: No overload
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
E_CAUFVD -
Data type: CAUFVDOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for CO_ZA_AVAILABILITY_CAP_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_i_caufvd | TYPE CAUFVD, " | |||
| lv_retcode_exp | TYPE SY-SUBRC, " | |||
| lv_e_caufvd | TYPE CAUFVD, " | |||
| lv_i_open_call | TYPE SY-DATAR, " SPACE | |||
| lv_i_rel_call | TYPE SY-DATAR, " SPACE | |||
| lv_i_no_dialog | TYPE SY-DATAR, " SPACE | |||
| lv_i_msg_obj_dep | TYPE SY-DATAR. " SPACE |
|   CALL FUNCTION 'CO_ZA_AVAILABILITY_CAP_CHECK' "Capacity Availability Check |
| EXPORTING | ||
| I_CAUFVD | = lv_i_caufvd | |
| I_OPEN_CALL | = lv_i_open_call | |
| I_REL_CALL | = lv_i_rel_call | |
| I_NO_DIALOG | = lv_i_no_dialog | |
| I_MSG_OBJ_DEP | = lv_i_msg_obj_dep | |
| IMPORTING | ||
| RETCODE_EXP | = lv_retcode_exp | |
| E_CAUFVD | = lv_e_caufvd | |
| . " CO_ZA_AVAILABILITY_CAP_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM CO_ZA_AVAILABILITY_CAP_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 SUBRC FROM SY INTO @DATA(ld_retcode_exp). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_i_open_call). | ||||
| DATA(ld_i_open_call) | = ' '. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_i_rel_call). | ||||
| DATA(ld_i_rel_call) | = ' '. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_i_no_dialog). | ||||
| DATA(ld_i_no_dialog) | = ' '. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_i_msg_obj_dep). | ||||
| DATA(ld_i_msg_obj_dep) | = ' '. | |||
Search for further information about these or an SAP related objects