Skip to Content
0
Former Member
Jun 04, 2009 at 01:43 PM

create /change classification of a batch

222 Views

HI,

I run in some trouble by using the 'BAPI_OBJCL_CREATE'.

What I try to do:

- I have a material M1 and one batch B1 (as batch of material M1) both are assigned to class "C_A".

- I read the classification data of Material and Batch from class C_A and store the values in an internal table.

- delete batch class C_A from the batch B1 (done with BAPI_OBJCL_DELETE) ; commit;

- delete batch class C_A from material M1 (done with BAPI_OBJCL_DELETE) ; commit;

- now I assign a new batch class C_B to the material M1 'BAPI_OBJCL_CREATE' (value tables are filled with data that was stored in internal table.; commit

- as last step the batch class C_B is assigned to the batch B1 by BAPI_OBJCL_CREATE too, commit

If I check my material i get the new class B. If I open the batch in MSC3N, I get a message, that the classification is inconsistent.

I found following reason for this :

MCH1 has the field cuobj_BM to hold the key for table INOB. The value in the batch is different to the value that is stored in INOB itself.(is updated in the right way after my comit.) The value that is still seen, is my old value that was valid during assignment to batch class C_A.

I checked the changedocuments of the batch B1 and I get the information about the new class C_B in changdoc of classification. I I check the changedoc of the batch itself, I see nothing. (FYI: If I do all the steps above in MSC2N /MM02 I get the update of the CU_OBJ (from INOB) in the changedoc of the batch.

Question:

Is this something normal and I have to write the change doc to the batch by myself (including cuobj_BM change) or could it be that this is a bug with ECC6? I think the BAPI_OBJCL_CREATE should make all necessary changes to the system (changedoc, INOB , MCH1)

(FYI: i run the same function in 4.6c without problems. Based on some ECC changes, it was required to do a comit after batch class is delete from batches and after material. In 4.6c I use still the old CUOBJ with the old and new class.)

Thanks a lot for your help.

Jens