Depending on whether the batches are defined at a plant level or material level, you need to concatenate the material, plant and batch or material and batch into a variable of sufficient length. You then pass that to function module CLAF_CLASSIFICATION_OF_OBJECTS to get the classification values of the batch.
try like this.
call function 'VBWS_MARA_CLASSIFICATION_GET' exporting i_matnr = i_matnr * I_UPDATE_FLAG = ' ' * I_INIT_FLAG = ' ' * I_WITH_CHARACTERS = 'X' * I_WITH_VALUES = 'X' * I_WITH_ALLOWED_VALUES = * I_CHECK_NO_CHAR = 'X' * IMPORTING * E_CLASS = * E_OBTAB = * E_CUOBJ = tables * E_CL_CHAR = e_cl_char_value = it_values * EXCEPTIONS * CLASSTYPE_NOT_FOUND = 1 * CLASSTYPE_NOT_ACTIVE = 2 * CLASS_NOT_FOUND = 3 * NO_ALLOCATIONS = 4 * CHARACTERS_NOT_FOUND = 5 * OTHERS = 6 .
Regards
Prabhu
Hi!
CALL FUNCTION 'VB_BATCH_GET_DETAIL'
EXPORTING
matnr = matnr_val
charg = batch_val
WERKS =
get_classification = 'X'
EXISTENCE_CHECK =
READ_FROM_BUFFER =
NO_CLASS_INIT = ' '
LOCK_BATCH = ' '
IMPORTING
YMCHA =
CLASSNAME =
TABLES
char_of_batch = it_batch_characteristics
EXCEPTIONS
no_material = 1
no_batch = 2
no_plant = 3
material_not_found = 4
plant_not_found = 5
no_authority = 6
batch_not_exist = 7
lock_on_batch = 8
OTHERS = 9
.
it_batch_characteristics contains characteristics for given batch number and material number.
Regards,
Maxim.
Add a comment