Skip to Content
avatar image
Former Member

Classification tab in BAPI_BATCH_SAVE_REPLICA

Hello Experts ,

I am currently using BAPI_BATCH_SAVE_REPLICA to create batch with characteristics . I have a requirement to fill characteristic name and value . The field names of the same are ATNAM and ATWRT respectively. The firld name of characteristic description is ATBEZ. Going through certain threads of SDN I have understood I need to pass values to CLASSALLOCATIONS and CLASSVALUATIONSCHAR . Inspite of doing the same I able to create a batch but without characteristics. I am posting here the values i passed please tell how to resolve this issue.

For CLASSALLOCATIONS

CLASS_TYPE 022

STATUS 1

CLASSNUM RM_LIFE_BATCH

For CLASSVALUATIONSCHAR

CLASS_TYPE 022

CHARACT TACK_LIFE

VALUE_CHAR 200

CHARACT_DESCR TACK LIFE

-Thanks

Trishna

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 15, 2010 at 05:08 AM

    Hi!

    try to set field BAPIBATCHCTRL-DOCLASSIFY = 'X'

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 01, 2010 at 07:29 AM

    Hi Trishna,

    I am facing similar issue to update classification value using BAPI: BAPI_BATCH_SAVE_REPLICA. But unable to update the same, Please can u send me your code, or what are the mandatory values need to pass in classification tables in BAPI.

    Please find my code. and help me where I need to correct.

    WA_BATCHCONTROLFIELDS-DOCLASSIFY = 'X'.

    WA_CLASSALLOCATIONS-CLASS_TYPE = '023'.

    WA_CLASSALLOCATIONS-STATUS = '1'.

    WA_CLASSALLOCATIONS-CLASSNUM = 'BATCH_CLASS_RM'.

    APPEND WA_CLASSALLOCATIONS TO I_CLASSALLOCATIONS.

    WA_CLASSVALUATIONSCHAR-CLASS_TYPE = '023'.

    WA_CLASSVALUATIONSCHAR-CHARACT = 'VOLUME'.

    WA_CLASSVALUATIONSCHAR-VALUE_CHAR = '90.10'.

    WA_CLASSVALUATIONSCHAR-CHARACT_DESCR = 'VOLUME'.

    APPEND WA_CLASSVALUATIONSCHAR TO I_CLASSVALUATIONSCHAR.

    wa_batchatt-expirydate = '20200909'.

    wa_batchattx-expirydate = 'X'.

    wa_batchstatus-restricted = ' '.

    wa_batchstatusx-restricted = 'X'.

    l_matnr = '3401031500200'.

    l_charg = 'ABC0000003'.

    l_werks = 'X100'.

    CALL FUNCTION 'BAPI_BATCH_SAVE_REPLICA'

    EXPORTING

    material = l_matnr

    batch = l_charg

    plant = l_werks

    batchattributes = wa_batchatt

    batchattributesx = wa_batchattx

    batchstatus = wa_batchstatus

    batchstatusx = wa_batchstatusx

    BATCHCONTROLFIELDS = WA_BATCHCONTROLFIELDS

    TABLES

    return = i_batch_ret

    CLASSALLOCATIONS = I_CLASSALLOCATIONS

    CLASSVALUATIONSCHAR = I_CLASSVALUATIONSCHAR.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

    Thanks,

    Shreekant

    Add comment
    10|10000 characters needed characters exceeded