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 classification characteristics?

Former Member
0 Kudos

Hello expterts,

i must develope a programm, which changes characteristics of a batch.

Example:

For material 12345678 we have a batch 9898989898 with class z_batch_class.

This class has serveras characteristics: z_cust_lfsnr

I have to change this charateristic via program. Is there an other possibility than using call transaction MSC2N ?

I am searchin for a FM ode a Bapi.

Can anybody help me?

Thank you

5 REPLIES 5

former_member555112
Active Contributor
0 Kudos

HI,

Use the BAPI BAPI_OBJCL_CHANGE.

Pass the OBJECTTABLE as MARA, OBJECTKEY as the complete 18 digit material number, CLASSNUM as the name of the class and CLASSTYPE as the type of the class.

Pass the characteristics values in ALLOCVALUESCHARNEW.

Regards,

Ankur PArab

former_member404244
Active Contributor
0 Kudos

HI,

U can use the below function modules.

1>BAPI_OBJCL_CHANGE

2>BAPI_BATCH_SAVE_REPLICA.

Regards,

Nagaraj

Former Member
0 Kudos

Hi Benjamin Pfahl,

I have the same problem, did yo get a function modulo or BAPI to change values characteristics for a especific bach??

Thanks in advance

0 Kudos

Use this BAPI.

CALL FUNCTION 'BAPI_OBJCL_CHANGE'

EXPORTING

objectkey = w_object

objecttable = 'MCH1'

classnum = itab-classname

classtype = itab-class

TABLES

allocvaluesnumnew = numtab

allocvaluescharnew = chatab

allocvaluescurrnew = curtab

return = rettab.

Let me know if you need more info on this.

~KK

0 Kudos

Hi,

I think I'm doing something wrong. This is my case:

I have a material (BBBD) with a class (LOTE_GNL_2) with one characteristi (P). I realiced a goods receipt and a batch has been created (0000000060).

What I need to do is modify the characteristis value, "P=aaa" for example.

I pass the next data:

objectkey = 0000000060

objecttable = 'MCH1'

classnum = LOTE_GNL_2

classtype = 023

allocvaluescharnew:

CHARACT=P

VALUE_CHAR=aaa

but I get thew message: "enter a batch".

Could you tell me if I'm doing somethig wrong?

Thanks a lot!!