SAP CLOI_MASTERIDOC_CREATE_LOIWCS Function Module for Create master IDOC for message type LOIWCS
CLOI_MASTERIDOC_CREATE_LOIWCS is a standard cloi masteridoc create loiwcs SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create master IDOC for message type LOIWCS 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 masteridoc create loiwcs FM, simply by entering the name CLOI_MASTERIDOC_CREATE_LOIWCS into the relevant SAP transaction such as SE37 or SE38.
Function Group: LOI1
Program Name: SAPLLOI1
Main Program: SAPLLOI1
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CLOI_MASTERIDOC_CREATE_LOIWCS 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_MASTERIDOC_CREATE_LOIWCS'"Create master IDOC for message type LOIWCS.
EXPORTING
OPT_SYS = "
MESSAGE_TYPE = "
* SUPPRESS_PROGRESS_INDICATOR = ' ' "
IMPORTING
SELECTED_MASTERIDOCS = "
TABLES
CRHDX = "
* KAKOIX = "Table KAKO with Message Function and IDoc-Relevant Flag
* CRCOX = "Table CRCO with Message Function and IDoc-Relevant Flag
CRTXX = "
CRCAX = "
KAKOX = "
KAREX = "
KAZYX = "
KAPAX = "
KAPEX = "
* COMM_IDOC_CTRL = "Control record (IDoc)
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_MASTERIDOC_CREATE_LOIWCS
OPT_SYS -
Data type: TBDLST-LOGSYSOptional: No
Call by Reference: No ( called with pass by value option)
MESSAGE_TYPE -
Data type: TBDME-MESTYPOptional: No
Call by Reference: No ( called with pass by value option)
SUPPRESS_PROGRESS_INDICATOR -
Data type: SY-DATARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLOI_MASTERIDOC_CREATE_LOIWCS
SELECTED_MASTERIDOCS -
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLOI_MASTERIDOC_CREATE_LOIWCS
CRHDX -
Data type: CLOICRHDOptional: No
Call by Reference: No ( called with pass by value option)
KAKOIX - Table KAKO with Message Function and IDoc-Relevant Flag
Data type: CLOIKAKOOptional: Yes
Call by Reference: Yes
CRCOX - Table CRCO with Message Function and IDoc-Relevant Flag
Data type: CLOICRCOOptional: Yes
Call by Reference: Yes
CRTXX -
Data type: CLOICRTXOptional: No
Call by Reference: No ( called with pass by value option)
CRCAX -
Data type: CLOICRCAOptional: No
Call by Reference: No ( called with pass by value option)
KAKOX -
Data type: CLOIKAKOOptional: No
Call by Reference: No ( called with pass by value option)
KAREX -
Data type: CLOIKAREOptional: No
Call by Reference: No ( called with pass by value option)
KAZYX -
Data type: CLOIKAZYOptional: No
Call by Reference: No ( called with pass by value option)
KAPAX -
Data type: CLOIKAPAOptional: No
Call by Reference: No ( called with pass by value option)
KAPEX -
Data type: CLOIKAPEOptional: No
Call by Reference: No ( called with pass by value option)
COMM_IDOC_CTRL - Control record (IDoc)
Data type: EDIDCOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for CLOI_MASTERIDOC_CREATE_LOIWCS 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_crhdx | TYPE STANDARD TABLE OF CLOICRHD, " | |||
| lv_opt_sys | TYPE TBDLST-LOGSYS, " | |||
| lv_selected_masteridocs | TYPE SY-TABIX, " | |||
| lt_kakoix | TYPE STANDARD TABLE OF CLOIKAKO, " | |||
| lt_crcox | TYPE STANDARD TABLE OF CLOICRCO, " | |||
| lt_crtxx | TYPE STANDARD TABLE OF CLOICRTX, " | |||
| lv_message_type | TYPE TBDME-MESTYP, " | |||
| lt_crcax | TYPE STANDARD TABLE OF CLOICRCA, " | |||
| lv_suppress_progress_indicator | TYPE SY-DATAR, " SPACE | |||
| lt_kakox | TYPE STANDARD TABLE OF CLOIKAKO, " | |||
| lt_karex | TYPE STANDARD TABLE OF CLOIKARE, " | |||
| lt_kazyx | TYPE STANDARD TABLE OF CLOIKAZY, " | |||
| lt_kapax | TYPE STANDARD TABLE OF CLOIKAPA, " | |||
| lt_kapex | TYPE STANDARD TABLE OF CLOIKAPE, " | |||
| lt_comm_idoc_ctrl | TYPE STANDARD TABLE OF EDIDC. " |
|   CALL FUNCTION 'CLOI_MASTERIDOC_CREATE_LOIWCS' "Create master IDOC for message type LOIWCS |
| EXPORTING | ||
| OPT_SYS | = lv_opt_sys | |
| MESSAGE_TYPE | = lv_message_type | |
| SUPPRESS_PROGRESS_INDICATOR | = lv_suppress_progress_indicator | |
| IMPORTING | ||
| SELECTED_MASTERIDOCS | = lv_selected_masteridocs | |
| TABLES | ||
| CRHDX | = lt_crhdx | |
| KAKOIX | = lt_kakoix | |
| CRCOX | = lt_crcox | |
| CRTXX | = lt_crtxx | |
| CRCAX | = lt_crcax | |
| KAKOX | = lt_kakox | |
| KAREX | = lt_karex | |
| KAZYX | = lt_kazyx | |
| KAPAX | = lt_kapax | |
| KAPEX | = lt_kapex | |
| COMM_IDOC_CTRL | = lt_comm_idoc_ctrl | |
| . " CLOI_MASTERIDOC_CREATE_LOIWCS | ||
ABAP code using 7.40 inline data declarations to call FM CLOI_MASTERIDOC_CREATE_LOIWCS
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 LOGSYS FROM TBDLST INTO @DATA(ld_opt_sys). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_selected_masteridocs). | ||||
| "SELECT single MESTYP FROM TBDME INTO @DATA(ld_message_type). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_suppress_progress_indicator). | ||||
| DATA(ld_suppress_progress_indicator) | = ' '. | |||
Search for further information about these or an SAP related objects