Error when creating Invoice via DI API

Can you help me, I have a problem about DI
When I create invoice with serial number and create transaction with 1 item in many serial number itu2019s no problem but
If i create transaction with 2 diffrent item with many serial number has error the error code -5002([inv1.docentry][line:0],u2019item serial us not found in whseu2026.u2019)
I using sap 2005 pl 40, I have debug my coding there is nothing wrong with it, than I suspec this is bug in DI is that rightu2026
This is my code
  Dim oInvoices As SAPbobsCOM.Documents
        Dim iRetVal As Integer = -1
        Dim sErrMsg As String = ""
        Dim isAddHeader As Boolean = True
        Dim iRow As Integer = 0
        Dim sWhsCode As String = ""
        Dim iAddedQty As Integer
        Dim iCurrLine As Double = 0
        Dim iBasedDoc As Integer = 0
        Dim sNewDocNum As String = ""
        Dim sCardCode As String = ""
        Dim isdocnum As String = ""
        Dim CompleteOrder As DataRow
        Try
            oInvoices = myCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            For iRow = 0 To myOrderDetailsTable.Rows.Count - 1
                Console.WriteLine(myOrderDetailsTable.Rows(iRow).Item(ISSCANNED_FIELD))
                If myOrderDetailsTable.Rows(iRow).Item(ISSCANNED_FIELD) = 1 Then
                    Console.WriteLine(myOrderDetailsTable.Rows(iRow))
                    CompleteOrder = myOrderDetailsTable.Rows(iRow)
                    Console.WriteLine(sWhsCode & "   " & CompleteOrder(WHSCODE_FIELD))
                    sWhsCode = CompleteOrder(WHSCODE_FIELD)
                    With oInvoices
                        If isAddHeader Then
                            isdocnum = CompleteOrder(DOCNUM_FIELD)
                            iBasedDoc = CompleteOrder(DOCENTRY_FIELD)
                            sCardCode = CompleteOrder(CARDCODE_FIELD)
                            '.DocObjectCode = SAPbobsCOM.BoObjectTypes.oInvoices
                            .Reference2 = CompleteOrder(DOCENTRY_FIELD)
                            .DocDate = Today.Date
                            .DocDueDate = Today.Date
                            .TaxDate = Today.Date
                            Console.WriteLine("cardcode : " & sCardCode)
                            .CardCode = sCardCode
                            Console.WriteLine("ibasedDoc :" & iBasedDoc)
                            .Reference1 = iBasedDoc
                            isAddHeader = False
                        ElseIf isAddHeader = False Then
                            ' .Lines.Delete()
                            .Lines.Add()
                        End If ' isAddHeader
                        iAddedQty = 0
                        iCurrLine = 0
                        Console.WriteLine("CompleteOrder(ITEMCODE_FIELD) : " & CompleteOrder(ITEMCODE_FIELD))
                        .Lines.ItemCode = CompleteOrder(ITEMCODE_FIELD)
                        Console.WriteLine(".Lines.WarehouseCode = CompleteOrder(WHSCODE_FIELD) : " & CompleteOrder(WHSCODE_FIELD))
                        .Lines.WarehouseCode = CompleteOrder(WHSCODE_FIELD)
                        Console.WriteLine("Lines.UnitPrice = CompleteOrder(PRICE_FIELD) " & CompleteOrder(PRICE_FIELD))
                        .Lines.UnitPrice = CompleteOrder(PRICE_FIELD)
                        Console.WriteLine("CompleteOrder(ISUSEBATCH_FIELD) : " & CompleteOrder(ISUSEBATCH_FIELD))
                        If CompleteOrder(ISUSEBATCH_FIELD) = 1 Then
                            For iCurrLine = 0 To CompleteOrder(QUANTITY_FIELD) - 1
                                If iCurrLine > 0 Then .Lines.BatchNumbers.Add()
                                .Lines.BatchNumbers.SetCurrentLine(iCurrLine)
                                .Lines.BatchNumbers.Quantity = 1
                                Console.WriteLine("CompleteOrder(SCANNED_FIELD) :" & CompleteOrder(SCANNED_FIELD))
                                .Lines.BatchNumbers.BatchNumber = CompleteOrder(SCANNED_FIELD)
                                '.Lines.BaseEntry = iBasedDoc
                            Next
                        ElseIf CompleteOrder(ISUSEBATCH_FIELD) = 0 Then
                            Console.WriteLine("CompleteOrder(WHSCODE_FIELD) :" & CompleteOrder(WHSCODE_FIELD))
                            While sWhsCode = CompleteOrder(WHSCODE_FIELD)
                                If iCurrLine > 0 Then .Lines.SerialNumbers.Add()
                                .Lines.SerialNumbers.SetCurrentLine(iCurrLine)
                                Console.WriteLine("CompleteOrder(SYSSERIAL_FIELD)" & CompleteOrder(SYSSERIAL_FIELD))
                                CompleteOrder(SYSSERIAL_FIELD) = IIf(IsDBNull(CompleteOrder(SYSSERIAL_FIELD)), 0, CompleteOrder(SYSSERIAL_FIELD))
                                .Lines.SerialNumbers.SystemSerialNumber = CompleteOrder(SYSSERIAL_FIELD)
                                Console.WriteLine("CompleteOrder(SCANNED_FIELD) :" & CompleteOrder(SCANNED_FIELD))
                                .Lines.SerialNumbers.InternalSerialNumber = CompleteOrder(SCANNED_FIELD)
                                ' .Lines.BaseEntry = iBasedDoc
                                iCurrLine = iCurrLine + 1
                                iRow = iRow + 1
                                If iRow <= myOrderDetailsTable.Rows.Count - 1 Then
                                    CompleteOrder = myOrderDetailsTable.Rows(iRow)
                                ElseIf iRow > myOrderDetailsTable.Rows.Count - 1 Then
                                    Exit While
                                End If
                            End While
                            iRow = iRow - 1
                        End If
                        .Lines.Quantity = iCurrLine
                    End With ' oInvoices
                End If ' CompleteOrder(ISSCANNED_FIELD) = 1
            Next iRow
            iRetVal = oInvoices.Add()
