SAP CO_I1_MAINTENANCE_ITEM_SETTLE Function Module for NOTRANSL: Wartungsplanposition --> Defaultregel bilden
CO_I1_MAINTENANCE_ITEM_SETTLE is a standard co i1 maintenance item settle SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Wartungsplanposition --> Defaultregel bilden 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 i1 maintenance item settle FM, simply by entering the name CO_I1_MAINTENANCE_ITEM_SETTLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: COI1
Program Name: SAPLCOI1
Main Program: SAPLCOI1
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO_I1_MAINTENANCE_ITEM_SETTLE 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_I1_MAINTENANCE_ITEM_SETTLE'"NOTRANSL: Wartungsplanposition --> Defaultregel bilden.
EXPORTING
AUART_IMP = "Order Type
BUKRS_IMP = "Company Code
* GSBER_IMP = "Business Area
* WERKS_IMP = "Maintenance Planning Plant
ILOA_IMP = "Location Data
KOKRS_IMP = "Controlling Area
* OBART_IMP = 'WP' "Default object type
OBJNR_IMP = "CO Object Number
IMPORTING
MAXBR = "
EXCEPTIONS
NOT_SETTELED = 1 NO_SETTLEMENT_ALLOWED = 2
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_SAPLCOI1_027 Customer Enhancement: Create Settlement Rule
EXIT_SAPLCOI1_030 Customer exit: Preset COBL fields
IMPORTING Parameters details for CO_I1_MAINTENANCE_ITEM_SETTLE
AUART_IMP - Order Type
Data type: CAUFVD-AUARTOptional: No
Call by Reference: No ( called with pass by value option)
BUKRS_IMP - Company Code
Data type: CAUFVD-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
GSBER_IMP - Business Area
Data type: MPOS-GSBEROptional: Yes
Call by Reference: Yes
WERKS_IMP - Maintenance Planning Plant
Data type: CAUFVD-IWERKOptional: Yes
Call by Reference: Yes
ILOA_IMP - Location Data
Data type: ILOAOptional: No
Call by Reference: No ( called with pass by value option)
KOKRS_IMP - Controlling Area
Data type: CAUFVD-KOKRSOptional: No
Call by Reference: No ( called with pass by value option)
OBART_IMP - Default object type
Data type: IONR-OBARTDefault: 'WP'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJNR_IMP - CO Object Number
Data type: CAUFVD-OBJNROptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_I1_MAINTENANCE_ITEM_SETTLE
MAXBR -
Data type: TKB1A-MAXBROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_SETTELED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SETTLEMENT_ALLOWED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_I1_MAINTENANCE_ITEM_SETTLE 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_maxbr | TYPE TKB1A-MAXBR, " | |||
| lv_auart_imp | TYPE CAUFVD-AUART, " | |||
| lv_not_setteled | TYPE CAUFVD, " | |||
| lv_bukrs_imp | TYPE CAUFVD-BUKRS, " | |||
| lv_no_settlement_allowed | TYPE CAUFVD, " | |||
| lv_gsber_imp | TYPE MPOS-GSBER, " | |||
| lv_werks_imp | TYPE CAUFVD-IWERK, " | |||
| lv_iloa_imp | TYPE ILOA, " | |||
| lv_kokrs_imp | TYPE CAUFVD-KOKRS, " | |||
| lv_obart_imp | TYPE IONR-OBART, " 'WP' | |||
| lv_objnr_imp | TYPE CAUFVD-OBJNR. " |
|   CALL FUNCTION 'CO_I1_MAINTENANCE_ITEM_SETTLE' "NOTRANSL: Wartungsplanposition --> Defaultregel bilden |
| EXPORTING | ||
| AUART_IMP | = lv_auart_imp | |
| BUKRS_IMP | = lv_bukrs_imp | |
| GSBER_IMP | = lv_gsber_imp | |
| WERKS_IMP | = lv_werks_imp | |
| ILOA_IMP | = lv_iloa_imp | |
| KOKRS_IMP | = lv_kokrs_imp | |
| OBART_IMP | = lv_obart_imp | |
| OBJNR_IMP | = lv_objnr_imp | |
| IMPORTING | ||
| MAXBR | = lv_maxbr | |
| EXCEPTIONS | ||
| NOT_SETTELED = 1 | ||
| NO_SETTLEMENT_ALLOWED = 2 | ||
| . " CO_I1_MAINTENANCE_ITEM_SETTLE | ||
ABAP code using 7.40 inline data declarations to call FM CO_I1_MAINTENANCE_ITEM_SETTLE
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 MAXBR FROM TKB1A INTO @DATA(ld_maxbr). | ||||
| "SELECT single AUART FROM CAUFVD INTO @DATA(ld_auart_imp). | ||||
| "SELECT single BUKRS FROM CAUFVD INTO @DATA(ld_bukrs_imp). | ||||
| "SELECT single GSBER FROM MPOS INTO @DATA(ld_gsber_imp). | ||||
| "SELECT single IWERK FROM CAUFVD INTO @DATA(ld_werks_imp). | ||||
| "SELECT single KOKRS FROM CAUFVD INTO @DATA(ld_kokrs_imp). | ||||
| "SELECT single OBART FROM IONR INTO @DATA(ld_obart_imp). | ||||
| DATA(ld_obart_imp) | = 'WP'. | |||
| "SELECT single OBJNR FROM CAUFVD INTO @DATA(ld_objnr_imp). | ||||
Search for further information about these or an SAP related objects