Error while  adding records in user defined table

Dear all,
                I am adding a record in user defined table using   .add() method. the code is given below. while adding it raises the following error
"-1[Microsoft]  [SQL Native Client] [SQL Server] Conversion failed when converting the nvarchar value '-3 @BG_MAILSETTINGS'  to data type int. (CINF).  "
All the fields are varchar date type.  
            Dim oUDT As SAPbobsCOM.UserTable
            oUDT = oCompany.UserTables.Item("BG_MAILSETTINGS")
            With oForm.DataSources.UserDataSources           
                    oUDT.Code = "1"
                    oUDT.Name = "SMTPSERVER"
                    oUDT.UserFields.Fields.Item("U_SERVER").Value = .Item("EDTSMTPSVR").ValueEx
                    oUDT.UserFields.Fields.Item("U_EMAIL").Value = .Item("EDTFEMAIL").ValueEx
                    oUDT.UserFields.Fields.Item("U_PORT").Value = .Item("EDTSMTPPRT").ValueEx
                    oUDT.UserFields.Fields.Item("U_USERNAME").Value = .Item("EDTSMTPUSR").ValueEx
                    oUDT.UserFields.Fields.Item("U_PASSWORD").Value = .Item("EDTSMTPPWD").ValueEx
                    oUDT.UserFields.Fields.Item("U_AUTHENT").Value = .Item("CMBSMTPAUT").ValueEx
                    K = oUDT.Add
                    If K <> 0 Then
                        oCompany.GetLastError(iErrCode, sErrMsg)
                        MsgBox(CStr(iErrCode) & "-" & sErrMsg, vbCritical, "Error")
                        Exit Sub
                    End If
             End with
Could any one please say the solution for this.
Many thanks,
Manikandan.
Edited by: Rui Pereira on Dec 23, 2008 3:49 PM

Dear Manikandan P,
Is there any change and check in stored procedure SBO_SP_TransactionNotification?
Best Regards
Jane Jing
SAP Business One Forums team
Edited by: Rui Pereira on Dec 23, 2008 3:56 PM