thnx for your attention

Hello tony,
Please check the following:
1.Make sure the item is managed by serials
2.The serials number have been auto created in GRPO/AP invoice etc puchase document
3.You need to set the system serial number for the lines. How do you know the system serial number of the serial number? refer to the Serial Number Details form
Inventory=>Item management=>Serials Numbers=>Serial Number Details
SystemSerialNumber Sets or returns the successive numerator starting from1 issued for each item with serial numbers management. This numerator progresses according to the creation of new units of the same sort (for the same item).
This property is mandatory when using Serial Numbers for outgoing documents. Field name: SysSerial.This is a foreign key to the SerialNumbers object
Sample code to add invoice with items managed by serials:
Private Sub btnSerials_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSerials.Click
        ConnectViaDI()
        Dim oInvoice As SAPbobsCOM.Documents = Nothing
        oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
        oInvoice.CardCode = "C001"
        oInvoice.DocDueDate = Date.Now
        Dim oLines As SAPbobsCOM.Document_Lines = oInvoice.Lines
        oLines.ItemCode = "S00002"
        oLines.UnitPrice = 1500
        oLines.Quantity = 2
        oLines.TaxCode = "CA"
        'Set the system serial no. for the 1st item
        oLines.SerialNumbers.SystemSerialNumber = 3
        'Set the system serial no. for the 2nd item
        oLines.SerialNumbers.Add()
        oLines.SerialNumbers.SystemSerialNumber = 4
        lRetCode = oInvoice.Add
        If 0 <> lRetCode Then
            oCompany.GetLastError(lErrCode, errMsg)
            MsgBox(errMsg)
        Else
            MsgBox("AR Invoice with serials number added.")
        End If
    End Sub
Kind Regards, yatsea

