Error When Insert Invoice!!!

Hi All!  "Item no. is missing  [INV1.ItemCode][line: 2]"
I have function to Insert A/R Invoice as follows:
Private Function Add_Invoice(ByVal TransCode As Double) As Boolean
         Dim strShop As String = "C570004"
        Dim oInv As SAPbobsCOM.Documents
        oInv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
        oInv.CardCode = strShop
        oInv.DocDate = Now.Date
        oInv.DocDueDate = Now.Date
        oInv.Comments = "From POS System - With Transaction Code " & TransCode
        Dim disc As Double = 0
        Dim WarehouseCode As String = "HCI001"
        Dim VATGroup As String = "S10_CM"
        For i_row As Integer = 0 To jsgxDetails.RowCount - 1
            jsgxDetails.Row = i_row
            oInv.Lines.SetCurrentLine(i_row)
            oInv.Lines.ItemCode = jsgxDetails.GetValue("Item_Code")
            oInv.Lines.ItemDescription = jsgxDetails.GetValue("Item_Name")
            oInv.Lines.UnitPrice = jsgxDetails.GetValue("Item_Price")
            oInv.Lines.Quantity = jsgxDetails.GetValue("Item_Quantity")
            oInv.Lines.DiscountPercent = disc
            oInv.Lines.WarehouseCode = WarehouseCode
            oInv.Lines.VatGroup = VATGroup
            oInv.Lines.Add()
        Next
        lRetCode = oInv.Add()
       If lRetCode <> 0 Then
            oCompany.GetLastError(lErrCode, sErrMsg)
            MessageBox.Show(sErrMsg)
            Return False
else
          Return true
end if
end function
But when I Add 1 item, It Appears error "Item no. is missing  [INV1.ItemCode][line: 2]". Add 2 items appears "Item no. is missing  [INV1.ItemCode][line: 3]". I don't know this bug. Help me to solve this problem. Thanks.

Hi Jane Jing!
Thanks for your support I have fixed this problem. Now I want to add Payment continue in Add Invoice function:
Dim oPayment As SAPbobsCOM.Payments
                oPayment = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
                oPayment.CardCode = strShop
                oPayment.DocDate = Now.Date
                oPayment.DocCurrency = "VND"
                oPayment.CashAccount = "111100"
                oPayment.CashSum = oInv.DocTotal
                oPayment.Series = 0
                oPayment.Remarks = "Remarks"
                oPayment.Invoices.DocEntry = oInv.DocEntry
                oPayment.Invoices.DocLine = 0
                oPayment.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_Invoice
                oPayment.Invoices.SumApplied = oInv.DocTotal
                lRetCode = oPayment.Add
                If lRetCode <> 0 Then
                    oCompany.GetLastError(lErrCode, sErrMsg)
                    MessageBox.Show(sErrMsg)
                    Return False
                End If
The DocEntry of Invoice i have Add, but appear Error "No matching records found (ODBC -2028)" . Help me to fix it. Thanks
Edited by: Tao lao on Jun 5, 2008 12:09 PM

