Update BATCH of components in MIGO using WHSCON idoc.

hi,
we are using WHSCON idoc for doing goods receipt of inbound delivery.
presently the batch of the main material gets updated using WHSCON idoc, but the batch of the components does not get updated.
could you please help me with some enhancement options to update the BATCH of the components also using WHSCON idoc?

Hi Rahul Gopinath
The WHSCON/SHPCON idoc works similar to the TO confirmation so it is updating the batch through picking confirmation. Can you flag the picking relevance for the respective item category so the batch will be updated?
Check the flag 'Relevant for Picking' field in transaction OVLP for the relevant item category.
I hope this can help.

Similar Messages

  • Updating Batch classification data from MIGO for Purchase order

    Hi,
    I need to update batch classification data (in MSC3n) from MIGO for purchase order. The logic needed for this is as below,
    1) Pass material and batch to MCH1 table to get CUOBJ_BM.
    2) Pass CUOBJ_BM to INOB table to get INOB-OBJEK.
    3) Pass INOB-OBJEK to CLAF_CLASSIFICATION_OF_OBJECTS to get class name & characteristic name.
    4) Pass INOB-OBJEK, CLASS name and characteristic name to BAPI_OBJCL_CHANGE to update batch classification data.
    I created implicit enhancement at the bottom of FM "CLVF_VB_INSERT_CLASSIFICATION". But the problem is, the return parameter of BAPI_OBJCL_CHANGE is giving the following error.
    Class type 023, object type MCH1, object RAW-6             0000001151
    Object is currently locked by user
    The assignment was not changed
    Please let me know how to do it. Is there any BADI or User Exit?

    Hi,
    As you said the break point is not triggering did you activate your exit and activated even the project to which your exit is assigned.
    I hope you missed activating your project in CMOD transaction. Please verify it once and if it is not activated then immediately activate it and try debugging again.
    Regards,
    Rafi

  • Post Goods Receipt for Inbound Delivery using WHSCON IDoc

    Dear All
    Currently I am working on a big project dealing with EDI connections to our logistics partner for the Export business. The entire message flow between Lindt and our partner should be via EDI. Our SAP release is (still) 4.6c.
    We will create two kinds of despatch advice messages, one for inbound deliveries and one for outbound deliveries for customers.
    I would appreciate your support in the following problem that I am facing with the inbound delivery scenario:
    We create stock transport orders (purchase orders, POs) for the goods intended to be delivered into the plant at our partner
    We create a delivery (type NL = replenishment delivery) for this POs
    As soon as we post the goods issue we send the despatch advice (as EANCOM D96A DESADV message) to our partner.
    At this point the delivery is basically completed, i.e. packing status (PS) and goods movement status (GM / GS) are equal to 'C' (= completed).
    Our logistics partner uses the same EDI message to send us the goods receipts data, e.g.:
    We dispatched 50 units of a product => QTY:50:12
    The partner received indeed 50 units => QVR:50:66
    Please note that we do not use the QVR segment for the quantity difference (between despatched and received quantity) but it contains the received units. This way we avoid negative values in the QVR segment.
    When the logistics partner sends back the DESADV message containing the received quantities (QVR segment) we want to make
    the goods receipts for the products in the original stock transport order and
    upate the message flow in the delivery
    My idea was to transform the incoming DESADV message into a WHSCON.DELVRY03 IDoc based on the documentation in: [Delivery Interface|http://help.sap.com/saphelp_crm40/helpdata/en/e2/654b15a9f411d184ec0000e81ddea0/content.htm]
    In the delivery header control E1EDL18 I used QUALF = 'PGI' (Post goods issue).
    I prepared an inbound WHSCON IDoc according to the documentation mentioned below. I managed to get some feedback from the Idoc processing implying that the system tried to do the goods receipt in the PO but failed.
    To make a long story short here are my questions:
    Can an inbound WHSCON IDoc used for doing both the goods receipt in the PO and the update of the message flow in the delivery?
    Does anybody have an example on how to fill the WHSCON IDoc?
    Or is my approach a cul-de-sac ?
    Kind Regards
       Uwe
    PS: A related question can be found here: Goods Receipt in PO AND Message Flow Update in Inb. Delivery using WMMBXY

    Hi Uwe,
    Can an inbound WHSCON IDoc used for doing both the goods receipt in the PO and the update of the message flow in the delivery?
    The binary answer would be no. You should use WMMBXY or MBGMCR instead.
    But if we are doing goods receipt against Inbound delivery then answer is YES with additionally E1EDL18-QUALF = 'PIC' populated. But please remember no partial receipt is possible against Inbound Delivery.
    We should populate E1EDL20-VBELN with our Inbound delivery number and line item info should go to E1EDL24.
    I have done a similar interface recently where we are doing receipt against Inbound delivery. But our case was a bit complex because we had to support against Inbound delivery. So we had to go for a custom solution on top of IDOC_INPUT_DELVRY.
    Hope this helps. Let me know if you have more questions.
    Regards,
    Rudra

  • Cannot update batch header during MIGO GR using BADI MB_DOCUMENT_BADI

    I am trying to update next inspection date via MIGO when Goods Receipting a production order which is held in the batch header and in a classification we have set up. I have used function modules to try and perform the update.
    I have used both 'VB_UPDATE_BATCH' and QEVA_BATCH_UPDATE both by themselves and in an update task to update field QNDAT. (1st one updating MCHA and MCH1 the second one to update MCHA).
    I had the code before in POST_DOCUMENT of BADI MB_MIGO_BADI and this made no difference either. Sometimes it updates if I cancel the material document and redo the goods receipt with the same production number but this is very inconsistent. I need this to be done when I am posting the goods receipt.
    Does anyone have any ideas as I am at the end of my tether with this one?
    Many thanks
    Regards
    Larissa Maryniuk

    used BAPI_CHANGE_BATCH in method CHECK_ITEM of  MB_MIGO_BADI

  • Cannot update batch header MIGO GR in MB_DOCUMENT_BADI

    I am trying to update next inspection date via MIGO when Goods Receipting a production order which is held in the batch header and in a classification we have set up. I have used function modules to try and perform the update.
    I have used both 'VB_UPDATE_BATCH' and QEVA_BATCH_UPDATE both by themselves and in an update task to update field QNDAT. (1st one updating MCHA and MCH1 the second one to update MCHA).
    I had the code before in POST_DOCUMENT of BADI MB_MIGO_BADI and this made no difference either. Sometimes it updates if I cancel the material document and redo the goods receipt with the same production number but this is very inconsistent. I need this to be done when I am posting the goods receipt.
    Does anyone have any ideas as I am at the end of my tether with this one?
    Many thanks
    Regards
    Larissa Maryniuk

    i did not get total req .
    but i came to know that u want to update batch.
    rt .use this i did in this.
    MB_MIGO_BADI
    use this method  LINE_MODIFY
    where u can modify batch field.
    and if u want to modify batch characteristics
    use
    MBCFC004
    in this
    EXIT_SAPMM07M_004
    if nay clarification plz reply.

  • Need Badi/user exit-migo-update batch classification

    Hello all,
    I need to update revision level and country of origin in batch classification tab in migo while posting GR.
    I've already done using exit "EXIT_SAPLV01Z_014".
    But this exit triggers only when classification tab is clicked in migo.
    But i need to also update rev level and country of origin when GR is posted(Save button is pressed).
    I tried MB_CF001,MB_CF001,MBCF0002,MBCF0005,MBCF0006,MBCF0007,MBCF0009,MBCF0010,MBCF0011
    and badis
    MB_DOCUMENT_BADI,CACL_VALUE_CHANGE.
    Please someone help me
    Thanks in advance

    Hi Sriram,
    If you want to add logic on particular action you need to search for exact BADI.
    e.g.
    As you are expecting that your code need to be trigger when user press SAVE button (Time of Posting) so at that time you need to check which BADI get trigger ( I am assuming that you have knowledge on how to search BADI)
    List down the BADI name and check the methods. You will get exact method name in listed BADI's.
    I am hoping that while checking badi you will find MB_MIGO_BADI just check and use method [POST_DOCUMENT] for your logic.
    Also in User Exit you will see multiple function modules in component those function modules are behaving like PAI and PBO. so you need to find out whcih function module will trigger as per your requirement.
    please find below link which will help you to understand how to search User Exit.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0041d4e6-1e43-2e10-0db4-9386abe98fe6?overridelayout=t…
    Please let me know if its work for you.
    Regards,
    Nikhil

  • How to update batch (LIPS-CHARG) using FM WS_DELIVERY_UPDATE

    Hi guys,
    I posted a question regarding a function module here:
    How to update batch (LIPS-CHARG) using FM WS_DELIVERY_UPDATE
    If you have experience about this FM, kindly visit the link and share your wisdom. Thanks.
    Regards,
    Carl

    Hi guys,
    I posted a question regarding a function module here:
    How to update batch (LIPS-CHARG) using FM WS_DELIVERY_UPDATE
    If you have experience about this FM, kindly visit the link and share your wisdom. Thanks.
    Regards,
    Carl

  • Stale Data Error only Resolved by selecting "Use Update Batching"

    Hello,
    I'm having an issue after creating an update page in OAF.  The page only works when I select update batching within my EO.  The problem with this is my page is using a column type of BLOB which greys out the option to use update batching.  I have tried everything I can think of as well as search on every possible topic over the internet to resolve this issue.  Can't seem to figure it out.  It has become very frustrating as to why I can only update the table by selecting update batching.  Does anyone know how to overcome this issue?
    Thanks,
    Jeff

    I resolved this issue.  The reason I was receiving the stale data error was due to a custom table I created getting corrupted when adding the primary key through SQL Developer instead of doing coding it.  After I recreated the table the stale data error stopped displaying.  Hope this helps people in the future.  Just remember to code the table creation instead of creating it through SQL Developer.

  • My batch feature in bridge has disappeared completely after update, I uninstalled everything adobe CC using the cleaner tool

    My batch feature in bridge has disappeared completely after update, I uninstalled everything adobe CC using the cleaner tool.
    I sue the batch feature for my job everyday to batch multiple images with a custom action, I need this feature back ASAP
    Iam on a new 27 IMAC OSX 10.9.4
    Adobe CC 2014 newest version completely up to date.

    The cleaner tool doesn't touch presets, templates or other user data. All it does is flush the installer database to remove blockages. The last time it actualyl deleted any files and folders was with CS3. so whatever you did, you may have hit the wrong button. And while I underrstand your frustration, the download pages states that you are advised to backup your data, regardless...
    Mylenium

  • ClassCastException using Update Batching

    Oracle 9.2.0.4/Linux, JDBC driver 9.2.0.5
    I'm trying to use update batching but always get a
    ClassCastException when doing:
    ((oracle.jdbc.driver.OraclePreparedStatement) pstmt).setExecuteBatch(10);
    I've followed chapter 12 of the "Oracle9i JDBC Developer's Guide and Reference", but cannot get rid of this damn exception.
    Can anyone give me any clue about what's happening?
    BTW, JDBC standard batch works perfectly, I just wanted
    to test oracle specific batch vs standard batch.
    Thanks in advance.

    Avi,
    I forgot to say is that the code is
    inside an EJB, running under JBoss. I've tested
    it in JBoss 3.2.5, 3.2.6 and 3.2.7 with no success.
    I did not post any code because it's exactly the same
    that serves as an example in http://www.oracle.com/technology/products/oracle9i/daily/jun07.html
    except for the question that the imports are
    oracle.jdbc.driver.*, not oracle.driver.*.
                        java.sql.Connection connection = null;
                   java.sql.PreparedStatement pstmt = null;
    try {
                                  connection = DAOUtils.getDBConnection(JNDIConstants.DATASOURCE);
    // disable autocommit
    connection.setAutoCommit(false);
    String query =
    "INSERT INTO TABLE (ID, DATO)" +
    " VALUES (TABLE_SEQ.NextVal, ?)";
    pstmt = connection.prepareStatement(query);
    log.debug(pstmt.getClass().getName()); // org.jboss.resource.adapter.jdbc.WrappedPreparedStatement
    // set batch size
    ((OraclePreparedStatement) pstmt).setExecuteBatch(10); // ClassCastException
                                  pstmt.setInt(1, object.getId());
                                  pstmt.executeUpdate();
                                  ((OraclePreparedStatement) pstmt).sendBatch();
                                  connection.commit();
                        } catch (SQLException sqlex) {
                                  connection.rollback();
    sqlex.printStackTrace();
    throw new CustomException(CustomException.DB_ERROR, sqlex);
    } finally {
    DAOUtils.closePreparedStatement(pstmt);
    DAOUtils.closeConnection(connection);
    I'm going to post it also in JBoss forums.
    I'll keep on trying.

  • Inbound Delivery: Inbound WHSCON IDoc with Batch Split - HowTo...?

    Hello
    We have another tricky problem to solve on our ERP 6.0 system.
    My colleagues of Lindt UK create manually inbound deliveries (VL33N) which are replicated to the warehouse (DESADV IDoc -> TRADACOMS.ORDHDR).
    When the goods arrive at the warehouse they send back a good receipts message (TRADACOMS.DLCHDR -> WHSCON IDoc).
    In some cases we have a batch split because the goods have been put into different storage locations. Example:
    - item 10: 200 Cases of product 4711, batch 10-2011,  in storage location '0001' (free available for Sale)
    - item 10:     5 Cases of product 4711, batch 10-2011, in storage location '0004' (damaged)
    I am aware that in the inbound WHSCON item 10 is a main position and the two actual batch split positions are sub-items (900001 & 900002 with HIPOS = '10'). I tried to used E1EDL19-QUALF = 'BAS' (= batch split) with the sub-items but failed so far to update the inbound delivery that I can see the batch split.
    I have managed to get one sub-item but not 2 of them. Somehow the system aggregates the quantities for both sub-items into the single item that shows up in the inbound delivery.
    When we send the inbound delivery to the warehouse the item looks like this:
    - item 10: 200 Cases (no batch yet, Putaway quantity = 0, because these data are coming from the warehouse).
    QUESTION: Has anybody else been faced with a similar (if not identical) problem and how did you solve it?
    Thanks a lot in advance for your valuable input.
    Regards
      Uwe

    Hello Finbarr
    I assume that you do NOT send any (suggested) batches to your warehouse. Otherwise you would have the same problem like we have that the WHSCON cannot overwrite a (suggested) batch.
    However, if you just send the quantity per item then the batch split is much simpler than you suggested:
    "First E1EDL24 segment:
    POSNR     50
    MATNR     000000000000602006
    MATWA     000000000000602006
    CHARG     L1519   " <<< first batch
    LFIMG     37.000
    VRKME     CT
    "Second E1EDL24 segment:
    POSNR     50
    MATNR     000000000000602006
    MATWA     000000000000602006
    CHARG     L1880   " <<< second batch
    LFIMG     37.000
    VRKME     CT
    Well, and as qualifier we use: E1EDL19-QUALF = 'XYZ'  " a dummy
    The SAP system is smart enough the realize that these two E1EDL24 segment belong to the same item yet have different batches and, therefore, yield a batch split in the delivery. The system generated the 9xxxxx numbers for this sub-item lines automatically.
    Although I believe that it is not possible to change a batch in the delivery using an inbound WHSCON I would appreciate to have a final proof of this assumption. I could imagine that if you first delete the item containing the suggested batch and then add a new item with the actual batch from the warehouse it might works. However, this would require to implement a user-exit which I do not prefer.
    Regards
      Uwe
    PS: It seems I gave an answer to the wrong question (should be EDI (DESADV): Can batches be overwritten by an inbound WHSCON (pick conf)? )

  • Cannot update batch header no matter how I try in MB_DOCUMENT_BADI

    I am trying to update next inspection date via MIGO when Goods Receipting a production order which is held in the batch header and in a classification we have set up.  I have used function modules to try and perform the update.
    I have used both 'VB_UPDATE_BATCH' and QEVA_BATCH_UPDATE both by themselves and in an update task to update field QNDAT. (1st one updating MCHA and MCH1 the second one to update MCHA).
    I had the code before in POST_DOCUMENT of BADI MB_MIGO_BADI and this made no difference either. Sometimes it updates if I cancel the material document and redo the goods receipt with the same production number but this is very inconsistent.  I need this to be done when I am posting the goods receipt.
    Does anyone have any ideas as I am at the end of my tether with this one?
    Many thanks
    Regards
    Larissa Maryniuk
    Edited by: Larissa Maryniuk on Feb 7, 2008 4:34 PM

    Have you tried using 'BAPI_BATCH_CHANGE'?   I have used this FM, but not in the MIGO exit.
    Update the batchattributes and the corresponding x parameter.   There is a field for updating the inspection date.  I wonder if it is failing to update for you because the batch is not yet created.  Are there any error/warning messages returned from your FM's?

  • Updating Batch Number while delivery creation from sales document

    Hi Experts,
         I have to write code inside user exit MV50AFZZ which updates batch number during delivery creation. Suppose I have a sales having more than one line items. Each line item have different material numbers, and one material number may have more than 1 batch number. And all these batch numbers have to be updated for their corresponding material numbers. Batch  number corresponds to LIPS-CHARG. So how we can maintain values for this field more than once for a particular material number?

    Hi Pankaj,
    Were you able to update the Batch Number?
    What is the function Module that you used? and where exactly did you code in the logic?
    Thanks,
    RV

  • I need a FM to update batch no. & picking qty. of delivery  also to do PGI.

    I need a FM to update batch no.& picking qty of delivery items as well as to do PGI (Post goods issue) for the same delivery.I am using 'WS_DELIVERY_UPDATE' but it doesn't update the batch no. and gives error saying no bactches are deifned for delivery no XXXXX and item XXXX.Can any one suggest the suitable function module to do this? It will be better if you can give details about input parameters with example.
    Thanks & Regards,
    Nimish Dongare.

    Hi,
    I used the following code for both picking & PGI...I think it shud also work for updating the batch details.
    Picking:
    *get header data
    WA_VBKOK-VBELN_VL = <DEL_NBR>
    WA_VBKOK-VBELN = VBFA-VBELV
    get line data
    LOOP AT TAB_VBPOK.
    TAB_VBPOK-VBELN_VL = WA_VBKOK-VBELN_VL.
    tab_vbpok-posnr_vl = <line number> '900001'
    tab_vbpok-matnr= <material nbr>
    tab_vbpok-charg= <batch nbr>
    tab_vbpok-pikmg =<pick qty>
    tab_vbpok-meins= <uom>
       TAB_VBPOK-VBELN = SY-DATUM.
          TAB_VBPOK-POSNN = SY-UZEIT.
          TAB_VBPOK-VBTYP_N = VBFA-VBTYP_N.
          SELECT * INTO TABLE TVBFA FROM VBFA
                              WHERE VBELV = WA_VBKOK-VBELN_VL.
          SORT TVBFA DESCENDING.
          CLEAR TVBFA.
          READ TABLE TVBFA WITH KEY VBELV = TAB_VBPOK-VBELN_VL
                                    POSNV = TAB_VBPOK-POSNR_VL
                                    VBTYP_N = 'Q'
                                    TAQUI = ' '.
          IF SY-SUBRC EQ 0.
            V_PIKMG = TAB_VBPOK-PIKMG + TVBFA-RFMNG.        " Picking quantity
            CLEAR TVBFA.
            READ TABLE TVBFA WITH KEY VBELV = TAB_VBPOK-VBELN_VL
                                  POSNV = TAB_VBPOK-POSNR_VL
                                  VBTYP_N = 'Q'
                                  TAQUI = 'X'.
            IF SY-SUBRC EQ 0.
              V_PIKMG = V_PIKMG + TVBFA-RFMNG.               " Total Picking quantity
    *****Error Message: Picked quantity is larger than the quantity to be delivered.
              IF LIPS-LFIMG LT V_PIKMG.
                PERFORM GET_RETURN  USING 'E' 'VL' '019' SPACE SPACE SPACE SPACE
                          RETURN.
                V_EXIT = 'Y'.
                EXIT.             " EXIT THE RFC.
              ENDIF.
            ENDIF.
          ENDIF.
          MODIFY TAB_VBPOK.
    CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
          EXPORTING
            VBKOK_WA             = WA_VBKOK
            SYNCHRON             = 'X'
            DELIVERY             = WA_VBKOK-VBELN_VL
            UPDATE_PICKING       = 'X'
            COMMIT               = 'X'
            IF_DATABASE_UPDATE_1 = '1'
         TABLES
            VBPOK_TAB            = TAB_VBPOK
            PROT                 = I_PROTT.
        IF NOT I_PROTT IS INITIAL.
          RETURN-TYPE = 'E'.
          RETURN-MESSAGE = 'Picking Failed!'.
          EXIT.                                  "EXIT THE RFC
        ELSE.
          COMMIT WORK AND WAIT.
        ENDIF.
    PGI
    *get header data
    WA_VBKOK-VBELN_VL = <DEL_NBR>
    WA_VBKOK-VBELN = VBFA-VBELV
    CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
        EXPORTING
          VBKOK_WA               = WA_VBKOK
          SYNCHRON               = 'X'
          DELIVERY               = WA_VBKOK-VBELN_VL
          NICHT_SPERREN_1        = 'X'
          IF_ERROR_MESSAGES_SEND = 'X'
         TABLES
          PROT                   = I_PROTT.
      IF NOT I_PROTT IS INITIAL.
        RETURN-TYPE = 'E'.
        RETURN-MESSAGE = 'Goods Issue Failed!'.
        EXIT.                                  "EXIT THE RFC
      ELSE.
        COMMIT WORK AND WAIT.
    endif.
    thanks

  • BAPI to update batch characteristics

    Hi,
    We have a requirement to update batch characteristics in SAP. I used the VB_BATCH_CHANGE to update the batch characteristics. Below is my code. After the call, I don't get any error from this BAPI/RFC, but batch chararacteristcis values are not updated. Any ideas?
    FUNCTION Z_VB_CHANGE_BATCH.
    *"*"Global Interface:
    *"  IMPORTING
    *"     VALUE(YMCHA) LIKE  MCHA STRUCTURE  MCHA
    *"     VALUE(YUPDMCHA) LIKE  UPDMCHA STRUCTURE  UPDMCHA OPTIONAL
    *"     VALUE(CHANGE_LGORT) LIKE  MCHB-LGORT OPTIONAL
    *"     VALUE(BYPASS_LOCK) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(BYPASS_POST) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(X_BNCOM) LIKE  BNCOM STRUCTURE  BNCOM OPTIONAL
    *"     VALUE(KZCLA) LIKE  T156-KZCLA OPTIONAL
    *"     VALUE(XKCFC) LIKE  T156-XKCFC OPTIONAL
    *"     VALUE(CLASS) LIKE  KLAH-CLASS OPTIONAL
    *"     VALUE(NO_CHECK_OF_QM_CHAR) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(REF_MATNR) LIKE  MCHA-MATNR OPTIONAL
    *"     VALUE(REF_CHARG) LIKE  MCHA-CHARG OPTIONAL
    *"     VALUE(REF_WERKS) LIKE  MCHA-WERKS OPTIONAL
    *"     VALUE(SET_OLD_BATCH) LIKE  AM07M-XSELK DEFAULT 'X'
    *"     VALUE(BUFFER_REFRESH) LIKE  AM07M-XSELK OPTIONAL
    *"     VALUE(NO_CHANGE_DOCUMENT) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(GRUND) LIKE  MSEG-GRUND DEFAULT SPACE
    *"     VALUE(NO_CFC_CALLS) LIKE  AM07M-XSELK DEFAULT SPACE
    *"     VALUE(BATCH_DEL_FLAGS) LIKE  BATCHDELFLG STRUCTURE  BATCHDELFLG
    *"       DEFAULT SPACE
    *"     VALUE(SEND_SYS) TYPE  LOGSYS DEFAULT SPACE
    *"  EXPORTING
    *"     VALUE(YMCHA) LIKE  MCHA STRUCTURE  MCHA
    *"     VALUE(EMKPF) LIKE  EMKPF STRUCTURE  EMKPF
    *"  TABLES
    *"      CHAR_OF_BATCH STRUCTURE  CLBATCH OPTIONAL
    *"      CHANGED_BATCH STRUCTURE  MCHA OPTIONAL
    *"      ZIMSEG STRUCTURE  IMSEG OPTIONAL
    *"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MATERIAL
    *"      NO_BATCH
    *"      NO_PLANT
    *"      MATERIAL_NOT_FOUND
    *"      PLANT_NOT_FOUND
    *"      LOCK_ON_MATERIAL
    *"      LOCK_ON_PLANT
    *"      LOCK_ON_BATCH
    *"      LOCK_SYSTEM_ERROR
    *"      NO_AUTHORITY
    *"      BATCH_NOT_EXIST
    *"      NO_CLASS
    *"      ERROR_IN_CLASSIFICATION
    *"      ERROR_IN_VALUATION_CHANGE
      DATA: F_TRANSACTION_ID           LIKE ARFCTID.
      CALL FUNCTION 'TRANSACTION_BEGIN'
        IMPORTING
          TRANSACTION_ID = F_TRANSACTION_ID.
      CALL FUNCTION 'VB_CHANGE_BATCH'
        EXPORTING
          YMCHA                     = YMCHA
          YUPDMCHA                  = YUPDMCHA
          CHANGE_LGORT              = CHANGE_LGORT
          BYPASS_LOCK               = BYPASS_LOCK
          BYPASS_POST               = BYPASS_POST
          X_BNCOM                   = X_BNCOM
          KZCLA                     = KZCLA
          XKCFC                     = XKCFC
          CLASS                     = CLASS
          NO_CHECK_OF_QM_CHAR       = NO_CHECK_OF_QM_CHAR
          REF_MATNR                 = REF_MATNR
          REF_CHARG                 = REF_CHARG
          REF_WERKS                 = REF_WERKS
          SET_OLD_BATCH             = SET_OLD_BATCH
          BUFFER_REFRESH            = BUFFER_REFRESH
          NO_CHANGE_DOCUMENT        = NO_CHANGE_DOCUMENT
          GRUND                     = GRUND
          NO_CFC_CALLS              = NO_CFC_CALLS
          BATCH_DEL_FLAGS           = BATCH_DEL_FLAGS
          SEND_SYS                  = SEND_SYS
        IMPORTING
          YMCHA                     = YMCHA
          EMKPF                     = EMKPF
        TABLES
          CHAR_OF_BATCH             = CHAR_OF_BATCH
          CHANGED_BATCH             = CHANGED_BATCH
          ZIMSEG                    = ZIMSEG
        EXCEPTIONS
          NO_MATERIAL               = 1
          NO_BATCH                  = 2
          NO_PLANT                  = 3
          MATERIAL_NOT_FOUND        = 4
          PLANT_NOT_FOUND           = 5
          LOCK_ON_MATERIAL          = 6
          LOCK_ON_PLANT             = 7
          LOCK_ON_BATCH             = 8
          LOCK_SYSTEM_ERROR         = 9
          NO_AUTHORITY              = 10
          BATCH_NOT_EXIST           = 11
          NO_CLASS                  = 12
          ERROR_IN_CLASSIFICATION   = 13
          ERROR_IN_VALUATION_CHANGE = 14
          OTHERS                    = 15.
      IF SY-SUBRC IS INITIAL.
        CALL FUNCTION 'TRANSACTION_END'
          EXPORTING
            TRANSACTION_ID = F_TRANSACTION_ID
          EXCEPTIONS
            OTHERS         = 1.
      ELSE.
        CALL FUNCTION 'BALW_BAPIRETURN_GET2'
          EXPORTING
            TYPE   = SY-MSGTY
            CL     = SY-MSGID
            NUMBER = SY-MSGNO
            PAR1   = SY-MSGV1
            PAR2   = SY-MSGV2
            PAR3   = SY-MSGV3
            PAR4   = SY-MSGV4
          IMPORTING
            RETURN = RETURN.
        APPEND RETURN.
        CALL FUNCTION 'TRANSACTION_ABORT'
          EXPORTING
            TRANSACTION_ID = F_TRANSACTION_ID
          EXCEPTIONS
            OTHERS         = 1.
        EXIT.
      ENDIF.
    ENDFUNCTION.
    Thanks,
    Sara

    Hi Subramani,
    Thanks for your response.
    BAPI_BATCH_CREATE will not work for us, because we are trying to update batch, not creating new batch.
    Also, The function TRANSACTION_END, I am calling in the code is responsible for committing the transaction.
    Thanks,
    Sara

Maybe you are looking for

  • How do I get my game to work in Parallels?

    I purchased parallels to run programes in Windows XP and I upgraded to Parallels 3.0 to have the ability to play DirectX games. I loaded Empire Earth II Platimun Edition. When I put the disc in to play I get a popup message to insert the original dis

  • Problems using CVS with Jdeveloper - Project

    I have Jdeveloper on Windows 2000 and CVS repository on unix. I am using wincvs. In the documentation it mentions that I have to create a new project on JDeveloper and then import that project in CVS. But if I already have files in CVS then how can I

  • Bug CSCud93686 - Change password fails with AC on Windows 8 and 7

    Bug CSCud93686 is currently locked because it contains proprietary information.  This bug is fixed in the most recent release of AnyConnect Secure Mobility Client and I am interested in the full details because we have had issues implementing the pas

  • CS4: crash with right-click on image with clipping path!

    I have a placed image. It is TIFF and has aPhotoshop Path. The path is not on when placed. Then I select the TIFF image and choose clipping > options. I select the Photoshop path. Now I want to change the path to a frame so I right-click on the image

  • New key combination for access sequence

    hi, i have an active access sequence called ZBMP. There is 2 key combinations to the access sequence   5 materail / plant 10 material I need to add a new key combination 15 - material / Pant / Distribution Channel to the access sequence. Can someone