Similar Messages

  • Internal Error when adding Invoice from DI-API

    Hello All,
    I am trying to add an invoice using DI-API. I hv populated the object using XML and than adding it. Upon adding the error Internal Error (-10) is coming. I hv checked everything but am certainly missing something. Following is the XML of the invoice and the code to add it
    <?xml version="1.0" encoding="utf-16" ?>
    <BOM>
      <BO>
        <AdmInfo>
          <Object>13</Object>
          <Version>1</Version>
        </AdmInfo>
        <OINV>
          <row>
            <U_EntryId>1</U_EntryId>
            <DocType>I</DocType>
            <DocDate>20110923</DocDate>
            <DocDueDate>20111023</DocDueDate>
            <CardCode>JM0004</CardCode>
            <CardName>GAYAN BHARTI</CardName>
            <NumAtCard></NumAtCard>
            <DiscPrcnt>0.000000</DiscPrcnt>
            <DocTotal>755.000000</DocTotal>
            <Comments></Comments>
            <U_BranchTrans>1</U_BranchTrans>
            <SlpCode>-1</SlpCode>
            <IsICT>N</IsICT>
            <Series>40</Series>
            <TaxDate>20110923</TaxDate>
            <TrackNo></TrackNo>
            <SeqCode>0</SeqCode>
            <U_SlpName></U_SlpName>
            <U_WebCreated>N</U_WebCreated>
            <U_Territory></U_Territory>
            <U_InvType>C</U_InvType>
          </row>
        </OINV>
        <INV1>
          <row>
            <ItemCode>A003</ItemCode>
            <Dscription></Dscription>
            <Quantity>5.000000</Quantity>
            <DiscPrcnt>0.000000</DiscPrcnt>
            <WhsCode>JSP-FG</WhsCode>
            <PriceBefDi>11.000000</PriceBefDi>
            <TaxCode>NonTax</TaxCode>
            <U_WebCreated>N</U_WebCreated>
            <U_RetQty></U_RetQty>
            <U_SaleQty></U_SaleQty>
            <U_LineType>S</U_LineType>
          </row>
          <row>
            <ItemCode>A005</ItemCode>
            <Dscription>Ace Visual Dictonary 2</Dscription>
            <Quantity>10.000000</Quantity>
            <DiscPrcnt>0.000000</DiscPrcnt>
            <WhsCode>JSP-FG</WhsCode>
            <PriceBefDi>70.000000</PriceBefDi>
            <TaxCode>NonTax</TaxCode>
            <U_WebCreated>N</U_WebCreated>
            <U_RetQty></U_RetQty>
            <U_SaleQty></U_SaleQty>
            <U_LineType>S</U_LineType>
          </row>
        </INV1>
      </BO>
    </BOM>
    Program Code to add
                Dim oSapObject As SAPbobsCOM.Documents
                oCompany.XMLAsString = True
                oSapObject = oCompany.GetBusinessObjectFromXML(Body, 0)
                If oSapObject.Add <> 0 Then
                    Throw New Exception(oCompany.GetLastErrorDescription & " [" & oCompany.GetLastErrorCode & "]")
                End If
    Any help would be greatly appreciated. This is sort of urgent and needs to be done immediately.
    Regards,
    Rahul Jain
    PS: The error is coming on oSapObject.Add - it is able to read the invoice from XML, the error comes when trying to add it. All relevant values mentioned in XML are present in the database, and I am able to add an Invoice from the UI.
    Edited by: Rahul Jain on Sep 24, 2011 1:29 PM

    I realize this might not be to much help but everytime I have ever gotten an internal error code it has always turned out to be a SQL error. For instance there could be something in transaction notification that doesnt jive with your submission or something along those lines. Perhaps you could try a more simplified invoice as a test such as just send one item with a price and no UDFs .
    Sorry if that is not much help.

  • Error When Create Invoice related to Project

    Dear Friends,
    Good Day,
    I have been faced issue when i create Invoice related to project the following are the steps with the error :
    1. Entered the header.
    2.Entered the lines ( Line type, Amount, Distribute Account, and Fields that related to Projects...... etc).
    3. Save then Action > validate i have one holds, the hold name is Dist Variance then after i Click on the distributions line I have the following error :
    APP-SQLAP-97734: the system cant's generate distributions for 1 line because: Fatal Error:
    Error Stack: &ERROR_STACK
    Erro Stage: &ERROR_STAGE
    Error Message: &ERROR_MESSAGE
    Additional Information1: &ERROR_AGR1
    Additional Information2: &ERROR_AGR2
    Please Advice :)
    Best Regards,
    M.Qolaghassi

    Please see if these docs help.
    Projects Supplier Invoice Account Generation Error: APP-SQLAP-97734: The System Cannot Generate Distributions [ID 823787.1]
    APXINWKB.fmb APP-SQLAP-97734 When Entering a Recurring Invoice With Closed Project/Task [ID 779704.1]
    Grants Accounting: AP Invoice Workbench Drill Down to Distributions for Allocated Freight Gets APP-SQLAP-97734 Error [ID 845378.1]
    APP-SQLAP-97734: When Attempting To Generate A Distribution In A Project Related Invoice [ID 1251796.1]
    Overriding Project Supplier Invoice Account Generation Workflow CCID With User Entered Account [ID 360757.1]
    Project Supplier Invoice Account Generation Workflow - attribute 'fnd_flex_applid' does not exist [ID 1252887.1]
    Thanks,
    Hussein

  • Package Error when create package via Methods onTables

    Even though I am an APEX developer for 3 years, I just found out about Methods on Tables Utility in SQL Workshop from Dan McGhan's demo. I tried to create a package for about 7 tables in one package. When the package was created, it was invalid. I tried to compile it and it produced several errors. I noticed that the UPDATE table procedure was incomplete as it did not provide parameters even though the procedure uses them.
    I was able to replicate it in APEX.ORACLE.COM.
    WORKSPACE: RGWORK
    PACKAGE: CSRSR_DML
    USER : TESTER
    Password: test123
    Is this a bug? Is there a workaround? Did anyone else experience similar outcome?
    APEX 4.1
    Oracle 10g Rel 2
    Robert
    http://apexjscss.blogspot.com

    sect55 wrote:
    Come on APEX team and gurus, please help....As far as this "guru" is concerned, it's not something I'd ever use:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:672724700346558185
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:25405782527721
    Given Tom's well-known opposition to this approach, I was more than a little surprised when this appeared in APEX as he also appears to have close links to the APEX team. I'd really rather have seen development effort invested elsewhere.
    I'd definitely advocate building applications based on PL/SQL APIs, just not on table-centric, row-by-row ones...
    I tried to create a package for about 7 tables in one package.Why?
    One of the main purposes of packages is to modularize an application. Sticking methods for all of the entities in one package defeats this and makes development, testing and maintenance harder. If you must use the flawed TAPI concept, create a separate API for each table&mdash;at most only combine those where there exist mandatory dependencies, e.g. an <tt>order</tt> package with methods for <tt>orders</tt> and <tt>order_items</tt>.
    As to the immediate problem, it appears to be due to the lack of primary key definitions on some of your tables. This means the generator is unable to identify which columns to use as unique row identifiers.

  • Error when create user via OIM web

    Hi Gurus..
    I hava some problem when I creating new user via web OIM, error appear while inpute the start date value.
    Need help for you guys,
    This is the error code.
    <Error> <oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator> <BEA-000000> <ADF_FACES-60096:Server Exception during PPR, #5
    java.lang.NullPointerException
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.handleAccountEndDateValidation(UserManagerValidationUtils.java:237)
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.processDateValidations(UserManagerValidationUtils.java:589)
        at oracle.iam.identitytaskflow.utils.UserManagerValidationUtils.processDateValidation(UserManagerValidationUtils.java:543)
        at oracle.iam.identitytaskflow.common.components.UIInputDate$DateValueValueChangeListener.processValueChange(UIInputDate.java:135)
        at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:675)
        at org.apache.myfaces.trinidad.component.UIXEditableValue.broadcast(UIXEditableValue.java:210)
        at org.apache.myfaces.trinidad.component.UIXSelectInput.broadcast(UIXSelectInput.java:216)
        at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
        at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
        at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
        at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:357)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)

    probably yes but I am not so sure about that, I have checked the User.xml for make sure this but I can't found something wrong. any clue Shashank?
    Regards,
    -Rius-

  • Trying to create Invoice using the API,however i am not able to create the customer accounts in the front end

    when creating invoice using the API AR_INVOICE_AP_PUB.Create_Single_invoice Am Getting the below Error:
    Transaction type is invalid with current transaction date
    invalid transaction type
    either an inventory item description must be provided
    Kindly help me here

    Hi Team,
    I  tried creating the invoice and I got the above errors, however, when updated the batch source ID I am now getting this following error only, i am just left with the following Error only
    Either an inventory item or description must be provided.
    Please help me on this.

  • Error when Creating a ServiceClientFactory instance JAVA API

    When invoking Assembling a PDF document  quick start I'm having a compilation error when creating a ServiceClientFactory instance:
    //Create a ServiceClientFactory instance
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
    The error is: The type com.adobe.idp.Context cannot be resolved. It is indirectly referenced from required .class files
    All the required jars are a path.
    What esle can be a problem ?
    Thanks, Yan

    Since you are using SOAP, you need to have the AXIS jars available.  They are in the LiveCycle_ES_SDK\client-libs\thirdparty directory:
    activation.jar (required for SOAP mode)
    axis.jar (required for SOAP mode)
    commons-codec-1.3.jar (required for SOAP mode)
      commons-collections-3.1.jar  (required for SOAP mode)
    commons-discovery.jar (required for SOAP mode)
    commons-logging.jar (required for SOAP mode)
    dom3-xml-apis-2.5.0.jar (required for SOAP mode)
    jaxen-1.1-beta-9.jar (required for SOAP mode)
    jaxrpc.jar (required for SOAP mode)
    log4j.jar (required for SOAP mode)
    mail.jar (required for SOAP mode)
    saaj.jar (required for SOAP mode)
    wsdl4j.jar (required for SOAP mode)
    xalan.jar (required for SOAP mode)
    xbean.jar (required for SOAP mode)
    xercesImpl.jar (required for SOAP mode)

  • Encounter error message 61062 when create PR via ME51

    Dear Consultant,
    I encountered error message 61062 - "dd.01.2011 date comes after end of valid factory calendar. (Pls correct)" when create PR via transaction ME51. Although I have changed the Delivery date to "31.12.2010", system still issue error message. FYI, material that I used to create PR has planned delivery time = 185 days (pre-configured by our purchaser via Purchasing info.record) which is equivalent to dd.01.2011. Our factory calendar is configured valid up to Year 2010 and the new year (2011) will only be configured at end of December.
    If using transaction ME51N to create PR for the mentioned material above (with delivery date entered as 31.12.2010), there is no error message being issued by the system. May I know is there any solution to transaction ME51?
    Pls advise asap.
    Thanks & regards,
    LOI

    >
    LOI wrote:
    > May I know if there Is any effect for other modules like PP/PM on changing plant calender to 2011?
    yes, a positive effect, you will not receive error messages because of missing calender anymore.
    I have my calendars maintained until 2015
    ME51N only takes an info record into account when you do source determination, without source determination, the planned delivery time from material master is taken.

  • Error while creating new projects using api

    Hello,
    I am having error while creating projects using standard api, PA_PROJECT_PUB.CREATE_PROJECTS. The error I am having is as follow.
    Source template ID is invalid.
    ===
    My code is as follow:
    SET SERVEROUTPUT ON SIZE 1000000
    SET VERIFY OFF
    define no=&amg_number
    DECLARE
    -- Variables used to initialize the session
    l_user_id NUMBER;
    l_responsibility_id NUMBER;
    cursor get_key_members is
    select person_id, project_role_type, rownum
    from pa_project_players
    where project_id = 1;
    -- Counter variables
    a NUMBER := 0;
    m NUMBER := 0;
    -- Variables needed for API standard parameters
    l_commit VARCHAR2(1) := 'F';
    l_init_msg_list VARCHAR2(1) := 'T';
    l_api_version_number NUMBER :=1.0;
    l_return_status VARCHAR2(1);
    l_msg_count NUMBER;
    l_msg_data VARCHAR2(2000);
    -- Variables used specifically in error message retrieval
    l_encoded VARCHAR2(1) := 'F';
    l_data VARCHAR2(2000);
    l_msg_index NUMBER;
    l_msg_index_out NUMBER;
    -- Variables needed for Oracle Project specific parameters
    -- Input variables
    l_pm_product_code VARCHAR2(30);
    l_project_in pa_project_pub.project_in_rec_type;
    l_key_members pa_project_pub.project_role_tbl_type;
    l_class_categories pa_project_pub.class_category_tbl_type;
    l_tasks_in pa_project_pub.task_in_tbl_type;
    -- Record variables for loading table variables above
    l_key_member_rec pa_project_pub.project_role_rec_type;
    l_class_category_rec pa_project_pub.class_category_rec_type;
    l_task_rec pa_project_pub.task_in_rec_type;
    -- Output variables
    l_workflow_started VARCHAR2(100);
    l_project_out pa_project_pub.project_out_rec_type;
    l_tasks_out pa_project_pub.task_out_tbl_type;
    -- Exception to call messag handlers if API returns an error.
    API_ERROR EXCEPTION;
    BEGIN
    -- Initialize the session with my user id and Projects, Vision Serves (USA0
    -- responsibility:
    select user_id into l_user_id
    from fnd_user
    where user_name = 'SSHAH';
    select responsibility_id into l_responsibility_id
    from fnd_responsibility_tl
    where responsibility_name = 'Projects Implementation Superuser';
    pa_interface_utils_pub.set_global_info(
    p_api_version_number => l_api_version_number,
    p_responsibility_id => l_responsibility_id,
    p_user_id => l_user_id,
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => l_return_status);
    if l_return_status != 'S' then
    raise API_ERROR;
    end if;
    -- Provide values for input variables
    -- L_PM_PRODUCT_CODE: These are stored in pa_lookups and can be defined
    -- by the user. In this case we select a pre-defined one.
    select lookup_code into l_pm_product_code
    from pa_lookups
    where lookup_type = 'PM_PRODUCT_CODE'
    and meaning = 'Conversion';
    -- L_PROJECT_IN: We have to provide values for all required elements
    -- of this record (see p 5-13, 5-14 for the definition of the record).
    -- Customers will normally select this information from some external
    -- source
    l_project_in.pm_project_reference := 'AGL-AMG Project &no';
    l_project_in.project_name := 'AGL-AMG Project &no';
    l_project_in.created_from_project_id := 1;
    l_project_in.carrying_out_organization_id := 2864; /*Cons. West*/
    l_project_in.project_status_code := 'UNAPPROVED';
    l_project_in.start_date := '01-JAN-11';
    l_project_in.completion_date := '31-DEC-11';
    l_project_in.description := 'Trying Hard';
    l_project_in.project_relationship_code := 'Primary';
    -- L_KEY_MEMBERS: To load the key member table we load individual
    -- key member records and assign them to the key member table. In
    -- the example below I am selecting all of the key member setup
    -- from an existing project with 4 key members ('EE-Proj-01'):
    for km in get_key_members loop
    -- Get the next record and load into key members record:
    l_key_member_rec.person_id := km.person_id;
    l_key_member_rec.project_role_type := km.project_role_type;
    -- Assign this record to the table (array)
    l_key_members(km.rownum) := l_key_member_rec;
    end loop;
    -- L_CLASS_CATEGORIES: commented out below should fix the error we get
    -- because the template does not have an assigment for the mandatory class
    -- 'BAS Test'
    l_class_category_rec.class_category := 'Product';
    l_class_category_rec.class_code := 'Non-classified';
    -- Assign the record to the table (array)
    l_class_categories(1) := l_class_category_rec;
    -- L_TASKS_IN: We will load in a single task and a subtask providing only
    -- the basic fields (see pp. 5-16,5-17,5-18 for the definition of
    -- the task record)
    l_task_rec.pm_task_reference := '1';
    l_task_rec.pa_task_number := '1';
    l_task_rec.task_name := 'Construction';
    l_task_rec.pm_parent_task_reference := '' ;
    l_task_rec.task_description := 'Plant function';
    -- Assign the top task to the table.
    l_taskS_in(1) := l_task_rec;
    -- Assign values for the sub task
    l_task_rec.pm_task_reference := '1.1';
    l_task_rec.pa_task_number := '1.1';
    l_task_rec.task_name := 'Brick laying';
    l_task_rec.pm_parent_task_reference := '1' ;
    l_task_rec.task_description := 'Plant building';
    -- Assign the subtask to the task table.
    l_tasks_in(2) := l_task_rec;
    -- All inputs are assigned, so call the API:
    pa_project_pub.create_project
    (p_api_version_number => l_api_version_number,
    p_commit => l_commit,
    p_init_msg_list => l_init_msg_list,
    p_msg_count => l_msg_count,
    p_msg_data => l_msg_data,
    p_return_status => l_return_status,
    p_workflow_started => l_workflow_started,
    p_pm_product_code => l_pm_product_code,
    p_project_in => l_project_in,
    p_project_out => l_project_out,
    p_key_members => l_key_members,
    p_class_categories => l_class_categories,
    p_tasks_in => l_tasks_in,
    p_tasks_out => l_tasks_out);
    -- Check the return status, if it is not success, then raise message handling
    -- exception.
    IF l_return_status != 'S' THEN
    dbms_output.put_line('Msg_count: '||to_char(l_msg_count));
    dbms_output.put_line('Error: ret status: '||l_return_status);
    RAISE API_ERROR;
    END IF;
    -- perform manual commit since p_commit was set to False.
    COMMIT;
    --HANDLE EXCEPTIONS
    EXCEPTION
    WHEN API_ERROR THEN
    FOR i IN 1..l_msg_count LOOP
    pa_interface_utils_pub.get_messages(
    p_msg_count => l_msg_count,
    p_encoded => l_encoded,
    p_msg_index => i,
    p_msg_data => l_msg_data,
    p_data => l_data,
    p_msg_index_out => l_msg_index_out);
    dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
    END LOOP;
    rollback;
    WHEN OTHERS THEN
    dbms_output.put_line('Error: '||sqlerrm);
    FOR i IN 1..l_msg_count LOOP
    pa_interface_utils_pub.get_messages(
    p_msg_count => l_msg_count,
    p_encoded => l_encoded,
    p_msg_index => i,
    p_msg_data => l_msg_data,
    p_data => l_data,
    p_msg_index_out => l_msg_index_out);
    dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
    END LOOP;
    rollback;
    END;
    ===
    Msg_count: 1
    Error: ret status: E
    ERROR: 1: Project: 'AGL-AMG Project 1123'
    Source template ID is invalid.
    PL/SQL procedure successfully completed.

    I was using a custom Application, which had a id other then 275 (which belongs to Oracle projects)

  • Budget exceeded BP604 (when create Invoice)

    Hi All,
    User got an error message budget exceeded BP604 when create invoice. How can i know what the configuration to check why system check budget( Investment management). I tried to check the configuration in SPRO (Define tolerance limit for availability control) shows that budget profile use ++ which are : (no invoice checking) but in actual it checks budget.
    ++     All activity groups           
    00     Purchase requisition          
    01     Purchase order                
    02     Orders for project            
    03     Goods issue                   
    04     Financial accounting document 
    05     CO document                   
    06     Budgeting                     
    07     Funds reservation             
    08     Fixed prices in project       
    09     Payroll                       
    Many thanks in advance.
    Nies

    Business transaction group 04 (Financial accounting document) contains below transactions:
    G/L account posting
    FI invoice parking
    Invoice verification
    Goods receipt for the order
    Cash budget management
    Payment transfer
    Down payment posting
    Inventory difference
    Regards
    Sreenivas

  • Error when creating Delivery

    Hi experts,
         I've received an error when creating Delivery from AR Reserve Invoice :
    [Delivery - Rows - Warehouse Code][line: 0] , 'No matching records found  '' (CRD1) (ODBC -2028)'  [Message 131-183]
    Don't know what is this, but some of the transaction in Delivery from AR Reserve invoice I mean no error.
    Regards,

    HI,
    Pl. check the links of BP Master.
    Set Bill to and ship to address manually for the Business Partner and set the new address as default .
    Also check the settings of Items Default warehouse Etc.
    Hope Helpful!!!

  • Error when creating billing / accounting document with VF01

    Hi All,
    When I use VF01 to create an invoice with reference to a LF D/N, I got the following error after saving.
    "An exchange rate type is not defined for country CN
    Message no. FF 802". And billing document is created but with no accounting document.
    I checked the exchange rate type is defined. but I can not find the place where I can assign to the specific country.
    Best Regards
    Jean

    Thanks for your help.
    Hi Dave,
    I checked in S_BCE_68000174, it has been already assigned.
    Hi Ferry,
    In FTXP, the tax code has been maintained.
    And you are right, when I maintain the field KURST in table T005, it is ok. But I am confused in 4.6C, the field KURST can be maintained by T-code OY01, but in 470, exchange rate type cannot be found in OY01. Where can I set in 470?  And why in 470, even field KURST is empty in table T005, but there is no such error when creating billing document?
    Many Thanks
    Jean

  • Error when creating index with parallel option on very large table

    I am getting a
    "7:15:52 AM ORA-00600: internal error code, arguments: [kxfqupp_bad_cvl], [7940], [6], [0], [], [], [], []"
    error when creating an index with parallel option. Which is strange because this has not been a problem until now. We just hit 60 million rows in a 45 column table, and I wonder if we've hit a bug.
    Version 10.2.0.4
    O/S Linux
    As a test I removed the parallel option and several of the indexes were created with no problem, but many still threw the same error... Strange. Do I need a patch update of some kind?

    This is most certainly a bug.
    From metalink it looks like bug 4695511 - fixed in 10.2.0.4.1

  • Vehicle Scheduling Error:Error when creating transport structures in live C

    HI Gurus,
    We have one background job defined for Vehicle scheduling, which shows completed successfully but in log it says that :
    : Error when creating transport structures in liveCache and Not possible to schedule shipment in the planning horizon.
    My planning horizon is for 90 days from current date and demand horizon is for 30 days.
    I have checked the VS profile and i dont find any problem with profile.
    Can you please help me in finding what exaclty went wrong
    Thanks,
    AMol

    Try This..
    1. Open the crystal client on your local machine and import that particular report.
    2. Do Database -> Verify Database. Then refresh the report on your PC and make sure that it returns data as expected.
    3. Export it back to repository and try scheduling it again. You can verify through CMC for Crystal Reports under " Database Configuration" property to make sure it points to the right ODBC.
    Let us know.

  • Error when creating a folder ,iviews in the portal

    Dear sap gurus ,
    I m facing a error when  creating a   Folder or an iview in my portal i'm using EP 7.0 sp11 ,The error is :
    Portal Runtime Error
    An exception occurred while processing a request for :
    <b>iView : pcd:portal_content/com.sap.pct/admin.templates/iviews/editors/com.sap.portal.defaultFolderWizard
    Component Name : com.sap.portal.admin.defaultwizards.DefaultFolderWizard
    SQLException is not transient, error code = 1654, sql state = 72000 Batch rolled back. Caused by java.sql.BatchUpdateException: ORA-01654: unable to extend index SAPSR3DB.SYS_C004057 by 128 in tablespace PSAPSR3DB at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343) at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10698) at com.sap.sql.jdbc.basic.BasicPreparedStatement.executeBatch(BasicPreparedStatement.java:263) at com.sap.sql.jdbc.oracle.Oracle10gPreparedStatement.executeBatch(Oracle10gPreparedStatement.java:100) at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeBatch(DirectPreparedStatement.java:1129) at com.sap.sql.jdbc.common.CommonPreparedStatement.executeBatch(CommonPreparedStatement.java:991) at com.sap.engine.services.dbpool.wrappers.StatementWrapper.executeBatch(StatementWrapper.java:270) at com.sapportals.portal.pcd.pl.AttributeHeadersTable.insert(AttributeHeadersTable.java:259) at com.sapportals.portal.pcd.pl.PlObject.save(PlObject.java:518) at com.sapportals.portal.pcd.pl.PlContext.createSubcontext(PlContext.java:544) at com.sapportals.portal.pcd.gl.xfs.XfsContext.createChildOnPersistence(XfsContext.java:1374) at com.sapportals.portal.pcd.gl.xfs.XfsContext.createChildAndNotify(XfsContext.java:1128) at com.sapportals.portal.pcd.gl.xfs.XfsContext.createChild(XfsContext.java:1087) at com.sapportals.portal.pcd.gl.xfs.XfsContext.createSubcontext(XfsContext.java:843) at com.sapportals.portal.pcd.gl.xfs.BasicContext.createBasicSubcontext(BasicContext.java:190) at com.sapportals.portal.pcd.gl.PcdPersContext.createSubcontext(PcdPersContext.java:191) at com.sapportals.portal.pcd.gl.PcdFilterContext.filterCreateSubcontext(PcdFilterContext.java:254) at com.sapportals.portal.pcd.gl.PcdProxyContext.createSubcontext(PcdProxyContext.java:147) at com.sapportals.portal.pcd.gl.PcdGlContext.createSubcontext(PcdGlContext.java:440) at com.sapportals.portal.pcd.gl.PcdProxyContext.createSubcontext(PcdProxyContext.java:624) at com.sapportals.portal.pcd.gl.PcdProxyContext.createSubcontext(PcdProxyContext.java:619) at com.sap.portal.admin.wizard.folderwizardpanes.SavePane.doAfterSubmit(SavePane.java:59) at com.sapportals.admin.wizardframework.core.WizardInstance.doPost(WizardInstance.java:356) at com.sapportals.admin.wizardframework.core.WizardInstance.doWizard(WizardInstance.java:174) at com.sapportals.admin.wizardframework.core.WizardInstance.doWizard(WizardInstance.java:99) at com.sapportals.admin.wizardframework.AbstractDynamicWizard.doContent(AbstractDynamicWizard.java:98) at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209) at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215) at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753) at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240) at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522) at java.security.AccessController.doPrivileged(Native Method) at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) .
    Exception id: 10:50_23/11/07_0005_16892850
    See the details for the exception ID in the log file</b>
    Thanks and Regards,
    sathya

    Hi Sathya
    The following line in your log tells you what is wrong:
    ORA-01654: unable to extend index SAPSR3DB.SYS_C004057 by 128 in tablespace PSAPSR3DB
    This is a configuration that you or the dba people need to do. The first thing I would check is if autoextend is on/off on your tablespace PSAPSR3DB. If it's 'off' you either need to put it to 'on' or manually extend the size of your tablespace depending on how much harddrvive space you have to play with. Here is a more detailed solution on how to do it:
    Oracle Error : ORA-01654: unable to extend index string.string by string in tablespace string
    Cause: Failed to allocate an extent of the required number of blocks for an index segment in the tablespace indicated.
    Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to the tablespace indicated.
    Br
    Göran

Maybe you are looking for

  • How to update my ipod 3 to iOS5?

    Hello everyone. How can i do this update? My iTunes do not show the update of iOS... My iTunes is updated. I'm from Brazil, so, sorry by the english.

  • Sounds disappears from project

    After importing a project from iDVD to DVD Studio Pro, the sound disappears after around 30 seconds of playback. Any tips or advice would be welcome, thank you Eoin

  • Payment processing from PaySafe

    Hi, i've purchase about 2-3 days ago 10 euro from paysafe. The first time worked, But this time.... In my skype contact i have 5 same warnings that they say : We're processing your order. The money they have been transferred form paysafe to skype tha

  • How can I buy music from itunes germany?

    I want to buy music from iTunes Germany but I don't have a German credit card. How can I do this? There is a lot of music from one of my favorite artists (Enigma) that is in ITMS Germany but not in ITMS USA.

  • Printing wirelessly with Airport Express to HP psc1350 suddenly stopped

    I have an imac G5 running OS X 10.3.9. I am wirelessly connected to a router (D-Link 624) to run the internet and am also wirelessly connected to an airport express to print to my HP psc 1350. I set all this up myself and it was running without any p