Application Development 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: 

How to change batch characteristics (Tcode MSC1N)

Former Member
0 Kudos

Hi ALL,

I would like to change batch characteristics for the given Material Number and batch number.Please let me know is there any BAPI of Function moudle for this.

Based on the Material number and batch number I want to change my batch charactersitics.

Thanks&Regards

Mahesh

6 REPLIES 6

former_member181962
Active Contributor
0 Kudos

Look at the bapi:

BAPI_OBJCL_CHANGE

rEGARDS,

RAVI

0 Kudos

try ...

BAPI_BATCH_CHANGE

0 Kudos

Hi The above function module will solve my problem since the Ist function module bapi_objcl_chage will not take material and batch no as as input the 2nd function module bapi_batch_change it will take Material and Batch no but we can not pass batch characteristics this is the problem.

Thanks&Regards

Mahesh

0 Kudos

Sorry the above function modules will not solve my problem.

0 Kudos

Hi Mahesh,

You can use 'BAPI_OBJCL_CHANGE' but you need to build the object key first using

it_object-key_field = 'MATNR'.

it_object-value_int = d_matnr. ie 7100020 etc

APPEND it_object.

it_object-key_field = 'WERKS'.

it_object-value_int = d_werks.

APPEND it_object.

it_object-key_field = 'CHARG'.

it_object-value_int = d_charg.

APPEND it_object.

CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'

EXPORTING

objecttable = 'MCHA'

IMPORTING

objectkey_conc = w_object

TABLES

objectkeytable = it_object

return = rettab.

0 Kudos

Hi Mahesh,

You only need to supply field <b>WERKS</b> if the batch are unique on plant level. You can find out in customizing or using BAPI <b>BAPI_BATCH_GET_LEVEL</b>.

One additional note: You wrote that you wanted to <i>change</i> the characteristics. The BAPI <b>BAPI_OBJCL_CHANGE</b> changes <i>all</i> characteristics of the respective objects. So if you want to change e. g. just one of many charcteristics, you have to read them first, then change just this one characteristic, then post the full characteristics table to <b>BAPI_OBJCL_CHANGE</b>.

Regards, Joerg