Similar Messages

  • Error when inserting or changing in a sorted table

    Hi Experts,
    When i am executing a webdynpro application it says Error when inserting or changing in a sorted table. Can any one help for this.
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: GET_CATEGORY_LIST of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
    Method: IF_COMPONENTCONTROLLER~GET_CATEGORY_LIST of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
    Method: WDDOMODIFYVIEW of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/F9XHYWN4WKNMG4CDUGA8==CP
    Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
    Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP
    Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP
    Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
    in ST22
    Object Definition
      DATA: lo_node                   TYPE REF TO if_wd_context_node,
            lo_node_info              TYPE REF TO if_wd_context_node_info,
            lo_element                TYPE REF TO if_wd_context_element.
    Additional Data declarations
      DATA: lv_key TYPE string.
    Get context node.
      lo_node = wd_context->get_child_node( name = 'DROPDOWNLISTS' ).
      lo_node_info = lo_node->get_node_info( ).
    Call method to fetch the categories.
      CALL METHOD cl_hap_wd_start_page_ui=>category_get_list
        EXPORTING
          add_on_application = add_on_application
        IMPORTING
          t_categories       = lt_categories.
    Append Default selection entry 'All'.
      lw_category-category_id = '00000000'.
      lw_category-category_name = 'All'.
      APPEND lw_category TO lt_categories.
    Sort table after appending the new entry.
      SORT lt_categories ASCENDING.
    Loop through the category list and populate key(category_id) value(category_name) pair for
      LOOP AT lt_categories INTO lw_category.
        lw_key_value-key = lw_category-category_id.
      625     lw_key_value-value = lw_category-category_name.
    >>>>>     APPEND lw_key_value TO lt_key_values.------>Here it throws an error
      627     CLEAR: lw_key_value, lw_category.
      628   ENDLOOP.
      629
      630 * Bind the category key-value pair to the context attribute.
      631   CALL METHOD lo_node_info->set_attribute_value_set
      632     EXPORTING
      633       name      = 'CATEGORY_LIST'
      634       value_set = lt_key_values.
      635
      636 * Make the entry 'All' as default selected.
      637   CALL METHOD lo_node->set_attribute
      638     EXPORTING
      639       value = '00000000'
      640       name  = 'CATEGORY_LIST'.
      641
      642 ENDMETHOD.
      643
      644 method GET_EMPLOYEES.
      645

    Hello Durga,
    from the error what I understood is lt_key_values is a sorted table and you are trying append a new line to it. Incase of sorted table you need to use the INSERT statement and not the APPEND statement.
    INSERT lw_key_value INTO table lt_key_values.
    BR, Saravanan

  • Error when inserting Web Dynpro script in Adobe form

    Hi
    In my WD component in one of the view I have an ADOBE form (Online scenario) and a button to save data into backend. In the ADOBE form everything is working properly, however the problem is when I click on the button to save, Its not getting into my action code. Even I am not getting any error other than the wait symbol.
    In the form I have taken ZCI layout but when i'm inserting Webdynpro Script its showing an error 'Error when inserting Web Dynpro script'.
    Please let me know why this error is getting.
    Thanks
    Ram

    Hi Ram,
    I hope  you help me,
    I have the same error, when I insert a web Dynrp Script, what version of SAPGUI do you use?
    Thanks

  • Error when inserting Web Dynpro script

    Hello,
    I am trying to create a new form using fields from KNA1 and am using ISR controls. When I try to insert Webdynpro scripts i get message "Error when inserting Web Dynpro script" Message no. FPUIFB094.
    Has anyone faced this error? no notes are available regarding this and in SDN.
    Regards
    Prasad

    It must be atleast ALD 7.1. Check this [Thread|Re: Problem on Button; having the same issue. Also check the SAPNOTE 962763.

  • " Error when inserting in PSA table RSTSODSPART" when loading into PSA

    Hello,
    Did anyone encounter something similar, and found a solution ?
    BI 7.0 -  EnhP 1 - SP5
    When loading data from R/3 into PSA, we encounter following error message:
    " Error when inserting in PSA table RSTSODSPART"
    ===============================================================
    - the first datapackage is written successfully to PSA,
    but from the second datapackage onwards the error message pops-up
    " Error when inserting in PSA table RSTSODSPART"
    - The original dataselection in the infopackage is somewhere stored
    If the selection in the InfoPackage is reduced (e.g. only one document i.o. a period)
    it stil starts loading according the original selection (the month)
    - If we create a new InfoPackage and select very few data (only one datapackage)
    then we can load to PSA succesfully, but when we load to DSO we can't activate the DSO.
    - We remarked that:
    Two versions of the PSA exist for that datasource 0FI_GL_40:
    a Table(/BIC/B0000555000) in version 1 exists,
    a Table(/BIC/B0000555001) in version 2 exists
    Thanks in advance,
    Best regards

    Hello All,
    We had a problem similar to what Ilse Depoortere describes. The problem happens in our BW QA system a few days/weeks after it has been copied from Production. Data loads start failing with these two error messages:
    RSM2 851 - Error when writing in PSA (Caller 32)
    RSAR 130 - Error 7 when adding to PSA (Caller 70)
    We have just implemented the fix described in note 1340371 (replaced the LIB_DBSL with patch level 247), and the problem is gone. Failed data load process chains can be restarted and finish successfully.
    This has been a really useful discussion, thanks all! And thanks to my coworker Bob who found it.
    Vince Vajda

  • Runtime Error when Posting Invoice with text added (MIRO)

    Hi Gurus,
    We are getting a shortdump (runtime error) when we post certain invoices in MIRO. This happens when we input some text in the text field or add some text to the NOTE tab.
    We are having exception ERROR_DP raised in the program c_textedit_control.
    If the text field is blank and nothing is writing in the NOTE tab, the invoice gets posted with no problem.
    Has anyone come accross this issue before and how did you solve it please.
    Thanks.

    are u processing thru BADI, then it is very easy there are interfaces and methods for handling texts. u sud not get any error and plz never write commit work in BADI.
    May be i cud provide more help if u share more details but let me tell more but let me share one recent development that i did.
    In ME59n when we do PR TO PO then texdts sud be copied to header text in PO and get reflected in PO. the coding is like below may be can give some clues wid ur MIRO stuff.
    METHOD if_ex_me_process_po_cust~process_header.
    *  Author        : Prasenjit Bist                                          *
    *  ID            : PRBIST                                                  *
    *  Date          : 04.08.2011                                              *
    *  Changes       : New Devlopment                                          *
    *  Change Request:                                                         *
    *  Description: To copy LSP information in PO                               *
    TYPES:
            BEGIN OF ty_text,
              auto_pr_po TYPE zman_auto_pr_po,
              plant TYPE zman_plant,
              vendor TYPE zman_vendor,
              lsp_vendor TYPE zman_lsp_name,
              contract_no_text TYPE zman_contract_no_text,
            END OF ty_text.
      TYPES:
           BEGIN OF ty_address,
             ort01      TYPE ort01_gp,  " city
             ort02      TYPE ort02_gp,  " district
             pfach      TYPE pfach,     " PO Box
             pstlz      TYPE pstlz,     " Postal code
             region     TYPE regio,     "Region (State, Province, County)
             telf1      TYPE telf1,     "1st telephone number
             telf2      TYPE telf2,     "2nd telephone number
             telfx      TYPE telfx,     "Fax number
             land1      TYPE land1,
           END OF ty_address.
      DATA:
       get the header level details
            ls_mepoheader TYPE mepoheader,
            lt_purchase_order_items TYPE purchase_order_items,
            ls_purchase_order_items LIKE LINE OF lt_purchase_order_items,
       get the line item details
            lt_mepoitem TYPE STANDARD TABLE OF mepoitem,
            ls_mepoitem TYPE mepoitem,
            lt_textlines TYPE mmpur_t_textlines,
            ls_textlines LIKE LINE OF lt_textlines,
    TEXT TYPES
            lt_texttypes TYPE mmpur_t_texttypes,
            ls_texttypes LIKE LINE OF lt_texttypes.
      DATA: l_name TYPE thead-tdname,
            ls_header TYPE thead,
            lt_lines TYPE STANDARD TABLE OF tline,
            ls_lines TYPE tline,
            l_tdobject TYPE thead-tdobject,
            l_metafield TYPE mmpur_metafield.
      DATA: ls_text TYPE ty_text,
            l_text(50).
      DATA: l_continue(1).
      DATA: l_pass_vendor TYPE lifnr,
            l_pass_plant TYPE werks,
            l_name1(35).
    fetch the address
      DATA: ls_address TYPE ty_address,
            l_landx    TYPE landx.
      CONSTANTS: lc_id TYPE thead-tdid     VALUE 'F01',
                 lc_langu TYPE thead-tdspras  VALUE 'E',
                 lc_object TYPE thead-tdobject VALUE 'EKKO'.
      CONSTANTS: lc_set(1) VALUE 'X',
                 lc_vendor(11) VALUE 'Vendor:    ',
                 lc_lsp_vendor(11) VALUE 'LSP Vendor:',
                 lc_contract_no_text(14) VALUE 'Contract Text:'.
      CLEAR: l_continue.
      IF sy-uname EQ 'PRBIST'.
    Read the header data
        ls_mepoheader = im_header->get_data( ).
    read teh item level data.
       break prbist.
        lt_purchase_order_items = im_header->get_items( ).
        LOOP AT lt_purchase_order_items INTO ls_purchase_order_items.
    The item attribute of the structure is reference to line item
          ls_mepoitem = ls_purchase_order_items-item->get_data( ).
          APPEND ls_mepoitem TO lt_mepoitem.
        ENDLOOP.
    CHECK VENDOR IS THE ONE WE WANT.
        SELECT SINGLE name1 FROM lfa1 INTO l_name1 WHERE lifnr = ls_mepoheader-lifnr.
    First read the vebdor name based on LIFNR.
        TRANSLATE l_name1 TO UPPER CASE.
        IF ( l_name1 EQ 'LSP1' ) OR ( l_name1 EQ 'LSP2' ).
          LOOP AT lt_mepoitem INTO ls_mepoitem.
            TRANSLATE ls_mepoitem-werks TO UPPER CASE.
            IF ls_mepoitem-werks EQ 'FI01'.
              l_continue = lc_set.
              l_pass_vendor = ls_mepoheader-lifnr.
              l_pass_plant = ls_mepoitem-werks.
              EXIT.
            ENDIF.
          ENDLOOP.
        ENDIF.
        IF l_continue EQ lc_set AND sy-tcode EQ 'ME21N'.
    Call the POP UP screen to display LPS information.
          CALL FUNCTION 'ZMAN_LSP_POP_UP'
            EXPORTING
              im_vendor = l_pass_vendor
              im_plant  = l_pass_plant
            IMPORTING
              ex_text   = l_text.
    GET Text Object (TTXOB)
          im_header->if_longtexts_mm~get_textobject(
                        IMPORTING ex_tdobject = l_tdobject
                                  ex_metafield = l_metafield ).
    GET TEXT IDS
          im_header->if_longtexts_mm~get_types(
                        IMPORTING ex_texttypes = lt_texttypes ).
    CHECK TEXT TYPE 'F01' EXISTS.
          READ TABLE lt_texttypes INTO ls_texttypes WITH  KEY tdid = lc_id.
          IF sy-subrc EQ 0.
    UPDATING ITEM TEXT.
            MOVE: l_tdobject TO ls_textlines-tdobject,
                  ls_texttypes-tdid TO ls_textlines-tdid,
                  '*' TO ls_textlines-tdformat.
         break prbist.
            ls_text = l_text.
         CONCATENATE l_text ls_texttypes-tdtext INTO ls_textlines-tdline.
           CONCATENATE ls_text-vendor
                       ls_text-plant
                       ls_text-lsp_vendor
                       ls_text-contract_no_text
                                               INTO ls_textlines-tdline SEPARATED BY space.
           APPEND ls_textlines TO lt_textlines.
          INSERT VENDOR
           CLEAR ls_textlines-tdline.
           CONCATENATE lc_vendor ls_text-vendor INTO ls_textlines-tdline SEPARATED BY space.
           APPEND ls_textlines TO lt_textlines.
          INSERT LSP VENDOR
            CLEAR ls_textlines-tdline.
            CONCATENATE lc_lsp_vendor ls_text-lsp_vendor INTO ls_textlines-tdline SEPARATED BY space.
            APPEND ls_textlines TO lt_textlines.
          INSERT CONTRACT TEXT.
            CLEAR ls_textlines-tdline.
            CONCATENATE lc_contract_no_text ls_text-contract_no_text INTO ls_textlines-tdline SEPARATED BY space.
            APPEND ls_textlines TO lt_textlines.
         INSERT A BLANK LINE.
            CLEAR ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
    INSERT addreSS CAPTION.
            CLEAR ls_textlines-tdline.
            MOVE 'Address:' TO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
            break prbist.
    READ THE ADDRESS
            SELECT SINGLE   ort01      " city
                            ort02      " district
                            pfach      " PO Box
                            pstlz      " Postal code
                            regio      "Region (State, Province, County)
                            telf1      "1st telephone number
                            telf2      "2nd telephone number
                            telfx      "Fax number
                            land1      "COUNTRY
            FROM lfa1 INTO ls_address WHERE lifnr = ls_mepoheader-lifnr.
    GET COUNTRY
            SELECT SINGLE landx FROM t005t INTO l_landx WHERE spras = 'E' AND land1 = ls_address-land1.
    INSERT ADDRESS DETAILS.
            CLEAR ls_textlines-tdline.
            CONCATENATE ls_address-ort01 ls_address-ort01 INTO ls_textlines-tdline SEPARATED BY space.
            APPEND ls_textlines TO lt_textlines.
    INSERT COUNTRY.
            CLEAR ls_textlines-tdline.
            MOVE l_landx TO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
    TELEPHONE DETAILS
            CLEAR ls_textlines-tdline.
            CONCATENATE 'Tel:' ls_address-telf1 '/' ls_address-telf2 INTO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
    FAX DETAILS.
            CLEAR ls_textlines-tdline.
            CONCATENATE 'Fax:' ls_address-telfx INTO ls_textlines-tdline.
            APPEND ls_textlines TO lt_textlines.
          SAVE THE HEADER LONG TEXT.
            im_header->if_longtexts_mm~set_text(
                          EXPORTING im_tdid = ls_texttypes-tdid
                                    im_textlines = lt_textlines ).
          ENDIF.
        ELSEIF l_continue EQ lc_set AND sy-tcode EQ 'ME59N'.
    No need to display POPUP simply read the values and show.
    if not
        ENDIF. "(l_continue = 'X' and transaction code is ME21N or ME59N)
        CLEAR l_continue.
      ENDIF. "(sy-uname)
    ENDMETHOD.
    Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:15 AM
    Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:21 AM

  • Errors when inserting and updating form using VIEW.

    Here's my view:
    CREATE OR REPLACE FORCE
    VIEW  "SH_ADD_EMPLOYEES_VW" ("EMP_ID", "DEPT_ID", "JOB_DESC_ID", "EMPNO", "EMP_FIRST", "EMP_LAST", "USER_NAME", "USER_INI", "DEPTNO", "DEPT_DESC", "ROLES_ID", "ADMIN", "CREATES", "APPROVES", "QUALITY", "CUST_SVC", "SH_LOCAL",
    "SH_OFFICE", "SYSTEM")
    AS
      select
    "SH_EMPLOYEES"."EMP_ID" as "EMP_ID",
    "SH_EMPLOYEES"."DEPT_ID" as "DEPT_ID",
    "SH_EMPLOYEES"."JOB_DESC_ID" as "JOB_DESC_ID",
    "SH_EMPLOYEES"."EMPNO"  as "EMPNO",
    "SH_EMPLOYEES"."EMP_FIRST" as "EMP_FIRST",
    "SH_EMPLOYEES"."EMP_LAST" as "EMP_LAST",
    "SH_EMPLOYEES"."USER_NAME" as "USER_NAME",
    "SH_EMPLOYEES"."USER_INI" as "USER_INI",
    "SH_EMPLOYEES"."DEPTNO" as "DEPTNO",
    "SH_EMPLOYEES"."DEPT_DESC" as "DEPT_DESC",
    "DOC_ROLES"."ROLES_ID" as "ROLES_ID",
    "DOC_ROLES"."ADMIN" as "ADMIN",
    "DOC_ROLES"."CREATES" as "CREATES",
    "DOC_ROLES"."APPROVES" as "APPROVES",
    "DOC_ROLES"."QUALITY" as "QUALITY",
    "DOC_ROLES"."CUST_SVC" as "CUST_SVC",
    "DOC_ROLES"."SH_LOCAL" as "SH_LOCAL",
    "DOC_ROLES"."SH_OFFICE" as "SH_OFFICE",
    "DOC_ROLES"."SYSTEM" as "SYSTEM"
    FROM "SH_EMPLOYEES" "SH_EMPLOYEES", "DOC_ROLES" "DOC_ROLES"
    where "SH_EMPLOYEES"."EMP_ID" = "DOC_ROLES"."EMP_ID"
    Here's my trigger (note - I am not using the EXCEPTION clause or (declaration of it)  because it throws an error on msg=>: 'This is my message.' Any help here would be great as well.)
    CREATE OR REPLACE TRIGGER bi_ADD_EMPLOYEES_VW
    INSTEAD OF insert ON SH_ADD_EMPLOYEES_vw
    for each row
    declare
    duplicate_info EXCEPTION;
    PRAGMA EXCEPTION_INIT(duplicate_info, -00001);
    begin
    insert into SH_EMPLOYEES
    (EMP_ID, DEPT_ID, JOB_DESC_ID, EMPNO, EMP_FIRST, EMP_LAST, USER_NAME, USER_INI, DEPTNO, DEPT_DESC)
    values
    (:new.EMP_ID, :new.DEPT_ID, :new.JOB_DESC_ID, :new.EMPNO, :new.EMP_FIRST, :new.EMP_LAST, :new.USER_NAME, :new.USER_INI, :new.DEPTNO, :new.DEPT_DESC);
    insert into DOC_ROLES
    (ROLES_ID, ADMIN, CREATES, APPROVES, QUALITY, CUST_SVC, SH_LOCAL, SH_OFFICE, SYSTEM)
    VALUES (
    :new.ROLES_ID, :new.ADMIN, :new.CREATES, :new.APPROVES, :new.QUALITY, :new.CUST_SVC, :new.SH_LOCAL, :new.SH_OFFICE, :new.SYSTEM);
    EXCEPTION
    WHEN duplicate_info THEN
      RAISE_APPLICATION_ERROR (
       num=> -20107
       msg=> 'Duplicate employee');
    END bi_ADD_EMPLOYEES_VW;
    ERROR ON UPDATE:
    ORA-20505: Error in DML: p_rowid=1001,
    p_alt_rowid=EMP_ID, p_rowid2=2, p_alt_rowid2=ROLES_ID. ORA-01779: cannot modify
    a column which maps to a non key-preserved table
    ERROR ON INSERT:
    ORA-01400: cannot insert NULL into
    ("SPICE_HUNTER1"."SH_EMPLOYEES"."EMP_ID") ORA-06512: at
    "SPICE_HUNTER1.BI_SH_ADD_EMPLOYEES_VW", line 3 ORA-04088: error during execution
    of trigger 'SPICE_HUNTER1.BI_SH_ADD_EMPLOYEES_VW' ORA-06512: at
    "SYS.WWV_DBMS_SQL", line 549 ORA-06512: at "APEX_040000.WWV_FLOW_DML", line 1121
    ORA-22816: unsupported feature with RETURNING clause
    Error Unable to process row on table SH_ADD_EMPLOYEES_VW

    From what I see you are not handling emp_id when it is null.. you need to assign it a value when null from sequence.. that column cannot be null, hence the error, and in order to "modify" a column in that table the DML needs that id to have a value.

  • Error when inserting into dynamically created filename-file

    Howry
    Am am receiving the following error when i am trying to insert into a file that have a dynamic filename (through declared variable, as date etc.).
    I presume it is trying to look for the target file with the same name as the dynamic value passed through by the variable, but cannot find it- can anyone tell me how i can rather create the file as appose to insert into an already created file..?
    Your help in this regard is much appreciated.
    Here is the error:
    ODI-1217: Session SAPO_hlr_suburbs (1577001) fails with return code 7000.
    ODI-1226: Step 6_Ins_final fails after 1 attempt(s).
    ODI-1240: Flow 6_Ins_final fails while performing a Integration operation. This flow loads target table #l_date.unl.
    ODI-1228: Task 6_Ins_final (Integration) fails on the target FILE connection SAPO_HLR_SUBURBS.
    Caused By: java.sql.SQLException: File C:\Files\Gero work\ODI In Files\SAPO_HLR_SUBURBS/2012-01-24 12:06:13.463.unl was not found
         at com.sunopsis.jdbc.driver.file.FileConnection.prepareForWriting(FileConnection.java:339)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandInsert.execute(CommandInsert.java:50)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
         at com.sunopsis.jdbc.driver.file.FilePreparedStatement.executeUpdate(FilePreparedStatement.java:138)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java:68)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:322)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:237)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:794)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:619)

    What operating system are you using?
    The name of your file has the time within it , you cant have a filename with ':' in it on Windows.
    Try using ALPHANUMERIC datatype for the variable and pull the current datetime as a char with something like :
    select to_char( sysdate ,'YYYY-MM_DD HHMISS') from dual

  • Error when inserting a new record (Ctrl+Down)

    Hello,
    [http://img402.imageshack.us/my.php?image=12846351.jpg]
    Here the problem is : when i press Ctrl+Down (Insert new record), i enter data into all those fields, but i got an error
    Cannot Insert Record ("ROGER"."NUME") cannot be null (roger is my username which i logged on). And i completed all fields
    Also, when inserting data into fields, when i click on another field, it points me back automatically to the last completed field, then when i click again on the next field, i can enter data in that field. why the cursor cannot be on the next field when i first click there?
    i changed the property of the items Required = No (but however, in the database cannot be null).
    Please help if you can.
    Thanks

    For your other issue, with null fields on your forms.
    have you ever tried to log those fields value into a log table?
    A better and simple idea is:
    Create a temp table, with four columns: seq, section, message, type
    Where section is the column to condition any search you want to make
    message is the column to write anything you want
    type is the column which holds the tpe of the record, like info, debug, warn, etc.
    then create a database procedure
    this procedure must recieve the section, message, type and insert them into the log table and do commit.
    in yiour pre-insert trigger [forms level] or in your when-button-pressed or even better on your on-commit trigger [forms level]
    write the following code:
    begin
    database_procdure('MY_FORM_NAME', 'THE VALUES ARE: 1='||:1||' 2='||:2||' 3='||:3, 'INFO');
    end;
    After that you can do a select in your sql*plus with the following statement:
    select *
    from temp_table
    where selction like 'MY_FORM_NAME';
    then you can track if any of the values you think is null or has a value, in fact, has a value.
    best regards,
    Abdel Miranda
    AEMS Global Group
    Panama

  • Error when inserting  file 4KB in a BLOB column.

    Hello,
    I am getting the following error when I am trying to insert a file > 4KB in a
    BLOB column.
    ORA-01461: can bind a LONG value only for insert into a LONG column.
    We are using Weblogic5.1.0 sp10, Oracle 8.0.5 with WL OCI driver.
    There is no change even after setting the following property weblogic.oci.min_bind_size=660
    Please can anyone help?
    Thanks.

    Hello,
    I tried using the following sql stmts to override the NLS_LANG setting on both
    server and client for a session.
    ALTER SESSION SET NLS_LANGUAGE = AMERICAN;
    ALTER SESSION SET NLS_TERRITORY = AMERICA;
    It still gave the same error.
    I tried the same using Oracle thin driver.Even then the same problem.
    As I mentioned earlier, we are using oracle 8.0.5.
    and here is the code I am using for writing BLOB data
    java.sql.PreparedStatement prepstmt = conn.prepareStatement("Update TEST_BLOB
    set BLOBATTACH = ? where IDX =1");
    ByteArrayOutputStream ostream = new ByteArrayOutputStream();
    ObjectOutputStream p = new ObjectOutputStream(ostream);
    p.writeObject(data);
    prepstmt.setBinaryStream(1, new ByteArrayInputStream(ostream.toByteArray()), ostream.size());
    prepstmt.executeUpdate();
    prepstmt.close();
    Any suggestions ?
    Thanks.
    "Slava Imeshev" <[email protected]> wrote:
    Latha,
    You need to make sure you have the same NLS_LANG setting both for the
    client
    and the server.
    Regards,
    Slava Imeshev
    "Latha Pusapaty" <[email protected]> wrote in message
    news:[email protected]...
    I Tried that. But still getting the same exception.
    java.sql.SQLException: ORA-01461: can bind a LONG value only for insertinto a
    LONG column
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
    atweblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    atweblogic.jdbc20.rmi.internal.PreparedStatementImpl.executeUpdate(PreparedSta
    tementImpl.java:54)
    atweblogic.jdbc20.rmi.SerialPreparedStatement.executeUpdate(SerialPreparedStat
    ement.java:55)
    at fictx.TRServlet.doPost(TRServlet.java, Compiled Code)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java, CompiledCode)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java, CompiledCode)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    Compiled Code)
    atweblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java,
    Compiled Code)
    atweblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java,
    Compiled Code)
    atweblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java,
    Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java,Compiled
    Code)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java,Compiled
    Code)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    Same code is working fine for files less than 4000 bytes.
    Oracle table has only one BLOB column.
    I have set weblogic.oci.selectBlobChunkSize=1200 .
    Where could be the problem?
    Andreas Bittorf <[email protected]> wrote:
    We resolved the problem as following:
    ps = con.prepareStatement
    ("update tq_businessmodel set
    businessmodel=?,lastupdate=?
    "WHERE taskid=?");
    ByteArrayOutputStream ostream = new ByteArrayOutputStream();
    ObjectOutputStream p = new ObjectOutputStream(ostream);
    p.writeObject(businessModel);
    ps.setBinaryStream(1, newByteArrayInputStream(ostream.toByteArray()),
    ostream.size());
    ps.setTimestamp(2,new Timestamp(System.currentTimeMillis()));
    ps.setLong(3,taskid);
    ps.executeUpdate();

  • Error when inserting xml with xsi:noNamespaceSchemaLocation

    Hello,
    Hopefully this isn't a stupid question....
    I am currently using Oracle 9.2.0.6.0 to try out XML.
    I haven't been able to get our DBAs to set up XML DB in its entirety so I just have the basics, i.e. I have access to the xmltype object but none of the packages like DBMS_SCHEMA and DBMS_XDB. Therefore, I haven't been able to register any schemas in the database.
    So what I'd like to know is why do I get an ORA-21700 error when I try to load an xml document which has the 'xsi:noNamespaceSchemaLocation' attribute'. If I take this out of the XML document, it loads.
    From my initial reading, I got the impression that registering a schema in order to validate documents was an optional, although probably an ideal, step to take.
    So another way of phrasing this subject might be: can one insert xml documents without the use of a schema?
    The example code is shown below.
    dbase> INSERT INTO MY_TABLE( id , message_type , status , rcvd_time, filename , xmlcol)
    2 VALUES ( 1, 0 , 'RECEIVED', sysdate , 'tempfilename' ,
    3 xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    4 xsi:noNamespaceSchemaLocation = "ExampleXML.xsd">
    5 <tag1>
    6 <tag2 attr1="something">Some data
    7 </tag2>
    8 </tag1>
    9 </ExampleXML>')
    10 );
    xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    ERROR at line 3:
    ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    dbase> ed
    Wrote file afiedt.buf
    1 INSERT INTO MY_TABLE ( id , message_type , status , rcvd_time, filename , xmlcol)
    2 VALUES ( 1, 0 , 'RECEIVED', sysdate , 'tempfilename' ,
    3 xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    4 >
    5 <tag1>
    6 <tag2 attr1="something">Some data
    7 </tag2>
    8 </tag1>
    9 </ExampleXML>')
    10* )
    dbase> /
    1 row created.
    The xmlcol column was created simply as an xmltype column.

    Basically using XMLType without XML DB is almost impossible in 9.2.x. Please have the DBA's install XML DB by running the script $ORACLE_HOME/rdbms/admin/catqm.sql. They can follow the installing XDB instuctions in the XML DB Developer's guide.
    What is actually happening here is that the PARSER is hard wired to always check is a document that contains an noNamespaceSchemaLocation or schemaLocation tag is associated with an XML Schema that has been registered with Oracle XML DB. If is is, special action is takem, if it isn't then no special action is taken. Unfortunately for various arcane technical reasons if the the XDB repository is not present the check fails totally. Even if we fixed this bug, which has been marked not feasible to fix in the past, there are many other issues with the inbuilt XML technology having dependancies on the presence of the XML DB repository and XDB database user.
    So the net/net is don't use XMLType or any XML related features in 9.2.x or later unless XML DB is installed. It is extremenly likely at this point in time that XML DB will become a mandatory component of the next release of the database. At that point you will no longer have an option. It will be automatically installed when a database is created or updated and there will be no way of un-installing it.

  • How to avoid mutating error when insert or update record

    Hi ,
    I have one transaction table which is having some detail record under one transaction number, after the one transaction number is over by insert or update, i
    want to check the total amounts of one flag should be matched on same table if it is not then give error message. But i am getting mutating error on insert or update event trigger on statement level trigger on above table.
    Is there any other way to avoid mutating error to solve the above problem or some temp table concepts to be used. help me its urgent.
    Thanks in advance,
    Sachin Khaladkar
    Pune

    Sachin, here's as short of an example as I could come up with on the fly. The sample data is ficticious and for example only.
    Let's say I need to keep a table of items by category and my business rule states that the items in the table within each category must total to 100% at all times. So I want to insert rows and then make sure any category added sums to 100% or I will rollback the transation. I can't sum the rows in a row-level trigger because I'd have to query the table and it is mutating (in the middle of being changed by a transaction). Even if I could query it while it is mutating, there may be multiple rows in a category with not all yet inserted, so checking the sum after each row is not useful.
    So here I will create;
    1. the item table
    2. a package to hold my record collection (associative array) for the trigger code (the category is used as a key to the array; if I insert 3 rows for a given category, I only need to sum that category once, right?
    3. a before statement trigger to initialize the record collection (since package variables hang around for the entire database session, I need to clear the array before the start of every DML (INSERT in this case) statement against the item table)
    4. a before row trigger to collect categories being inserted
    5. an after statement trigger to validate my business rule
    I then insert some sample data so you can see how it works. Let me know if you have any questions about this.
    SQL> CREATE TABLE item_t
      2   (category  NUMBER(2)   NOT NULL
      3   ,item_code VARCHAR2(2) NOT NULL
      4   ,pct       NUMBER(3,2) NOT NULL);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE trg_pkg IS
      2    TYPE t_item_typ IS TABLE OF item_t.category%TYPE
      3      INDEX BY PLS_INTEGER;
      4    t_item       t_item_typ;
      5    t_empty_item t_item_typ;
      6  END trg_pkg;
      7  /
    Package created.
    SQL> SHOW ERRORS;
    No errors.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER item_bs_trg
      2    BEFORE INSERT
      3    ON item_t
      4  BEGIN
      5    DBMS_OUTPUT.put_line('Initializing...');
      6    trg_pkg.t_item := trg_pkg.t_empty_item;
      7  END item_bs_trg;
      8  /
    Trigger created.
    SQL> SHOW ERRORS;
    No errors.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER item_br_trg
      2    BEFORE INSERT
      3    ON item_t
      4    FOR EACH ROW
      5  BEGIN
      6    trg_pkg.t_item(:NEW.category) := :NEW.category;
      7    DBMS_OUTPUT.put_line('Inserted Item for Category: '||:NEW.category);
      8  END item_br_trg;
      9  /
    Trigger created.
    SQL> SHOW ERRORS;
    No errors.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER item_as_trg
      2    AFTER INSERT
      3    ON item_t
      4  DECLARE
      5    CURSOR c_item (cp_category item_t.category%TYPE) IS
      6      SELECT SUM(pct) pct
      7        FROM item_t
      8       WHERE category = cp_category;
      9  BEGIN
    10    DBMS_OUTPUT.put_line('Verifying...');
    11    FOR i IN trg_pkg.t_item.FIRST..trg_pkg.t_item.LAST LOOP
    12      DBMS_OUTPUT.put_line('Checking Category: '||trg_pkg.t_item(i));
    13      FOR rec IN c_item(trg_pkg.t_item(i)) LOOP
    14        IF rec.pct != 1 THEN
    15          RAISE_APPLICATION_ERROR(-20001,'Category '||trg_pkg.t_item(i)||' total = '||rec.pct);
    16        END IF;
    17      END LOOP;
    18    END LOOP;
    19  END item_as_trg;
    20  /
    Trigger created.
    SQL> SHOW ERRORS;
    No errors.
    SQL> INSERT INTO item_t
      2    SELECT 1, 'AA', .3 FROM DUAL
      3    UNION ALL
      4    SELECT 2, 'AB', .6 FROM DUAL
      5    UNION ALL
      6    SELECT 1, 'AC', .2 FROM DUAL
      7    UNION ALL
      8    SELECT 3, 'AA',  1 FROM DUAL
      9    UNION ALL
    10    SELECT 1, 'AA', .5 FROM DUAL
    11    UNION ALL
    12    SELECT 2, 'AB', .4 FROM DUAL;
    Initializing...
    Inserted Item for Category: 1
    Inserted Item for Category: 2
    Inserted Item for Category: 1
    Inserted Item for Category: 3
    Inserted Item for Category: 1
    Inserted Item for Category: 2
    Verifying...
    Checking Category: 1
    Checking Category: 2
    Checking Category: 3
    6 rows created.
    SQL>
    SQL> SELECT * FROM item_t ORDER BY category, item_code, pct;
      CATEGORY IT        PCT
             1 AA         .3
             1 AA         .5
             1 AC         .2
             2 AB         .4
             2 AB         .6
             3 AA          1
    6 rows selected.
    SQL>
    SQL> INSERT INTO item_t
      2    SELECT 4, 'AB', .5 FROM DUAL
      3    UNION ALL
      4    SELECT 5, 'AC', .2 FROM DUAL
      5    UNION ALL
      6    SELECT 5, 'AA', .5 FROM DUAL
      7    UNION ALL
      8    SELECT 4, 'AB', .5 FROM DUAL
      9    UNION ALL
    10    SELECT 4, 'AC', .4 FROM DUAL;
    Initializing...
    Inserted Item for Category: 4
    Inserted Item for Category: 5
    Inserted Item for Category: 5
    Inserted Item for Category: 4
    Inserted Item for Category: 4
    Verifying...
    Checking Category: 4
    INSERT INTO item_t
    ERROR at line 1:
    ORA-20001: Category 4 total = 1.4
    ORA-06512: at "PNOSKO.ITEM_AS_TRG", line 12
    ORA-04088: error during execution of trigger 'PNOSKO.ITEM_AS_TRG'
    SQL>
    SQL> SELECT * FROM item_t ORDER BY category, item_code, pct;
      CATEGORY IT        PCT
             1 AA         .3
             1 AA         .5
             1 AC         .2
             2 AB         .4
             2 AB         .6
             3 AA          1
    6 rows selected.
    SQL>

  • Error when inserting install disc

    Hi,  When inserting a retail OS X Tiger disc into my G5 Tower to do an archive and install, when the computer boots of the CD, I get a Kernal Panic and cannot continue?
    I have run permissions, and disk verify and all OK, also have completed 'memtest' and all ok there too.
    Any thoughts?
    Thanks

    When you try to boot from the disc, are you depressing the C key at startup? Or depressing the Option key at startup to activate the Startup Manager screen & then selecting the install disc? Whichever method you are using, try the other method.
    KPs are usually caused by a hardware problem - USB, Firewire or RAM. Disconnect all external devices. If you have the Apple Hardware Test app on the discs that came with your Mac, run the AHT.
     Cheers, Tom

  • Inconsistent datatypes error when inserting into a object

    I am trying to insert some test data into the table emp.I have managed to succesfully create the objects and types but when I try to insert into the emp table I get a inconsistent datatypes error however I have checked the datatypes and they all seem fine. Can anyone help me.
    thanks
    CREATE OR REPLACE TYPE Address_T AS object
    (ADDR1                VC2_40,
    ADDR2               VC2_40,
    CITY_TX          VC2_40,
    COUNTY_CD          VC2_40,
    POST_CD          VC2_40);
    CREATE OR REPLACE TYPE PERSON_T AS OBJECT (
    LNAME_TX           NAME_T,
    FNAME_TX           NAME_T,
    BIRTH_DATE          DATE,
    TELEPHONE          VC2_20,
    EMAIL               VC2_40);
    CREATE OR REPLACE TYPE EMP_T AS OBJECT (
    EMP_ID     NUMBER (10),
    PERSON     PERSON_T,
    ADDRESS ADDRESS_T,
    HIRE_DATE DATE)
    CREATE TABLE EMP OF EMP_T
    (EMP_ID NOT NULL PRIMARY KEY);
    INSERT INTO EMP VALUES (1,           
    PERSON_T('PETCH',
    'GAVIN',
    '23-JAN-80',
    '(01964)550700',
    '[email protected]'),
    ADDRESS_T('67 CANADA',
    'WALKINGTON',
    'BEVERLEY',
    'EAST YORKSHIRE',
    'HU17 7RL'),
    '11-FEB-02'
    ERROR at line 1:
    ORA-00932: inconsistent datatypes

    Gavin,
    What is your VC2_40 and NAME_T type definition? Your insert used these as varchar2, which is a built-in type not a user-defined type. If you explicitly define these to be varchar2's, the insert statement works fine.
    Regards,
    Geoff
    I am trying to insert some test data into the table emp.I have managed to succesfully create the objects and types but when I try to insert into the emp table I get a inconsistent datatypes error however I have checked the datatypes and they all seem fine. Can anyone help me.
    thanks
    CREATE OR REPLACE TYPE Address_T AS object
    (ADDR1                VC2_40,
    ADDR2               VC2_40,
    CITY_TX          VC2_40,
    COUNTY_CD          VC2_40,
    POST_CD          VC2_40);
    CREATE OR REPLACE TYPE PERSON_T AS OBJECT (
    LNAME_TX           NAME_T,
    FNAME_TX           NAME_T,
    BIRTH_DATE          DATE,
    TELEPHONE          VC2_20,
    EMAIL               VC2_40);
    CREATE OR REPLACE TYPE EMP_T AS OBJECT (
    EMP_ID     NUMBER (10),
    PERSON     PERSON_T,
    ADDRESS ADDRESS_T,
    HIRE_DATE DATE)
    CREATE TABLE EMP OF EMP_T
    (EMP_ID NOT NULL PRIMARY KEY);
    INSERT INTO EMP VALUES (1,           
    PERSON_T('PETCH',
    'GAVIN',
    '23-JAN-80',
    '(01964)550700',
    '[email protected]'),
    ADDRESS_T('67 CANADA',
    'WALKINGTON',
    'BEVERLEY',
    'EAST YORKSHIRE',
    'HU17 7RL'),
    '11-FEB-02'
    ERROR at line 1:
    ORA-00932: inconsistent datatypes

  • Timeout expired error when inserting into a mirrored server

    We have 3 SQL Server 2012 servers.
    All 3 SQL Server has the same database, ie myDB.
    In 2 of the servers (say server A and B), myDB is mirrored, and on the 3rd server myDb is NOT mirrored.
    When the program calls a stored procedure to insert a record into a table in the database, on the mirrored servers (server A and B) sometimes it takes up to 7 seconds and gave an error "Timeout expired.  The timeout period elapsed prior
    to completion of the operation or the server is not responding.  This failure occured while attempting to connect to the Principle server." This doesn't happen all the time, but happens often enough throughout the day.
    The 3rd server (that is NOT mirrored) never gives this Timout expired error.
    Will mirrored server cause slowness in writing, thus causes the Timeout expired error ?
    Thank you.

    Since we can live with some missing data, I think we should use asynchronous mirroring instead of synchronous, do you agree ?
    That may be an options, provided that you are on Enterprise Edition. As I recall, Standard Edition only has synchronhous mirroring.
    There are caveats with asynchronous mirroring. One is data loss in case of a failover, which you say that you can live with. There may be more caveats, though. Unfortunately, since my role is more of a developer than a DBA, I'm not too well versed in
    the details. Maybe someone else can fill in?
    Can a firewall issue cause mirror latency, that in turn causes the delay in writing to the principal database ?
    Firewalls and other network hiccups certainly can cause a latency.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for