SAP IBAPI_ALM_ORDERSRULE_CREATE Function Module for NOTRANSL: Erzeugen von Abrechnungsregeln
IBAPI_ALM_ORDERSRULE_CREATE is a standard ibapi alm ordersrule create 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: Erzeugen von Abrechnungsregeln 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 ibapi alm ordersrule create FM, simply by entering the name IBAPI_ALM_ORDERSRULE_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: IBAPI_ALM_ORDER_SRULE
Program Name: SAPLIBAPI_ALM_ORDER_SRULE
Main Program: SAPLIBAPI_ALM_ORDER_SRULE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function IBAPI_ALM_ORDERSRULE_CREATE 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 'IBAPI_ALM_ORDERSRULE_CREATE'"NOTRANSL: Erzeugen von Abrechnungsregeln.
EXPORTING
IS_COBL = "Structure for ALM Order, Settlement Rule
IS_COBL_UP = "Update Bar COBL (for BAPI Processing)
IS_CAUFVD = "Dialog Structure for Order Headers and Item
* IS_AFVGD = "
IMPORTING
ET_MESSAGES = "Error Messages
EXCEPTIONS
ORDER_NOT_FOUND = 1 CONVERSION_ERROR = 2 MISSING_CUSTOMIZING = 3 ERROR_INSERTING_SRULE = 4 NO_SETTLEMENT_ALLOWED = 5 NOT_SETTLED = 6
IMPORTING Parameters details for IBAPI_ALM_ORDERSRULE_CREATE
IS_COBL - Structure for ALM Order, Settlement Rule
Data type: BAPI_ALM_ORDER_COBLOptional: No
Call by Reference: Yes
IS_COBL_UP - Update Bar COBL (for BAPI Processing)
Data type: COBL_IBAPI_UPDATEOptional: No
Call by Reference: Yes
IS_CAUFVD - Dialog Structure for Order Headers and Item
Data type: CAUFVDOptional: No
Call by Reference: Yes
IS_AFVGD -
Data type: AFVGDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for IBAPI_ALM_ORDERSRULE_CREATE
ET_MESSAGES - Error Messages
Data type: PS_MESSAGESOptional: No
Call by Reference: Yes
EXCEPTIONS details
ORDER_NOT_FOUND - Order does not exist
Data type:Optional: No
Call by Reference: Yes
CONVERSION_ERROR -
Data type:Optional: No
Call by Reference: Yes
MISSING_CUSTOMIZING -
Data type:Optional: No
Call by Reference: Yes
ERROR_INSERTING_SRULE -
Data type:Optional: No
Call by Reference: Yes
NO_SETTLEMENT_ALLOWED -
Data type:Optional: No
Call by Reference: Yes
NOT_SETTLED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for IBAPI_ALM_ORDERSRULE_CREATE 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_is_cobl | TYPE BAPI_ALM_ORDER_COBL, " | |||
| lv_et_messages | TYPE PS_MESSAGES, " | |||
| lv_order_not_found | TYPE PS_MESSAGES, " | |||
| lv_is_cobl_up | TYPE COBL_IBAPI_UPDATE, " | |||
| lv_conversion_error | TYPE COBL_IBAPI_UPDATE, " | |||
| lv_is_caufvd | TYPE CAUFVD, " | |||
| lv_missing_customizing | TYPE CAUFVD, " | |||
| lv_is_afvgd | TYPE AFVGD, " | |||
| lv_error_inserting_srule | TYPE AFVGD, " | |||
| lv_no_settlement_allowed | TYPE AFVGD, " | |||
| lv_not_settled | TYPE AFVGD. " |
|   CALL FUNCTION 'IBAPI_ALM_ORDERSRULE_CREATE' "NOTRANSL: Erzeugen von Abrechnungsregeln |
| EXPORTING | ||
| IS_COBL | = lv_is_cobl | |
| IS_COBL_UP | = lv_is_cobl_up | |
| IS_CAUFVD | = lv_is_caufvd | |
| IS_AFVGD | = lv_is_afvgd | |
| IMPORTING | ||
| ET_MESSAGES | = lv_et_messages | |
| EXCEPTIONS | ||
| ORDER_NOT_FOUND = 1 | ||
| CONVERSION_ERROR = 2 | ||
| MISSING_CUSTOMIZING = 3 | ||
| ERROR_INSERTING_SRULE = 4 | ||
| NO_SETTLEMENT_ALLOWED = 5 | ||
| NOT_SETTLED = 6 | ||
| . " IBAPI_ALM_ORDERSRULE_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM IBAPI_ALM_ORDERSRULE_CREATE
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.Search for further information about these or an SAP related objects