Similar Messages

  • Error while adding record

    I am getting the following error while adding record into the table CM_RECIPE_ITEM :
    Error
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
    Error Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.
    Thanking You,
    Yogesh
    CM_RECIPE_ITEM Table
    CRI_ID------CRI_CR_ID--------CRI_BOM_CODE--------CRI_CIFG_CODE---------CRI_CIRM_CODE--------CRI_SEQ--------CRI_QTY--------CRI_RM_COST
    625----------464-----------------PRODUCT3001----------FG003----------------------10---------------------------1-------------------60-----------------10
    626----------464-----------------PRODUCT3001----------FG003----------------------12---------------------------2-------------------40------------------10
    Global temporary table
    DROP TABLE COSTMAN.INTERIM CASCADE CONSTRAINTS;
    CREATE GLOBAL TEMPORARY TABLE COSTMAN.INTERIM
    ROW_ID ROWID
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    BEGIN
    INSERT INTO interim VALUES (:new.rowid);
    END;
    Trigger to update data on CM_RECIPE table
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3_AFTER"
    AFTER INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    BEGIN
    FOR ds IN (SELECT row_id FROM interim) LOOP
    UPDATE CM_RECIPE
    SET CR_RMC = (
    SELECT SUM(CRI_QTY * CRI_RM_COST)/SUM(CR_QUANTITY)
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = CR_BOM_CODE
    AND rowid = ds.row_id
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (
    SELECT CIFG_PACKING + CIFG_OVERHEAD +CIFG_OTHERS
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id
    ) + CR_RMC;
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN =
    (SELECT CIFG_DP_RATE
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id) - CR_TOTAL_COST) / CR_TOTAL_COST;
    END LOOP;
    END;
    /

    yogeshyl wrote:
    Error
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
    Error Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.The error message points to the trigger...

  • How to insert records in user defined tables through DI Server API

    Hi All,
    I have created a UDO using some userdefined tables .I am able to insert records in the user defined tables using DI API but problem is that now I want to insert records in those tables using DI Server API but I dont know how to do that please give me some way to do that
    Thanks and Regards
    Utpal

    The AddObject message is :
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Header>
        <SessionID>...</SessionID>
      </env:Header>
      <env:Body>
        <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS">
          <BOM>
            <BO>
              <AdmInfo>
                <Object>...</Object>
              </AdmInfo>
            </BO>
          </BOM>
        </dis:AddObject>
      </env:Body>
    </env:Envelope>
    How to use it with a user defined table ?

  • Error while adding records into master data

    Error :
    No matching records found (ODBC -2028)
    I have a mster table with One child table while generating code throgh getnextserialva() fn getting an error mentioned above
    i did code like this
    If pVal.ItemUID = "1" And pVal.FormMode = "3" Then
                            oDBs_Head.SetValue("Code", 0, getNextSeriesVal("VEDA_FINAL_MSTR"))
                        End If
    Function getNextSeriesVal(ByVal udoID As String) As Integer
            Try
                Dim seriesService As SAPbobsCOM.SeriesService
                Dim v_CompanyService As SAPbobsCOM.CompanyService
                Dim objectType As SAPbobsCOM.DocumentTypeParams
                Dim crmSeries As SAPbobsCOM.Series
                v_CompanyService = objMain.objCompany.GetCompanyService
                seriesService = v_CompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.SeriesService)
                objectType = seriesService.GetDataInterface(SAPbobsCOM.SeriesServiceDataInterfaces.ssdiDocumentTypeParams)
                objectType.Document = udoID
                crmSeries = seriesService.GetDefaultSeries(objectType) *Error is coming this line*
                Return crmSeries.NextNumber
            Catch ex As Exception
                objMain.objApplication.StatusBar.SetText(ex.Message)
            End Try
    in form data event
    Sub FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
            Try
                Select Case BusinessObjectInfo.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD
                        If BusinessObjectInfo.BeforeAction = True Then
                            oDBs_Head = oForm.DataSources.DBDataSources.Item("@VEDA_FINAL_MSTR")
                            oDBs_Head.SetValue("Code", 0, getNextSeriesVal("VEDA_FINAL_MSTR"))
                        End If
                    Case SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD
                        If BusinessObjectInfo.ActionSuccess = True Then
                            oDBs_Head = oForm.DataSources.DBDataSources.Item("@VEDA_FINAL_MSTR")
                        End If
                End Select
            Catch ex As Exception
                objMain.objApplication.StatusBar.SetText(ex.Message)
            End Try
        End Sub
    What is the problem while generating auto code..???

    Hello..
    First i register through code...i did code like this
    Public Function CreateUDOFinalProd() As Boolean
            If Not Me.UDOExists("VEDA_FINAL_MSTR") Then
                Dim findAliasNDescription = New String(,) {{"Code", "#"}, {"U_ItemCode", "Finished Goods"}}
                Me.registerUDO("VEDA_FINAL_MSTR", "Finished Good Master", SAPbobsCOM.BoUDOObjType.boud_MasterData, findAliasNDescription, "VEDA_FINAL_MSTR", "VEDA_FINAL_DLN")
                findAliasNDescription = Nothing
            End If
        End Function
    all the sub fn inside the fn is working  fine . I called same place where u suggested.
    At last showing messages UDO Registered Sucussfully..!!!
    I did table registration for docment parent and child table for  that is working fine automatically Add,update ... happening
    But same process im doing for master also as mentioned in code but that is not working for master and child but working for
    document and child
    To understand problem i did registration through front end
    for this i deleted created udo object(through code)
    again i created through front end ...stilll the same error
    by
    Firos

  • Repository Administration Utility - error while adding a new user

    Hello all,
    I'm currently experiencing some difficulties when I try to add a new user with the RAU tool. First I had problems installing the repository, in the CJSYSFOL stage (ORA-04063: package body "REPOS_MANAGER.JR_REG_IO" has errors). After granting execute rights on the UTL_FILE package, it seemed this problem was solved.
    However, the installation is finished and I wanted to add a user with the RAU. In user maintanance I added a user and then set all the properties. After clicking OK, the following error is generated:
    ORA-01919: role 'CKR_REPOS_MANAGER' does not exist
    ORA-06512: at "REPOS_MANAGER.JR_SYS_PRIVS", line 236
    Bladiebladiebla.
    Does anyone have a clue of what's going on here? And more important, how to solve this? Thanks for helping out!
    Greetings,
    Weis

    See if the "Check Requirements" gives you any issues to be solved or the "Object Status" utility. Seems like the role CKR_REPOS_MANAGER is not granted (directly - so not via a role).
    HTH
    Roel

  • Error while adding a record

    I am getting the following error while adding record into the table CM_RECIPE_ITEM :
    <h4> Error </h4>
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
         Error      Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.
    Thanking You,
    Yogesh
    <h4> CM_RECIPE_ITEM Table </h4>
    CRI_ID------CRI_CR_ID--------CRI_BOM_CODE--------CRI_CIFG_CODE---------CRI_CIRM_CODE--------CRI_SEQ--------CRI_QTY--------CRI_RM_COST
    625----------464-----------------PRODUCT3001----------FG003----------------------10---------------------------1-------------------60-----------------10
    626----------464-----------------PRODUCT3001----------FG003----------------------12---------------------------2-------------------40------------------10
    <h4>Global temporary table</h4>
    DROP TABLE COSTMAN.INTERIM CASCADE CONSTRAINTS;
    CREATE GLOBAL TEMPORARY TABLE COSTMAN.INTERIM
    ROW_ID ROWID
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    BEGIN
    INSERT INTO interim VALUES (:new.rowid);
    END;
    <h4>Trigger to update data on CM_RECIPE table </h4>
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3_AFTER"
    AFTER INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    BEGIN
    FOR ds IN (SELECT row_id FROM interim) LOOP
    UPDATE CM_RECIPE
    SET CR_RMC = (
    SELECT SUM(CRI_QTY * CRI_RM_COST)/SUM(CR_QUANTITY)
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = CR_BOM_CODE
    AND rowid = ds.row_id
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (
    SELECT CIFG_PACKING + CIFG_OVERHEAD +CIFG_OTHERS
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id
    ) + CR_RMC;
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN =
    (SELECT CIFG_DP_RATE
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id) - CR_TOTAL_COST) / CR_TOTAL_COST;
    END LOOP;
    END;
    /

    The scripts of the tables CM_ITEM_FG, CM_RECIPE, CM_RECIPE_ITEM are as follows :
    <h4>CM_ITEM_FG</h4>
    ALTER TABLE COSTMAN.CM_ITEM_FG
    DROP PRIMARY KEY CASCADE;
    DROP TABLE COSTMAN.CM_ITEM_FG CASCADE CONSTRAINTS;
    CREATE TABLE COSTMAN.CM_ITEM_FG
    CIFG_CODE VARCHAR2(13 BYTE) NOT NULL,
    CIFG_CCG_ID NUMBER NOT NULL,
    CIFG_NAME VARCHAR2(50 BYTE) NOT NULL,
    CIFG_PACKING NUMBER NOT NULL,
    CIFG_OVERHEAD NUMBER NOT NULL,
    CIFG_OTHERS NUMBER NOT NULL,
    CIFG_DP_RATE NUMBER NOT NULL,
    CIFG_CR_BY VARCHAR2(32 BYTE),
    CIFG_CR_ON DATE,
    CIFG_UPD_BY VARCHAR2(32 BYTE),
    CIFG_UPD_ON DATE
    TABLESPACE COST_MANAGER
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX COSTMAN.CM_ITEM_FG_PK_001 ON COSTMAN.CM_ITEM_FG
    (CIFG_CODE, CIFG_CCG_ID)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE UNIQUE INDEX COSTMAN.CM_ITEM_FG_UK_001 ON COSTMAN.CM_ITEM_FG
    (CIFG_CODE)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_ITEM_FG_T1"
    BEFORE UPDATE ON "CM_ITEM_FG"
    FOR EACH ROW
    BEGIN
    BEGIN
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (CR_RMC + :NEW.CIFG_PACKING + :NEW.CIFG_OVERHEAD + :NEW.CIFG_OTHERS);
    END;
    BEGIN
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN = (:NEW.CIFG_DP_RATE - CR_TOTAL_COST) / CR_TOTAL_COST;
    END;
    END;
    ALTER TABLE COSTMAN.CM_ITEM_FG ADD (
    CONSTRAINT CM_ITEM_FG_PK_001
    PRIMARY KEY
    (CIFG_CODE, CIFG_CCG_ID)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    CONSTRAINT CM_ITEM_FG_UK_001
    UNIQUE (CIFG_CODE)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    ALTER TABLE COSTMAN.CM_ITEM_FG ADD (
    CONSTRAINT CM_ITEM_FG_FK_001
    FOREIGN KEY (CIFG_CCG_ID)
    REFERENCES COSTMAN.CM_COST_GROUP (CCG_ID));
    <h4>CM_RECIPE</H4>
    ALTER TABLE COSTMAN.CM_RECIPE
    DROP PRIMARY KEY CASCADE;
    DROP TABLE COSTMAN.CM_RECIPE CASCADE CONSTRAINTS;
    CREATE TABLE COSTMAN.CM_RECIPE
    CR_ID NUMBER NOT NULL,
    CR_CCG_ID NUMBER,
    CR_EFF_FROM DATE,
    CR_CIFG_CODE VARCHAR2(10 BYTE) NOT NULL,
    CR_BOM_CODE VARCHAR2(50 BYTE),
    CR_QUANTITY NUMBER,
    CR_RMC NUMBER,
    CR_TOTAL_COST NUMBER,
    CR_GROSS_MARGIN NUMBER,
    CR_CR_BY VARCHAR2(32 BYTE),
    CR_CR_ON DATE,
    CR_UPD_BY VARCHAR2(32 BYTE),
    CR_UPD_ON DATE
    TABLESPACE COST_MANAGER
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_PK_001 ON COSTMAN.CM_RECIPE
    (CR_CCG_ID, CR_ID, CR_CIFG_CODE)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_UK_001 ON COSTMAN.CM_RECIPE
    (CR_ID)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_UK_002 ON COSTMAN.CM_RECIPE
    (CR_BOM_CODE)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_T1"
    BEFORE INSERT ON "CM_RECIPE"
    FOR EACH ROW
    DECLARE
    L_ID NUMBER;
    BEGIN
    IF INSERTING THEN
    IF :NEW.CR_ID IS NULL THEN
    --SELECT CM_RECIPE_SEQ.NEXTVAL INTO L_ID FROM DUAL;
    :NEW.CR_ID := CM_RECIPE_SEQ.NEXTVAL; --L_ID;
    END IF;
    :NEW.CR_CR_ON := SYSDATE;
    :NEW.CR_CR_BY := nvl(v('APP_USER'),USER);
    END IF;
    IF UPDATING THEN
    :NEW.CR_UPD_ON := SYSDATE;
    :NEW.CR_UPD_BY := nvl(v('APP_USER'),USER);
    END IF;
    END;
    ALTER TABLE COSTMAN.CM_RECIPE ADD (
    CHECK ("CR_EFF_FROM" IS NOT NULL) DISABLE,
    CHECK ("CR_CCG_ID" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CHECK ("CR_QUANTITY" IS NOT NULL) DISABLE,
    CONSTRAINT CM_RECIPE_PK_001
    PRIMARY KEY
    (CR_ID)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    CONSTRAINT CM_RECIPE_UK_002
    UNIQUE (CR_BOM_CODE)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    <h4>CM_RECIPE_ITEM</H4>
    ALTER TABLE COSTMAN.CM_RECIPE_ITEM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE COSTMAN.CM_RECIPE_ITEM CASCADE CONSTRAINTS;
    CREATE TABLE COSTMAN.CM_RECIPE_ITEM
    CRI_ID NUMBER NOT NULL,
    CRI_CR_ID NUMBER NOT NULL,
    CRI_BOM_CODE VARCHAR2(50 BYTE) NOT NULL,
    CRI_CIFG_CODE VARCHAR2(10 BYTE) NOT NULL,
    CRI_CIRM_CODE VARCHAR2(10 BYTE) NOT NULL,
    CRI_SEQ NUMBER,
    CRI_QTY NUMBER,
    CRI_RM_COST NUMBER,
    CRI_CR_BY VARCHAR2(32 BYTE),
    CRI_CR_ON DATE,
    CRI_UPD_BY VARCHAR2(32 BYTE),
    CRI_UPD_ON DATE
    TABLESPACE COST_MANAGER
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX COSTMAN.CM_RECIPE_ITEM_PK_001 ON COSTMAN.CM_RECIPE_ITEM
    (CRI_ID)
    LOGGING
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOPARALLEL;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T2"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    FOR EACH ROW
    BEGIN
    IF :NEW.CRI_CR_ID IS NULL THEN
    SELECT CR_ID INTO :NEW.CRI_CR_ID
    FROM CM_RECIPE
    WHERE CR_BOM_CODE = :NEW.CRI_BOM_CODE;
    END IF;
    END;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T1" BEFORE
    INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    DECLARE
    L_ID NUMBER;
    SEQ NUMBER;
    BEGIN
    IF INSERTING THEN
    IF :NEW.CRI_ID IS NULL THEN
    SELECT CM_RECIPE_ITEM_SEQ.NEXTVAL
    INTO :NEW.CRI_ID
    FROM dual;
    END IF;
    :NEW.CRI_CR_ON := SYSDATE;
    :NEW.CRI_CR_BY := NVL(v('APP_USER'),USER);
    SELECT (NVL(MAX(CRI_SEQ),0)+1)
    INTO SEQ
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = :NEW.CRI_BOM_CODE;
    :NEW.CRI_SEQ := SEQ;
    END IF;
    IF UPDATING THEN
    :NEW.CRI_UPD_ON := SYSDATE;
    :NEW.CRI_UPD_BY := NVL(v('APP_USER'),USER);
    END IF;
    END;
    ALTER TABLE COSTMAN.CM_RECIPE_ITEM ADD (
    CHECK ("CRI_RM_COST" IS NOT NULL) DISABLE,
    CHECK ("CRI_QTY" IS NOT NULL) DISABLE,
    CHECK ("CRI_SEQ" IS NOT NULL) DISABLE,
    CONSTRAINT CM_RECIPE_ITEM_PK_001
    PRIMARY KEY
    (CRI_ID)
    USING INDEX
    TABLESPACE COST_MANAGER
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    ALTER TABLE COSTMAN.CM_RECIPE_ITEM ADD (
    CONSTRAINT CM_RECIPE_FK_002
    FOREIGN KEY (CRI_CIRM_CODE)
    REFERENCES COSTMAN.CM_ITEM_RM (CIRM_CODE),
    CONSTRAINT CM_RECIPE_ITEM_FK_001
    FOREIGN KEY (CRI_CR_ID)
    REFERENCES COSTMAN.CM_RECIPE (CR_ID));
    Yogesh

  • Error while linking user defined table to user defined field using vb6.0

    Hi,
    I am creating a userdefined field on a SAPB1 table(PDN1) using vb 6.0
    I am trying to link this field to a user defined table.
    When i do that i get the following error:
    "The field 'Related table' should consist of 8 alphanumeric chracters with no valid or default values"
    When i try to do the same thing from SAPB1(not using code) there is no such problem.
    My vb code is as follows:
    Set oUserFieldsMD = oCmp.GetBusinessObject(oUserFields)
    oUserFieldsMD.TableName = "PDN1"
    oUserFieldsMD.Name = "OB_Locn"
    oUserFieldsMD.Description = "WH Location"
    oUserFieldsMD.Type = db_Alpha
    oUserFieldsMD.EditSize = 30
    lRetCode = oUserFieldsMD.Add
    If lRetCode <> 0 Then
        oCmp.GetLastError lErrCode, sErrMsg
        MsgBox sErrMsg
        GoTo Err_
    End If
    If Not oUserFieldsMD.GetByKey("PDN1", 0) Then
        MsgBox "Error"
        GoTo Err_
    End If
    oUserFieldsMD.LinkedTable = "OB_TEST"
    lRetCode = oUserFieldsMD.Update
    Your help will be much appreciated.
    Thanks.

    Great Sébastien!
    Looks like we could not survive here one day without your contribution
    Best regards,
    Frank
    PS: For readers of this thread who don't understand why
    EditSize
    must be "8":
    This is the size of the
    Code
    field in the user-defined table to which the new field OB_Locn (in the DB it will be U_OB_Locn) is linked to...
    So, it should be preferrably of the same size.

  • DI error when binding user defined table

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

  • Error while saving record "User:johndoe":     Error -14071

    I have added my augmented users from the AD server. When I select user and to apply a setting under Preferences I get this on attempting an "Apply", Error while saving record "User:johndoe":Error -14071. I'm authenticating to my LDAP not AD/All Domains.
    I have the server bound correctly to the AD server. Bound to AD, then promoted to OD master.
    Tried WGM from another Mac, same error.
    I recall my AD admin extending the ad schema last year for OS X 10.4.
    Thoughts? Thanks.

    Thanks David and Mabel, and all for the suggestions. I did go through "Leveraging Active..." prior to posting. I did try your method of canceling the authorization to WGM and viewing Directories. I would select a user from this method and try to apply something from MCX, but still got the -14070 error. Yes, I do have my client bound 1st OD, 2nd AD, with OD first on the search policy for the client.
    I though I had solved my issue by authenticating to WGM and LDAP. Then selecting Groups and the Members tab, I define an OD group and select that group. I can then click the "+" towards the right of the window. Then select my AD there which populates. I can add my AD groups or single users to my OD group. Then I'm able to apply MCX settings. But, no "blue" circle next to the group's silhouette. How is my method possibly incorrect?
    Also, at some point I unbound my client from AD and it seems the client is ok with getting AD info off my OD server. Example, my AD sharepoint mounts for PHD.
    But, I do have a pause of 20 secs. are more when logging into the client as well as accessing applications. Side effect of my method?

  • Error creating user defined tables: Ref count (-1120)

    Hi all !
    I have to create user defined tables per code, so I wrote <b>2 main functions</b>, first <i>to create a table</i> (with TableName,TableType and TableDescription properties)and  and <i>second to add fields</i> (to a certain table which is sent as parameter).
    I call these functions to create multiple tables. For the first 6 tables it works totally ok. But beginning from the 7th table it gives that "<b>Ref count for this object is higher then 0.</b> " (-1120) error. All parameters are ok just as the first 6 tables.
    Found such an explanation like below in help files.
    <i>The DI API allows only one instance of a meta data object at a time. This maintains data integrity by preventing any manipulation of a business object while modifying the object's user fields. Therefore, verify that no other DI object is active except the meta data object.</i>
    But why do I get such an error after sixth call of the function (but not beginning from the second table )?

    Gül,
    Have you tried doing some grbage collection?
    Search for a topic: "Add Usertables and Fields while having a recordset"
    HTH
    Juha

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • Problems adding new rows to a simple user defined table manually

    Hi
    I have just created a user defined table ( SAP 2007 SP01 PL9 ) but when I try to add a line using tools ->userdefined tables I get the following error -
    conversion failed when converting the nvarchar value '-3 @GLMAP to data type int ( CINF )
    The table is called GLMAP and I simply added 3 alpha fields
    I  put 1 into all the fields on screen
    Can anyone suggest anything please as ideally I would like the end user to be able to update this simple table
    Many thanks
    Regards Andy

    Andy
    I think in your case you have used  DBDataSource to display data from UDT on your form. 
    Easyier to use UDO than User Defined Table, because you do not have to programming at UDO based forms.
    What István tried to say:
    Check your sp_transactionnotification procedure, maybe you have used @object_type variable as integer instead of nvarchar
    Regards
    J

  • Getting an error while adding the user in Sharepoint foundation 2010 environment.

    Hi,
    I am having full control access to SharePoint site. Then i tried add user for that site.
    But i am getting following error while adding the user to the site.
    An unexpected error has occurred.
    Troubleshoot issues with microsoft SharePoint Foundation.
    Correlation ID:3035B777-1B7C-4463-B35E-06657B72C2E4
    Can you please help me anyone on this.
    Thanks,
    Ashok

    This could be any one of a number of things.  You need to lookup the Correlation ID in the ULS logs on the SharePoint server.  That should provide the additional information necessary to diagnose and solve the problem.  Here's a blog post
    on how to find the error.
    http://habaneroconsulting.com/Blog/Posts/Get_the_Real_SharePoint_Error_using_the_ULS_Logs.aspx#.UvEuffldWik 
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • How to fill the records from a User Define Table to PO item Grid

    Hi To all,
    I need to fill data from User Define table records into Purchase Order Item Grid.
    I created an UDF Filed in PO - Header Part - "PRS"(Filed Name)
    By using Formatted Search in itemcode column, i called a query,
    "Select itemcode, qty from (@user define tablename) where PRS = $http://OPOR.U_PRS"
    For eg:
    Output from querry
    ItemCode Qty
    ABC 1
    DEF 2
    DFG 7
    SDGD 9
    By using formatted search it is filling only first data in to itemcode column in PO Grid.
    Please help, how can i fill ALL the data in to my PO Grid?
    Thanks in Advance
    SAGAR

    The easisest way is to create datasource and the result bind to grid.
    Datasource:
               oDBDataSource = oForm.DataSources.DBDataSources.Add("@usertablename")
                Dim xoConditions As SAPbouiCOM.Conditions
                Dim xoCondition As SAPbouiCOM.Condition
                xoConditions = New SAPbouiCOM.Conditions
                xoCondition = xoConditions.Add
                xoCondition.BracketOpenNum = 1
                xoCondition.Alias = "u_zn"
                xoCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                xoCondition.CondVal = "cond"
                xoCondition.BracketCloseNum = 1
                oDBDataSource.Query(xoConditions)
    binding (example for matrix, in grid is simillar)
                oMatrix.Clear()
                Dim cols As SAPbouiCOM.Columns
                Dim column As SAPbouiCOM.Column
                cols = oMatrix.Columns
                column = cols.Item("colX")
                column.DataBind.SetBound(True, "@usertable", "u_x")
    oMatrix.LoadFromDataSource()
    hoep it helps
    Petr

  • Error while adding new record

    I have created an user defined table for storing city details.When I add record in it,it returns -4002 and the record is not saved.The code is as follows ,
    Private Sub AddCity()
            Dim objCity As SAPbobsCOM.UserTable
            Dim intCode As Integer
            Dim txtCity As SAPbouiCOM.EditText
            Dim lngStatus As Long
            Dim btnSave As SAPbouiCOM.Button
            Try
                objCity = objCompany.UserTables.Item("U_City")
                intCode = GetPK("[@U_City]", "New")
                txtCity = objForm.Items.Item("txtCity").Specific
                objCity.Code = intCode
                objCity.Name = intCode
                objCity.UserFields.Fields.Item("U_City_Code").Value = intCode
                objCity.UserFields.Fields.Item("U_City_Name").Value = txtCity.Value.Trim
                objCity.UserFields.Fields.Item("U_Active").Value = "Y"
                lngStatus = objCity.Add()
                If lngStatus = 0 Then
                    SBO_Application.StatusBar.SetText("Operation Completed Successfully", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                    btnSave = SBO_Application.Forms.ActiveForm.Items.Item("btnSave").Specific
                    btnSave.Caption = "OK"
                End If
            Catch ex As Exception
                SBO_Application.MessageBox("Tour Reporter:AddCity()=" & ex.Message)
            End Try
        End Sub
    The function GetPK returns primary key of the table.

    Hello
    It it is an UDO, not a UDT, you may use GeneralService to insert record into the table, ot build and UDO type form to get binded automatically.
    You may use a similar code to save an data to UDO table
    Dim oGeneralService As SAPbobsCOM.GeneralService
    Dim oGeneralData As SAPbobsCOM.GeneralData
    Dim oGeneralParams As SAPbobsCOM.GeneralDataParams
    Dim sCmp As SAPbobsCOM.CompanyService = oCompany.GetCompanyService
    oGeneralService = sCmp.GetGeneralService("U_City")
    oGeneralData = oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralData)
    SQL = "select AutoKey from ONNM where ObjectCode = 'U_City'"
    oRs.DoQuery(SQL)
    oGeneralData.SetProperty("Code", oRs.Fields.Item(0).Value.ToString())
    oGeneralData.SetProperty("U_COL1", COL1Data)
    oGeneralService.Add(oGeneralData)
    Return True
    This code inserts records into UDO master Data type object, called U_City
    You may clone the rows                 oGeneralData.SetProperty("U_COL1", COL1Data) and replace "U_COL1" with the UDF name inside, and "COL1Data" with the data of the field
    Edited by: János Nagy on Jun 23, 2011 12:16 PM - removed the matrix elements,

Maybe you are looking for

  • Mouseover in mouseover, but how

    Hello everybody, My brain loops!! I create a mouseover whith TweenMax, thats not the problem, but inside this symbol there is an element which also should work with mouseover TweenMax. But it does not work well. The symbol: //mouseover TweenMax.to(sy

  • JScrollpane and JPanel help

    i have a panel which is bigger than the main window's size. i want to add it onto the ScrollPane. but the scrollbar is not working. how do i refresh the scrollbar so that the scrollbar comes when the JPanel is attached onto it.

  • How to back up Address book in Mavericks

    Can anyone guide me to the filing location of my Contacts List

  • Trying to find the latest version of Premiere Pro CC for Mac.

    I have 7.2.2, but can't open a project from another Mac system because it was saved in a later version

  • Using garageband and an IO dock Footswitch

    I want to use garageband on my Ipad with an Alessis IO doc and a footswitch. But it doesnt look like it works, does anyone know if this is ever going to be added as a fix?