SAP MILL_PC_CHECK_PCCHA Function Module for NOTRANSL: Mill: Prozesscharge prüfen und sperren (MILL_MM_OB_CHECK_UCCHA)
MILL_PC_CHECK_PCCHA is a standard mill pc check pccha 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: Mill: Prozesscharge prüfen und sperren (MILL_MM_OB_CHECK_UCCHA) 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 pc check pccha FM, simply by entering the name MILL_PC_CHECK_PCCHA into the relevant SAP transaction such as SE37 or SE38.
Function Group: MILL_PC
Program Name: SAPLMILL_PC
Main Program: SAPLMILL_PC
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MILL_PC_CHECK_PCCHA 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_PC_CHECK_PCCHA'"NOTRANSL: Mill: Prozesscharge prüfen und sperren (MILL_MM_OB_CHECK_UCCHA).
EXPORTING
XDARK = "Character Field Length 1
IS_REF = "Mill: Confirmation, Process Batch, and Reference Fields
IMPORTING
OB_CHANGED_FLG = "Checkbox
OB_CHANGED_UCMAT = "Material from Original Batch
OB_CHANGED_UCCHA = "Original Batch
OB_CHANGED_UCWRK = "Plant from Original Batch
OB_CHANGED_UCMCH = "Internal use: Batch master record must be created
CHANGING
XMOB01 = "Dialog Structure: Original Batch
OLD_MOB01 = "Dialog Structure: Original Batch
TABLES
IT_PROOB = "Mill: Update Structure for Original Batches
EXCEPTIONS
ENQUEUE_NOT_POSSIBLE = 1 INTERVAL_NOT_FOUND = 10 OBJECT_NOT_FOUND = 11 INTERVAL_OVERFLOW = 12 ERROR_AUTOMATIC_BATCH_NUMBER = 13 CANCELLED = 14 OB_FOR_REFERENCE_MISSING = 15 ORDER_OB_REFERENCE_EXISTING = 16 LOCK_ON_PLANT = 17 LOCK_SYSTEM_ERROR = 18 AUTOMATIC_BATCH_NUM_NOT_ACTIVE = 19 NO_MATERIAL = 2 FOREIGN_LOCK = 20 BATCH_ID_INVALID = 21 OB_WITH_DELETION_INDICATOR = 22 NO_PLANT = 3 MATERIAL_NOT_FOUND = 4 PLANT_NOT_FOUND = 5 NO_BATCH_HANDLING = 6 BATCH_EXIST = 7 NO_NUMBER = 8 ILLEGAL_BATCH_NUMBER = 9
IMPORTING Parameters details for MILL_PC_CHECK_PCCHA
XDARK - Character Field Length 1
Data type: CHAR01Optional: No
Call by Reference: No ( called with pass by value option)
IS_REF - Mill: Confirmation, Process Batch, and Reference Fields
Data type: MILL_INCREFOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MILL_PC_CHECK_PCCHA
OB_CHANGED_FLG - Checkbox
Data type: XFELDOptional: No
Call by Reference: No ( called with pass by value option)
OB_CHANGED_UCMAT - Material from Original Batch
Data type: MOB01-UCMATOptional: No
Call by Reference: No ( called with pass by value option)
OB_CHANGED_UCCHA - Original Batch
Data type: MOB01-UCCHAOptional: No
Call by Reference: No ( called with pass by value option)
OB_CHANGED_UCWRK - Plant from Original Batch
Data type: MOB01-UCWRKOptional: No
Call by Reference: No ( called with pass by value option)
OB_CHANGED_UCMCH - Internal use: Batch master record must be created
Data type: MOB01-UCMCHOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for MILL_PC_CHECK_PCCHA
XMOB01 - Dialog Structure: Original Batch
Data type: MOB01Optional: No
Call by Reference: No ( called with pass by value option)
OLD_MOB01 - Dialog Structure: Original Batch
Data type: MOB01Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MILL_PC_CHECK_PCCHA
IT_PROOB - Mill: Update Structure for Original Batches
Data type: MILL_PROOB_VBOptional: No
Call by Reference: Yes
EXCEPTIONS details
ENQUEUE_NOT_POSSIBLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERVAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERVAL_OVERFLOW -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_AUTOMATIC_BATCH_NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANCELLED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OB_FOR_REFERENCE_MISSING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ORDER_OB_REFERENCE_EXISTING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCK_ON_PLANT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCK_SYSTEM_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
AUTOMATIC_BATCH_NUM_NOT_ACTIVE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_MATERIAL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BATCH_ID_INVALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OB_WITH_DELETION_INDICATOR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_PLANT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MATERIAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PLANT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_BATCH_HANDLING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BATCH_EXIST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_BATCH_NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MILL_PC_CHECK_PCCHA 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_xdark | TYPE CHAR01, " | |||
| lv_xmob01 | TYPE MOB01, " | |||
| lt_it_proob | TYPE STANDARD TABLE OF MILL_PROOB_VB, " | |||
| lv_ob_changed_flg | TYPE XFELD, " | |||
| lv_enqueue_not_possible | TYPE XFELD, " | |||
| lv_interval_not_found | TYPE XFELD, " | |||
| lv_object_not_found | TYPE XFELD, " | |||
| lv_interval_overflow | TYPE XFELD, " | |||
| lv_error_automatic_batch_number | TYPE XFELD, " | |||
| lv_cancelled | TYPE XFELD, " | |||
| lv_ob_for_reference_missing | TYPE XFELD, " | |||
| lv_order_ob_reference_existing | TYPE XFELD, " | |||
| lv_lock_on_plant | TYPE XFELD, " | |||
| lv_lock_system_error | TYPE XFELD, " | |||
| lv_automatic_batch_num_not_active | TYPE XFELD, " | |||
| lv_is_ref | TYPE MILL_INCREF, " | |||
| lv_old_mob01 | TYPE MOB01, " | |||
| lv_no_material | TYPE MOB01, " | |||
| lv_ob_changed_ucmat | TYPE MOB01-UCMAT, " | |||
| lv_foreign_lock | TYPE MOB01, " | |||
| lv_batch_id_invalid | TYPE MOB01, " | |||
| lv_ob_with_deletion_indicator | TYPE MOB01, " | |||
| lv_no_plant | TYPE MOB01, " | |||
| lv_ob_changed_uccha | TYPE MOB01-UCCHA, " | |||
| lv_ob_changed_ucwrk | TYPE MOB01-UCWRK, " | |||
| lv_material_not_found | TYPE MOB01, " | |||
| lv_plant_not_found | TYPE MOB01, " | |||
| lv_ob_changed_ucmch | TYPE MOB01-UCMCH, " | |||
| lv_no_batch_handling | TYPE MOB01, " | |||
| lv_batch_exist | TYPE MOB01, " | |||
| lv_no_number | TYPE MOB01, " | |||
| lv_illegal_batch_number | TYPE MOB01. " |
|   CALL FUNCTION 'MILL_PC_CHECK_PCCHA' "NOTRANSL: Mill: Prozesscharge prüfen und sperren (MILL_MM_OB_CHECK_UCCHA) |
| EXPORTING | ||
| XDARK | = lv_xdark | |
| IS_REF | = lv_is_ref | |
| IMPORTING | ||
| OB_CHANGED_FLG | = lv_ob_changed_flg | |
| OB_CHANGED_UCMAT | = lv_ob_changed_ucmat | |
| OB_CHANGED_UCCHA | = lv_ob_changed_uccha | |
| OB_CHANGED_UCWRK | = lv_ob_changed_ucwrk | |
| OB_CHANGED_UCMCH | = lv_ob_changed_ucmch | |
| CHANGING | ||
| XMOB01 | = lv_xmob01 | |
| OLD_MOB01 | = lv_old_mob01 | |
| TABLES | ||
| IT_PROOB | = lt_it_proob | |
| EXCEPTIONS | ||
| ENQUEUE_NOT_POSSIBLE = 1 | ||
| INTERVAL_NOT_FOUND = 10 | ||
| OBJECT_NOT_FOUND = 11 | ||
| INTERVAL_OVERFLOW = 12 | ||
| ERROR_AUTOMATIC_BATCH_NUMBER = 13 | ||
| CANCELLED = 14 | ||
| OB_FOR_REFERENCE_MISSING = 15 | ||
| ORDER_OB_REFERENCE_EXISTING = 16 | ||
| LOCK_ON_PLANT = 17 | ||
| LOCK_SYSTEM_ERROR = 18 | ||
| AUTOMATIC_BATCH_NUM_NOT_ACTIVE = 19 | ||
| NO_MATERIAL = 2 | ||
| FOREIGN_LOCK = 20 | ||
| BATCH_ID_INVALID = 21 | ||
| OB_WITH_DELETION_INDICATOR = 22 | ||
| NO_PLANT = 3 | ||
| MATERIAL_NOT_FOUND = 4 | ||
| PLANT_NOT_FOUND = 5 | ||
| NO_BATCH_HANDLING = 6 | ||
| BATCH_EXIST = 7 | ||
| NO_NUMBER = 8 | ||
| ILLEGAL_BATCH_NUMBER = 9 | ||
| . " MILL_PC_CHECK_PCCHA | ||
ABAP code using 7.40 inline data declarations to call FM MILL_PC_CHECK_PCCHA
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 UCMAT FROM MOB01 INTO @DATA(ld_ob_changed_ucmat). | ||||
| "SELECT single UCCHA FROM MOB01 INTO @DATA(ld_ob_changed_uccha). | ||||
| "SELECT single UCWRK FROM MOB01 INTO @DATA(ld_ob_changed_ucwrk). | ||||
| "SELECT single UCMCH FROM MOB01 INTO @DATA(ld_ob_changed_ucmch). | ||||
Search for further information about these or an SAP related objects