SAP MILL_PC_CREATE_BATCH_STOCK Function Module for NOTRANSL: Mill: Anlegen Bestandscharge nach vorgegebenen oder zu mischende









MILL_PC_CREATE_BATCH_STOCK is a standard mill pc create batch stock 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: Anlegen Bestandscharge nach vorgegebenen oder zu mischende 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 create batch stock FM, simply by entering the name MILL_PC_CREATE_BATCH_STOCK into the relevant SAP transaction such as SE37 or SE38.

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



Function MILL_PC_CREATE_BATCH_STOCK 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_CREATE_BATCH_STOCK'"NOTRANSL: Mill: Anlegen Bestandscharge nach vorgegebenen oder zu mischende
EXPORTING
I_OK_CODE = "ABAP System Field: Current Transaction Code
IS_REF = "Mill: Confirmation, Process Batch, and Reference Fields
I_KZBEW = "Movement Indicator
I_BWART = "Movement type (inventory management)
* I_CPCONF = "Indicator for Adoption of Conf. in Batch Classification
* I_CHARG = "Batch Number
* I_FLG_NO_PC_HANDLING = "Single-Character Flag
* I_KZCLA = "Single-Character Flag

TABLES
IT_ALLAUSP = "Update interface
CT_PC = "Mill: Runtime Structure for Process Batches
CT_WE = "Mill: Runtime Structure for Goods Issues and Receipts
CT_PBWU = "Mill: Update Structure for Process Batches
* IT_VALUES = "Assigning and Deleting Characteristic Values
* IT_ATTRIBUTES = "Attributes of Characteristics

EXCEPTIONS
CLASS_NOT_FOUND = 1 NO_AUTHORITY = 10 ERROR_VB_CREATE_BATCH = 11 ERROR_CREATE_BATCH = 12 ERROR_CREATE_BATCH_ASSIGN = 13 DATA_INCONSISTENCE = 14 CONF_NOT_FOUND = 2 STRAT_NOT_FOUND = 3 NO_CLASS_FOUND = 4 NO_CLASS_TYPE_FOUND = 5 NO_OBJECTS_FOUND = 6 ERROR = 7 NO_BATCH = 8 PLANT_NOT_FOUND = 9
.



IMPORTING Parameters details for MILL_PC_CREATE_BATCH_STOCK

I_OK_CODE - ABAP System Field: Current Transaction Code

Data type: SY-TCODE
Optional: No
Call by Reference: Yes

IS_REF - Mill: Confirmation, Process Batch, and Reference Fields

Data type: MILL_INCREF
Optional: No
Call by Reference: Yes

I_KZBEW - Movement Indicator

Data type: COWB_COMP-KZBEW
Optional: No
Call by Reference: Yes

I_BWART - Movement type (inventory management)

Data type: COWB_COMP-BWART
Optional: No
Call by Reference: Yes

I_CPCONF - Indicator for Adoption of Conf. in Batch Classification

Data type: T156-MILL_CPCONF
Optional: Yes
Call by Reference: Yes

I_CHARG - Batch Number

Data type: MILL_INCREF-CHARG
Optional: Yes
Call by Reference: Yes

I_FLG_NO_PC_HANDLING - Single-Character Flag

Data type: CHAR1
Optional: Yes
Call by Reference: Yes

I_KZCLA - Single-Character Flag

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

TABLES Parameters details for MILL_PC_CREATE_BATCH_STOCK

IT_ALLAUSP - Update interface

Data type: RMCLAUSP
Optional: No
Call by Reference: Yes

CT_PC - Mill: Runtime Structure for Process Batches

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

CT_WE - Mill: Runtime Structure for Goods Issues and Receipts

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

CT_PBWU - Mill: Update Structure for Process Batches

Data type: MILL_PBWU_VB
Optional: No
Call by Reference: Yes

IT_VALUES - Assigning and Deleting Characteristic Values

Data type: API_VAL_I
Optional: Yes
Call by Reference: Yes

IT_ATTRIBUTES - Attributes of Characteristics

Data type: API_CH_ATT
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

CLASS_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NO_AUTHORITY - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: Yes

ERROR_VB_CREATE_BATCH - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: Yes

ERROR_CREATE_BATCH -

Data type:
Optional: No
Call by Reference: Yes

ERROR_CREATE_BATCH_ASSIGN -

Data type:
Optional: No
Call by Reference: Yes

DATA_INCONSISTENCE -

Data type:
Optional: No
Call by Reference: Yes

CONF_NOT_FOUND - Configuration not found

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

STRAT_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NO_CLASS_FOUND - Class Not Found

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

NO_CLASS_TYPE_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

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

