Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

batch characteristic

Former Member
0 Likes
1,253

hello experts,

please help me with this. i used FM CLAF_CLASSIFICATION_OF_OBJECTS in my program to retrieve the characteristic of the material and used 'MARA' in the objecttable field. however, there are some classification which is not maintained in the material but done in the batch (transaction MSC3N). how will i retrieve the data in the batch? can i still use the same FM which i used before? or is there another FM you can advise?

thank you very much!

-march-

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
955

Hi March

CALL FUNCTION 'QC01_BATCH_VALUES_READ'

EXPORTING

i_val_matnr = wa_upload-matnr <<<, material number

i_val_werks = wa_upload-werks <<< plant

i_val_charge = wa_upload-charg <<< batch number

i_language = sy-langu

i_date = sy-datum

TABLES

t_val_tab = lt_char

EXCEPTIONS

no_class = 1

internal_error = 2

no_values = 3

no_chars = 4

OTHERS = 5.

3 REPLIES 3
Read only

former_member156446
Active Contributor
0 Likes
956

Hi March

CALL FUNCTION 'QC01_BATCH_VALUES_READ'

EXPORTING

i_val_matnr = wa_upload-matnr <<<, material number

i_val_werks = wa_upload-werks <<< plant

i_val_charge = wa_upload-charg <<< batch number

i_language = sy-langu

i_date = sy-datum

TABLES

t_val_tab = lt_char

EXCEPTIONS

no_class = 1

internal_error = 2

no_values = 3

no_chars = 4

OTHERS = 5.

Read only

0 Likes
955

Hi J@Y ,

Which BAPI can update that value?

Read only

Former Member
0 Likes
955

Hello March,

It is better to use the bapi 'BAPI_OBJCL_GETCLASSES' to retrieve batch characteristic. In my experience FM 'CLAF_CLASSIFICATION_OF_OBJECTS' doesn't return all the characteristics of a batch.

For material: ls_objek = matnr

CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'

EXPORTING

objectkey_imp = ls_objek

objecttable_imp = 'MARA'

classtype_imp = '001'

read_valuations = '0'

TABLES

alloclist = lt_alloclist

allocvalueschar = lt_valueschar[]

allocvaluesnum = lt_valuesnum[]

allocvaluescurr = lt_valuescurr[]

return = lt_return.

For batch : ls_object = matnr + batch

CONCATENATE matnr charg INTO ls_objek RESPECTING BLANKS.

CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'

EXPORTING

objectkey_imp = ls_objek

objecttable_imp = 'MCH1'

classtype_imp = '023'

read_valuations = '0'

TABLES

alloclist = lt_alloclist

allocvalueschar = lt_valueschar[]

allocvaluesnum = lt_valuesnum[]

allocvaluescurr = lt_valuescurr[]

return = lt_return.

Edited by: tony pang on Oct 26, 2010 3:22 PM