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

BAPI_BATCH_SAVE_REPLICA

Former Member
0 Likes
2,380

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.

5 REPLIES 5
Read only

Former Member
0 Likes
1,231

Any Help??

Read only

sachin_mathapati
Contributor
0 Likes
1,231

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

Read only

0 Likes
1,231

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.

Read only

Former Member
0 Likes
1,231

HI .

I am facing the sameproblem, Characteristics not updated. Its updating the batch status, but not doing anyting for characteristics.

Please help me out.......

Read only

0 Likes
1,231

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