SAP CLOI_ROUTING_READ Function Module for Read routings for given ranges tables
CLOI_ROUTING_READ is a standard cloi routing 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 routings for given ranges tables 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 routing read FM, simply by entering the name CLOI_ROUTING_READ 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): Normal Function Module
Update:

Function CLOI_ROUTING_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_ROUTING_READ'"Read routings for given ranges tables.
EXPORTING
DATE_FR = "
DATE_TO = "
* LOT_FR = "
* LOT_TO = "
* MESTYP = "
* LOGSYS = "
* ROU_SEL_RES = ' ' "
* SEND_ONLY_CHANGES = "
IMPORTING
SELECTED_MASTERIDOCS = "
TABLES
* MATWRK_KEY = "
* ROUT_DATA = "
* ROUTING_KEY = "
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_ROUTING_READ
DATE_FR -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
DATE_TO -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
LOT_FR -
Data type: PLKO-LOSVNOptional: Yes
Call by Reference: No ( called with pass by value option)
LOT_TO -
Data type: PLKO-LOSBSOptional: Yes
Call by Reference: No ( called with pass by value option)
MESTYP -
Data type: TBDME-MESTYPOptional: Yes
Call by Reference: No ( called with pass by value option)
LOGSYS -
Data type: TBDLST-LOGSYSOptional: Yes
Call by Reference: No ( called with pass by value option)
ROU_SEL_RES -
Data type: MARC-KZKUPDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEND_ONLY_CHANGES -
Data type: CLOI_PARA-XFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLOI_ROUTING_READ
SELECTED_MASTERIDOCS -
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CLOI_ROUTING_READ
MATWRK_KEY -
Data type: CLOI_KEY_MATOptional: Yes
Call by Reference: No ( called with pass by value option)
ROUT_DATA -
Data type: CLOI_MAPL_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
ROUTING_KEY -
Data type: CLOIROUTINGKEYOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for CLOI_ROUTING_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_date_fr | TYPE SY-DATUM, " | |||
| lt_matwrk_key | TYPE STANDARD TABLE OF CLOI_KEY_MAT, " | |||
| lv_selected_masteridocs | TYPE SY-TABIX, " | |||
| lv_date_to | TYPE SY-DATUM, " | |||
| lt_rout_data | TYPE STANDARD TABLE OF CLOI_MAPL_TAB, " | |||
| lv_lot_fr | TYPE PLKO-LOSVN, " | |||
| lt_routing_key | TYPE STANDARD TABLE OF CLOIROUTINGKEY, " | |||
| lv_lot_to | TYPE PLKO-LOSBS, " | |||
| lv_mestyp | TYPE TBDME-MESTYP, " | |||
| lv_logsys | TYPE TBDLST-LOGSYS, " | |||
| lv_rou_sel_res | TYPE MARC-KZKUP, " SPACE | |||
| lv_send_only_changes | TYPE CLOI_PARA-XFLAG. " |
|   CALL FUNCTION 'CLOI_ROUTING_READ' "Read routings for given ranges tables |
| EXPORTING | ||
| DATE_FR | = lv_date_fr | |
| DATE_TO | = lv_date_to | |
| LOT_FR | = lv_lot_fr | |
| LOT_TO | = lv_lot_to | |
| MESTYP | = lv_mestyp | |
| LOGSYS | = lv_logsys | |
| ROU_SEL_RES | = lv_rou_sel_res | |
| SEND_ONLY_CHANGES | = lv_send_only_changes | |
| IMPORTING | ||
| SELECTED_MASTERIDOCS | = lv_selected_masteridocs | |
| TABLES | ||
| MATWRK_KEY | = lt_matwrk_key | |
| ROUT_DATA | = lt_rout_data | |
| ROUTING_KEY | = lt_routing_key | |
| . " CLOI_ROUTING_READ | ||
ABAP code using 7.40 inline data declarations to call FM CLOI_ROUTING_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 DATUM FROM SY INTO @DATA(ld_date_fr). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_selected_masteridocs). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_date_to). | ||||
| "SELECT single LOSVN FROM PLKO INTO @DATA(ld_lot_fr). | ||||
| "SELECT single LOSBS FROM PLKO INTO @DATA(ld_lot_to). | ||||
| "SELECT single MESTYP FROM TBDME INTO @DATA(ld_mestyp). | ||||
| "SELECT single LOGSYS FROM TBDLST INTO @DATA(ld_logsys). | ||||
| "SELECT single KZKUP FROM MARC INTO @DATA(ld_rou_sel_res). | ||||
| DATA(ld_rou_sel_res) | = ' '. | |||
| "SELECT single XFLAG FROM CLOI_PARA INTO @DATA(ld_send_only_changes). | ||||
Search for further information about these or an SAP related objects