SAP MILL_OC_ORDER_MERGE Function Module for NOTRANSL: Zusammenfassen (Teile) verschiedener Aufträge in einen Auftrag









MILL_OC_ORDER_MERGE is a standard mill oc order merge 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: Zusammenfassen (Teile) verschiedener Aufträge in einen Auftrag 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 mill oc order merge FM, simply by entering the name MILL_OC_ORDER_MERGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MILL_OC
Program Name: SAPLMILL_OC
Main Program: SAPLMILL_OC
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MILL_OC_ORDER_MERGE 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 'MILL_OC_ORDER_MERGE'"NOTRANSL: Zusammenfassen (Teile) verschiedener Aufträge in einen Auftrag
EXPORTING
* I_READ_DATA = 'X' "
* I_WERKS = "Plant
* I_ALL_OPERATION = 'X' "
* I_DARK = "Selection Indicator
* I_SELID = "Selection Profile for Order Combination

TABLES
IT_ORDERS = "

EXCEPTIONS
COMBINATION_FAILED = 1 MISSING_PLANT = 2 MISSING_REFERENCEORDER = 3 COMBINATION_ABORTED = 4
.




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_SAPLMILL_OC_001
EXIT_SAPLMILL_OC_002
EXIT_SAPLMILL_OC_003
EXIT_SAPLMILL_OC_004
EXIT_SAPLMILL_OC_005

IMPORTING Parameters details for MILL_OC_ORDER_MERGE

I_READ_DATA -

Data type: RC27X-FLG_SEL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WERKS - Plant

Data type: T001W-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ALL_OPERATION -

Data type: RC27X-FLG_SEL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DARK - Selection Indicator

Data type: RC27X-FLG_SEL
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SELID - Selection Profile for Order Combination

Data type: MILL_SELPROF
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MILL_OC_ORDER_MERGE

IT_ORDERS -

Data type: MILL_OC_ORDER_COMB_STRUC
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

COMBINATION_FAILED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MISSING_PLANT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MISSING_REFERENCEORDER -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

COMBINATION_ABORTED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MILL_OC_ORDER_MERGE 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_it_orders  TYPE STANDARD TABLE OF MILL_OC_ORDER_COMB_STRUC, "   
lv_i_read_data  TYPE RC27X-FLG_SEL, "   'X'
lv_combination_failed  TYPE RC27X, "   
lv_i_werks  TYPE T001W-WERKS, "   
lv_missing_plant  TYPE T001W, "   
lv_i_all_operation  TYPE RC27X-FLG_SEL, "   'X'
lv_missing_referenceorder  TYPE RC27X, "   
lv_i_dark  TYPE RC27X-FLG_SEL, "   
lv_combination_aborted  TYPE RC27X, "   
lv_i_selid  TYPE MILL_SELPROF. "   

  CALL FUNCTION 'MILL_OC_ORDER_MERGE'  "NOTRANSL: Zusammenfassen (Teile) verschiedener Aufträge in einen Auftrag
    EXPORTING
         I_READ_DATA = lv_i_read_data
         I_WERKS = lv_i_werks
         I_ALL_OPERATION = lv_i_all_operation
         I_DARK = lv_i_dark
         I_SELID = lv_i_selid
    TABLES
         IT_ORDERS = lt_it_orders
    EXCEPTIONS
        COMBINATION_FAILED = 1
        MISSING_PLANT = 2
        MISSING_REFERENCEORDER = 3
        COMBINATION_ABORTED = 4
. " MILL_OC_ORDER_MERGE




ABAP code using 7.40 inline data declarations to call FM MILL_OC_ORDER_MERGE

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 FLG_SEL FROM RC27X INTO @DATA(ld_i_read_data).
DATA(ld_i_read_data) = 'X'.
 
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_i_werks).
 
 
"SELECT single FLG_SEL FROM RC27X INTO @DATA(ld_i_all_operation).
DATA(ld_i_all_operation) = 'X'.
 
 
"SELECT single FLG_SEL FROM RC27X INTO @DATA(ld_i_dark).
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!