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.

Similar Messages

  • 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.

  • 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

  • More log writer contention when using JDBC Batch Updates?

    So if I'm already seeing log writer contention when I'm commiting inserts one row at a time.
    Why would I see even more contention of log writer ie. commit waits in Enterprise Manager when I batch these inserts using JDBC updates.
    Today I observed significantly more commit waits when I used JDBC batching vs commit one row at a time.

    Please refer
    http://www.oracle.com/technology/products/oracle9i/daily/jun07.html

  • 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

  • Problem about House Number of Vender Transfer by using LSMW+Batch-Input

    Hi,
    anyone has met the same problem?
    by using LSMW+Batch-Input method to transfer vender data the field House Number cannot be added.
    Object: 0040 Vendor Master
    Method 0002 Shared
    Program Name RFBIKR00
    Program Type B Batch Input
    Thanks in advance!

    in Vedndor master LSMW batch input method there is no field for House Number , we have only one filed
    (STRAS)for street and house numner in LSMW.
    first create the vendors after that update through XK02
    for this you can write program small LSMW recording  method
    using below fileds
    LIFNR                          C(010)    Vendor
    BUKRS                          C(004)    Company Code
    STREET                         C(060)    STREET
    HOUSE_NUM1                     C(010)    HOUSE_NUM1

  • 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.

  • 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

  • How to run a FM using wf-batch

    Hi all,
    We are having one function module for updating production order number in a Z-Table.
    So whenever we save a production order this function module is automatically triggered using the user wf-batch and update the order number in the Z-Table.
    But we dont know how the function module was triggered using wf-batch when we created production order( Because the fm was created on 1998 by another client)
    How to find the link between FM(with wf-batch) and the production order?
    Kind Regards
    Kumar

    Hi aditya,
    Tnx for ur reply. But we are not using the WF module.
    If i put where used list for that FM then a business object with name Z_2005PP is displayed. In this they are using one method which contains the FM name.
    But if i put where used to that BO then no workflow template is available.
    So how they triggered the FM using wf-batch whenever they create the production order?
    Regards,
    Kumar.

  • 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

  • Production order, change/update batch

    Hello,
    I need to change the batch of a produciton order.
    Is there a BAPI that can do the job?

    Hi,
    try this way..
    CALL FUNCTION BAPI_PRODORD_GET_DETAIL'
    "is used to get the Production order detials later call the below fm to update the batch
      w_poitem-po_item       = '0001'.
      CONCATENATE 'External Services - Batch-' w_e_7b1_view-batch_number INTO w_poitem-short_text.  "here Update Batch
      w_poitem-quantity      = w_menge.
      w_poitem-preq_no       = w_banfn.                 "w_child-trans_doc_id .
      w_poitem-preq_item     = w_bnfpo.                 "w_child-trans_line_id.
      APPEND w_poitem TO t_poitem.
    * Do up to X times only when locking error
      DO w_i_retry_count TIMES.
        REFRESH t_po_return.
      CALL FUNCTION BAPI_PRODORD_CHANGE'
        EXPORTING
          purchaseorder = w_expProductionOrder
        TABLES
          return        = t_return
          poitem        = t_poitem
          poitemx       = t_poitemx.
    prabhudas

  • Oracle Updating Batches

    Hi All,
    I wanted to have Batch execute in my java method.
    There are few requirements of that
    1. The data has to be inserted in 2 tables
    2. The data has to be deleted from 2 tables
    3. I have to use Statement for delete as the query uses in clause.
    I have gone through http://web.umr.edu/~ora9i/java.901/a90211/oraperf.htm for Oracle Updating batches.As per the details given in above link, I have few doubts
    1.Can I use 2 or more different Prepared Statements in same Batch?
    For Example:
    //Creating a prepared statement for first table
    ps = conn.prepareStatement(INSERT_INTO_TABLE1);
    ((OraclePreparedStatement)ps).setExecuteBatch (30);
    ps.setInt(1, 23);
    ps.setString(2, "Sales");
    ps.setString(3, "USA");
    ps.executeUpdate(); //JDBC queues this for later execution
    ps.setInt(1, 24);
    ps.setString(2, "Blue Sky");
    ps.setString(3, "Montana");
    ps.executeUpdate(); //JDBC queues this for later execution
    ps.setInt(1, 25);
    ps.setString(2, "Applications");
    ps.setString(3, "India");
    ps.executeUpdate(); //The queue size equals the batch value of 3
    //JDBC sends the requests to the database
    ps.setInt(1, 26);
    ps.setString(2, "HR");
    ps.setString(3, "Mongolia");
    ps.executeUpdate(); //JDBC queues this for later execution
    //Creating a prepared statement for second table
    ps = conn.prepareStatement(INSERT_INTO_TABLE2);
    ((OraclePreparedStatement)ps).setExecuteBatch (30);
    ps.setInt(1, 23);
    ps.setString(2, "Sales");
    ps.setString(3, "USA");
    ps.setInt(4,1);
    ps.executeUpdate(); //JDBC queues this for later execution
    ps.setInt(1, 24);
    ps.setString(2, "Blue Sky");
    ps.setString(3, "Montana");
    ps.setInt(4,1);
    ps.executeUpdate(); //JDBC queues this for later execution
    ps.setInt(1, 25);
    ps.setString(2, "Applications");
    ps.setString(3, "India");
    ps.setInt(4,1);
    ps.executeUpdate(); //The queue size equals the batch value of 3
    //JDBC sends the requests to the database
    ps.setInt(1, 26);
    ps.setString(2, "HR");
    ps.setString(3, "Mongolia");
    ps.executeUpdate(); //JDBC queues this for later execution
    //Atlast calling send batch
    ((OraclePreparedStatement)ps).sendBatch();
    2.Can I use the Oracle Updating Batches for Normal Statements? Can any one elaborate following points
    •     Do not mix standard update batching syntax with Oracle update batching syntax in the same application. The JDBC driver will throw an exception when you mix these syntaxes
    As per above statement, we can’t have both type of updating in a method or in the whole application. Can any one elaborate this point, how it’s possible as every time we have to open a new connection object?
    If we cant make use of both type of batching, then how to implement the Oracle Updating Batches for simple Statements.
    •     The Oracle implementation of standard update batching does not implement true batching for generic statements and callable statements. Although Oracle JDBC supports the use of standard batching syntax for Statement and CallableStatement objects, you will see performance improvement for only PreparedStatement objects.
    3. If first case is possible & if we can use the Oracle Updating Batches for simple Statements, then can we have all the statements in one Batch?
    the query if run from PL/SQL will be like this and in same sequence
    delete from table1 where country in ('USA','GERMANY')// multiple statement of this type
    delete from table2 where country in ('USA','INDIA'))// multiple statement of this type
    insert into table1 values(1,'SALES','USA'))// multiple statement of this type
    insert into table2 values(1,'SALES,'Australia','1')// multiple statement of this type

    Dear Robert Richardson,
    Unfortunately you can only access the Batch/Serial object by an document object.
    If you want to update a Batch fields, then you need to get the document object first, then get its batch object as
    Documents > Document_Lines > BatchNumbers.
    Another thought is to update the field value by UI API when open the OIBT form if possible.
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • Update Batch Classification for a Material

    Hello friends,
    I'm facing the following problem : A specific BTCI wich simulates MB01 was calling another program called SAPLCTMS to update Batch classification for a Material, this program (SAPLCTMS ) seems to be not necessary after the support package Level 57 (we just installed SAP4.6C). I didn't find any note on OSS for this...
    Now i'm trying to use this BAPI instead of BTCI for the Material batch classification  :
    CALL FUNCTION 'BAPI_OBJCL_CHANGE'
             EXPORTING
                  objectkey          = l_objnum
                  objecttable        = 'MCH1'
                  classnum           = 'ZGB_TIDCLASS'
                  classtype          = '022'
                  status             = '1'
                  keydate            = sy-datum
             TABLES
                  allocvaluesnumnew  = t_valuesnum
                  allocvaluescharnew = t_valueschar
                  allocvaluescurrnew = t_valuescurr
                  return             = t_return.
    But its not working, it keeps asking for a batch number. I guess i'm not using the right FM ?
    Any ideas about this ?
    Thank you in advance for your help !
    Best Regards.
    Edited by: Soufiane FAYSSAL on Jun 18, 2009 11:42 AM

    Hello,
    I am Ashok Chelikani. I am working on the same Issue.
    i am getting following message:
    TYPE ID    NUMBER  MESSAGE
    E       |C1   |003          |Characteristic DIMENSIONSCOLOR not found or not valid
    I        |CL   |736          |Assignment was not created 
    my procedure as follows:
    CLEAR: lv_objnum.
    lv_objnum = I_MSEG-MATNR.
    **Get Object Details
    CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
    EXPORTING
    objectkey = lv_objnum
    objecttable = 'MARA'
    classnum = 'Z_RMBCH1'
    classtype = '001' 
    TABLES
    allocvaluesnum = lt_alloc_num
    allocvalueschar = lt_alloc_char
    allocvaluescurr = lt_alloc_curr
    return = lt_return.
    IF NOT lt_return IS INITIAL.
    CLEAR: lv_objnum.
    lv_objnum(18) = I_MSEG-MATNR.
    lv_objnum+18(10) = I_MSEG-CHARG.
    CALL FUNCTION 'BAPI_OBJCL_CHANGE'
    EXPORTING
    objectkey = lV_objnum
    objecttable = 'MCH1'
    classnum = 'Z_RMBCH1'
    classtype = '023' 
    tables
    allocvaluesnumnew = lt_alloc_num
    allocvaluescharnew = lt_alloc_char
    allocvaluescurrnew = lt_alloc_curr
    return = lt_return.
    lt_return returing error message. Kindly help me.

  • Update batch number with B1iSN

    Hi
    is it possible to update Batch Number using B1ISN ?
    i think it's the object 106 . i create the object using the dev. tools. , create a BP using this object , and try to create a xml to see the content of the object .
    When a user validate the Stock Management / Item management / batches / update , the scenario is triggered , but i have a error message :
    com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.RejectedException: XCE045 IPO-Step not known: /0010000100.inbound/com.sap.b1i.datasync.ipo/P01/P01.ipo/EventConvertor
    Did i miss something ?( i've already created object using the same procedure , and never had this error ) or does it mean that it's not possible to manage batch numbers using B1ISN ?
    thanks

    I try to query the new created batch number to update the batch properties.
    But cannot found in OBTN table.

  • How to get the destination path in an photoshop sdk export plugin when using a batch action?

    Hello,
    I've written an exporter plugin (not save-as) that exports a given file to a custom format.
    I was able to open a file selector dialog and choose a path that is then transported to the saving location.
    Now my problem is: Another intended use is batch exporting many files. The user records an action with the export step and then applies a batch on it.
    The PS batch window allows you to select the destination to be a directory where the exporter should write the data. Fine.
    Now how do I get this path? When running in batch mode the silent flag is set for my plugin so I do not spawn a file selector dialog to annoy the user.
    But I am also unable to obtain the path which was selected by the user in the batch window.
    The SDK automation plugin Getter has some code to retrieve the path of the file and even that fails as it cannot obtain anything.
    PropertyUtils.h has some PIGetWorkPathIndex and PIGetPathName functions but I always get 0 when asking PIGetNumberPaths, and get -1 with PIGetWorkPathIndex.
    I would be thankful if somebody could hint me how I can retrieve directories.
    It even seems impossible for me to get the path where the file is actually saved. The filter plugin called Propertizer utilizes a function called PIGetDocumentName but this only outputs the file name, not the full path.
    (Just to be sure: The file on which the tests run is already saved to disk, if that matters)
    Another fun part is: When I record an export step, what is the directory I am exporting into?

    Ok, after lots of reading the sdk sample outbound I've realized that or plugin is broken.
    When recording an action the outbound plugin stores the current path to gAliasHandle which is then recorded as a scripting parameter. Now when I execute the action I get the alias handle.
    However how is this supposed to work with an export plugin and batch processing with a "destination" set to a target? Is this even possible or do I need to double click the export step in the action and "reset" the location even if that causes the entire exporter to run again?

Maybe you are looking for

  • Mic and Cam won't work on iChat

    Hello I have a new mac pro, so I am a beginner! However, I know that the cam is working and that there is a function mic because when I can see it on My Display iSight. I see me, and I see the audio. But on iChat the camera and phone icons are not gr

  • Problem while using dynamic geo characteristic on a map

    Dear all, I'm not able to display dynamic geo characteristics on a map though I am able to display static geo chars on a map. I have done the following: - Define the characteristic as dynamic geo characteristic. - Download the Geo data from the char

  • Possible to switch from Apache to IIS for 9.3.1 BI+ products?

    I need to see if it's possible to 'convert' my 9.3.1 Hyperion BI+ tools to run on IIS instead of Apache, or how hard/tricky it is. 1) Anyone ever switched web servers? Can it be done without uninstalling & reinstalling all the BI+ products? 2) what a

  • INBOUND_IDOC_PROCESS vs IDOC_INBOUND_WRITE_TO_DB

    Hello together, currently I use the function module INBOUND_IDOC_PROCESS in BACKGROUND TASK to create orders. Now some other software has been changed and the length of 10 Bytes for the field SEGNAM is not enough. However the function module INBOUND_

  • Material No. Mandatory with account assignment category K

    Dear, Can i make Material No. Mandatory with account assignment category K Please advise Rami