‎2008 Jun 28 4:11 PM
Hi Everyone,
I am trying to use BAPI_BATCH_SAVE_REPLICA to create classification data for a particular plant and material. I am been unsuccessful so far. Has anyone got any sample coding to implement this BAPI?
Thanks
Kumar.
‎2008 Jun 30 1:56 PM
‎2008 Jun 30 2:06 PM
Hi Kumar,
LOOP AT rdcbatch.
MOVE-CORRESPONDING rdcbatch TO ibatchesstr.
CLEAR bapiret2.
REFRESH: bapiret2.
PERFORM set_batchattributes USING chg.
PERFORM set_characteristics.
CALL FUNCTION 'DEQUEUE_ALL'.
CALL FUNCTION 'BAPI_BATCH_SAVE_REPLICA'
EXPORTING
material = ibatchesstr-matnr
batch = ibatchesstr-charg
PLANT =
batchattributes = batchattributes
batchattributesx = batchattributesx
batchstatus = batchstatus
batchstatusx = batchstatusx
BATCHCONTROLFIELDS =
BATCHSTORAGELOCATION =
INTERNALNUMBERCOM =
EXTENSION1 =
TABLES
return = bapiret2
classallocations = classallocations
classvaluationschar = classvaluationschar
CLASSVALUATIONSCURR =
CLASSVALUATIONSNUM =
.
PERFORM capture_messages.
IF err_flag = 'X'.
MOVE-CORRESPONDING ibatchesstr TO ierrbatchesstr.
APPEND ierrbatchesstr.
ELSE.
ADD 1 TO num_batches_changed.
ENDIF.
ENDLOOP.
Regards,
Sachin M M
‎2008 Jun 30 2:28 PM
Sachin,
I have Plant, Material, Batch and Classification data with me. Wht do I need to fill so that classification data will be updated when I see in MSC3N.
I am trying in se37 to test the BAPI but I do not see any classification data being updated in MSC3N.
Kumar.
‎2009 Aug 15 8:32 PM
HI .
I am facing the sameproblem, Characteristics not updated. Its updating the batch status, but not doing anyting for characteristics.
Please help me out.......
‎2010 Nov 03 2:29 PM
Hello,
I Faced a similar problem. Could make it work filling out following fields, of course concrete values you have to adapt to what is present in you're system.
BAPIBATCH_SAVE_REPLICA_
MATERIAL = 000000000000033001
BATCH = 12543872
PLANT = D010
CLASSALLOCATIONS
CLASS_TYPE 023
OBJECTKEY 00000000000003300112543872 (in our case MATNR&BATCH combination, dependend on system setting Plant could also be needed)
CLASSNUM FROZEN_FINISHED (Classification Class)
OBJECTTABLE MCH1
CLASSVALUATIONSCHAR
CLASS_TYPE 023
OBJECTKEY 00000000000003300112543872
OBJECTTABLE MCH1
CHARACT LOBM_ZUSTD
VALUE_CHAR X
This works now fine and similar for the BATMAS IDOC
Hope this is helpfull for you.
Dirk