NO_OBJECTS_FOUND - No Objects Found

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

ERROR - General Error

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

NO_BATCH -

Data type:
Optional: No
Call by Reference: Yes

PLANT_NOT_FOUND - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for MILL_PC_CREATE_BATCH_STOCK 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_i_ok_code  TYPE SY-TCODE, "   
lt_it_allausp  TYPE STANDARD TABLE OF RMCLAUSP, "   
lv_class_not_found  TYPE RMCLAUSP, "   
lv_no_authority  TYPE RMCLAUSP, "   
lv_error_vb_create_batch  TYPE RMCLAUSP, "   
lv_error_create_batch  TYPE RMCLAUSP, "   
lv_error_create_batch_assign  TYPE RMCLAUSP, "   
lv_data_inconsistence  TYPE RMCLAUSP, "   
lt_ct_pc  TYPE STANDARD TABLE OF MILL_PC_LZ, "   
lv_is_ref  TYPE MILL_INCREF, "   
lv_conf_not_found  TYPE MILL_INCREF, "   
lt_ct_we  TYPE STANDARD TABLE OF MILL_WAWE_LZ, "   
lv_i_kzbew  TYPE COWB_COMP-KZBEW, "   
lv_strat_not_found  TYPE COWB_COMP, "   
lt_ct_pbwu  TYPE STANDARD TABLE OF MILL_PBWU_VB, "   
lv_i_bwart  TYPE COWB_COMP-BWART, "   
lv_no_class_found  TYPE COWB_COMP, "   
lv_i_cpconf  TYPE T156-MILL_CPCONF, "   
lt_it_values  TYPE STANDARD TABLE OF API_VAL_I, "   
lv_no_class_type_found  TYPE API_VAL_I, "   
lv_i_charg  TYPE MILL_INCREF-CHARG, "   
lt_it_attributes  TYPE STANDARD TABLE OF API_CH_ATT, "   
lv_no_objects_found  TYPE API_CH_ATT, "   
lv_error  TYPE API_CH_ATT, "   
lv_i_flg_no_pc_handling  TYPE CHAR1, "   
lv_i_kzcla  TYPE CHAR1, "   
lv_no_batch  TYPE CHAR1, "   
lv_plant_not_found  TYPE CHAR1. "   

  CALL FUNCTION 'MILL_PC_CREATE_BATCH_STOCK'  "NOTRANSL: Mill: Anlegen Bestandscharge nach vorgegebenen oder zu mischende
    EXPORTING
         I_OK_CODE = lv_i_ok_code
         IS_REF = lv_is_ref
         I_KZBEW = lv_i_kzbew
         I_BWART = lv_i_bwart
         I_CPCONF = lv_i_cpconf
         I_CHARG = lv_i_charg
         I_FLG_NO_PC_HANDLING = lv_i_flg_no_pc_handling
         I_KZCLA = lv_i_kzcla
    TABLES
         IT_ALLAUSP = lt_it_allausp
         CT_PC = lt_ct_pc
         CT_WE = lt_ct_we
         CT_PBWU = lt_ct_pbwu
         IT_VALUES = lt_it_values
         IT_ATTRIBUTES = lt_it_attributes
    EXCEPTIONS
        CLASS_NOT_FOUND = 1
        NO_AUTHORITY = 10
        ERROR_VB_CREATE_BATCH = 11
        ERROR_CREATE_BATCH = 12
        ERROR_CREATE_BATCH_ASSIGN = 13
        DATA_INCONSISTENCE = 14
        CONF_NOT_FOUND = 2
        STRAT_NOT_FOUND = 3
        NO_CLASS_FOUND = 4
        NO_CLASS_TYPE_FOUND = 5
        NO_OBJECTS_FOUND = 6
        ERROR = 7
        NO_BATCH = 8
        PLANT_NOT_FOUND = 9
. " MILL_PC_CREATE_BATCH_STOCK




ABAP code using 7.40 inline data declarations to call FM MILL_PC_CREATE_BATCH_STOCK

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 TCODE FROM SY INTO @DATA(ld_i_ok_code).
 
 
 
 
 
 
 
 
 
 
 
 
"SELECT single KZBEW FROM COWB_COMP INTO @DATA(ld_i_kzbew).
 
 
 
"SELECT single BWART FROM COWB_COMP INTO @DATA(ld_i_bwart).
 
 
"SELECT single MILL_CPCONF FROM T156 INTO @DATA(ld_i_cpconf).
 
 
 
"SELECT single CHARG FROM MILL_INCREF INTO @DATA(ld_i_charg).
 
 
 
 
 
 
 
 


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!