QC01_BATCH_SPECS_WITH_OBJECT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name QC01_BATCH_SPECS_WITH_OBJECT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
QC01
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'QC01_BATCH_SPECS_WITH_OBJECT' "Read batch specification with object key
EXPORTING
i_batch = " vbdpl-charg Batch
* i_plant = " vbdpl-werks Plant
i_material = " mara-matnr Material number
* i_cuobj_ch = " inob-cuobj Batch object number
* i_object = " kssk-objek Classified Object
* i_obtab = " tclt-obtab Classified object (table)
* i_language = SY-LANGU " sy-langu Language for short text
* i_date = SY-DATUM " sy-datum Selection date
* i_assigned_values = " qm00-qkz Indicator: Read assigned values
* i_allowed_values = 'X' " qm00-qkz Indicator: Read permitted values
IMPORTING
e_class = " klah-class Name of batch class
e_class_type = " klah-klart Class type of batch class
* TABLES
* t_sp_val_tab = " api_vali Table of batch values
* t_sp_char_tab = " api_char Table of all characteristics of batch
* t_sp_att_tab = " api_ch_att Table of characteristic attributes
EXCEPTIONS
NO_CLASS = 1 " No batch class assigned
INTERNAL_ERROR = 2 " Internal error during batch classification
NO_SPECIFICATIONS = 3 " No specifications found
NO_CHARACTERISTICS = 4 " No characteristics found
. " QC01_BATCH_SPECS_WITH_OBJECT
The ABAP code below is a full code listing to execute function module QC01_BATCH_SPECS_WITH_OBJECT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_e_class | TYPE KLAH-CLASS , |
| ld_e_class_type | TYPE KLAH-KLART , |
| it_t_sp_val_tab | TYPE STANDARD TABLE OF API_VALI,"TABLES PARAM |
| wa_t_sp_val_tab | LIKE LINE OF it_t_sp_val_tab , |
| it_t_sp_char_tab | TYPE STANDARD TABLE OF API_CHAR,"TABLES PARAM |
| wa_t_sp_char_tab | LIKE LINE OF it_t_sp_char_tab , |
| it_t_sp_att_tab | TYPE STANDARD TABLE OF API_CH_ATT,"TABLES PARAM |
| wa_t_sp_att_tab | LIKE LINE OF it_t_sp_att_tab . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_e_class | TYPE KLAH-CLASS , |
| ld_i_batch | TYPE VBDPL-CHARG , |
| it_t_sp_val_tab | TYPE STANDARD TABLE OF API_VALI , |
| wa_t_sp_val_tab | LIKE LINE OF it_t_sp_val_tab, |
| ld_e_class_type | TYPE KLAH-KLART , |
| ld_i_plant | TYPE VBDPL-WERKS , |
| it_t_sp_char_tab | TYPE STANDARD TABLE OF API_CHAR , |
| wa_t_sp_char_tab | LIKE LINE OF it_t_sp_char_tab, |
| ld_i_material | TYPE MARA-MATNR , |
| it_t_sp_att_tab | TYPE STANDARD TABLE OF API_CH_ATT , |
| wa_t_sp_att_tab | LIKE LINE OF it_t_sp_att_tab, |
| ld_i_cuobj_ch | TYPE INOB-CUOBJ , |
| ld_i_object | TYPE KSSK-OBJEK , |
| ld_i_obtab | TYPE TCLT-OBTAB , |
| ld_i_language | TYPE SY-LANGU , |
| ld_i_date | TYPE SY-DATUM , |
| ld_i_assigned_values | TYPE QM00-QKZ , |
| ld_i_allowed_values | TYPE QM00-QKZ . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name QC01_BATCH_SPECS_WITH_OBJECT or its description.
QC01_BATCH_SPECS_WITH_OBJECT - Read batch specification with object key QC01_BATCH_SPECS_READ - General characteristics of a batch: specifications QC01_BATCH_SPECS_BUFFERED - QC01_BATCH_OBJECT_NUMBER - Search for object key for batch determination QC01_BATCH_LOT_READ - QC01_BATCH_CLASS - Batch class determination