Internal Error -2038 Invoice Creation

¡Hi! Help!
I explain my problem
I've created a vb.net 2005 application. Through DI API (SBO 2005 SP 01, patch level 20).
This application, windows forms run, it opens an SBO conection and  starts a timer. Every 5 secconds the timer ticks, it
searches for custom xml files containing info needed to create/update Invoices, or Sales Orders. Whenever I find files to
process, the timer stops, documents are processed one after another and then timer continue ticking. I use one Company and
one conection open since the moment the program starts and it remains opened the whole day.
There are two servers. SAP Server, and there's another server (in this server runs my application, here I have just my app
and DI API so it connects to SAP Server) both on same Domain.
Database size is 50 GB, and it grows about 90 - 100 MB every day
The amount of invoices created is about 500/600 daily.
Problem is many times invoices creation are unsuccesfull due to one of the following errors:
OINV.Series , 'Internal error (-2038) occurred'  or just OINV.Series , 'Internal error (-2038) occurred'
this makes more difficult to figure out the reason why this happen and moreover how to solve it, because as some or many of
you may know, internal error is not much explict and the causes for this error are very different.
Now, I'm certain Invoice series are OK because the same Invoice creation that fails in one moment, simply is succesfully
created after 2, 3 or even 5 or 6 tries!.
Errors increase a lot at evening, when intensive use of SBO database is taking place. However these errors use to happen
even  at morning when few Invoices are created, I mean, not necessarily happen at intensive use.
Invoices are not that large. The biggest are about 10 - 12 lines.
This situation is frustrating both for my customer and myself
Has anyone experienced something similar? is this something about sbo db performance? does anyone knows if there's some kind
of document about Internal error?

Hi Marcel,
I think the first thing I'd check is for deadlocks on the database. Earlier patches of SBO 2005A SP1 are known to have issues in this area (see SAP note 1113543 for an example). It would certainly fit the symptoms you are getting (ie the same document can be created without errors at a different time).
Kind Regards,
Owen

Similar Messages

  • Facing error while invoice creation in AR.

    Facing error while invoice creation in AR as Please complete your tax accounting flexfield. We are creating invoice through API.
    Regards
    Sridhar

    Hi,
    Please go through the below Note ID.
    Autoinvoice Error On Tax Codes - Please Complete Your Tax Accounting Flexfield [ID 1469285.1]
    Regards,
    Raju.

  • -2038 - Internal error (-2038) occurred : on 19/05/2011 10:04:34

    Usind DI API for SAP 8.8 PL20
    There's no entry in the Event Viewer obviously it's something wrong in SAP.
    How can I know what's the problem ?
    The application that is using DI API, is performing it's job every minute of every day without any trouble until 2 or 2 times a day, it crashes like this.
    I would like to know how I can debug, profile or anything I could do to know what's the source of the problem.
    Thank you for any hints.

    The error Internal error (-2038) is usually related to database deadlocks, as explained in a few notes on the portal:
    1414834 - DI_Error -2038 when update orders with multiple users
    1231885 - DI_Error when two programs try to access the same object
    1113543 - DI_Database deadlocks when maintaining JE concurrently
    1489753 - Deadlock while adding Marketing Documents simultaneously
    etc. - I got 11 notes relating the B1 with that error when I searched on service.sap.com/notes
    So most likely it is due to either your application is accessing the same object as a user at the same time, or something is happening with transaction if you are suing it.
    To actually monitor what is happening, two options:
    1. SQL profiler - run the profiler for the day and then use the timestamp in your log to check the sql profile and see what was happening
    2. Use the B1 Test Tools available on the SDN, which include a .NET profiler and a DB Proifler that you can use to analyze whats going on. (http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/cbb70163-0c01-0010-9b8c-f6ee72de7328 [original link is broken])
    But before using your time up with those tools, see is there something you can do to prevent the deadlock - or check are you using a version of B1 that has a bug that was fixed in a later version. (explained in the notes)

  • [ODLN.Series] , 'Internal error (-2038) occurred'

    Dear experts,
    I have the following error "[ODLN.Series] , 'Internal error (-2038) occurred'" that occurs from time to time when I try to add a delivery based on a sales order with the DI API.
    has any body else ever had the same error before ?
    in the help the code number 2038 means a Data Source - Record Lock
    I added a code that adds the delivery onther time each time this error occurs
    what can i do to solve this issue ?
    Best Regards
    Abderrahim,

    Dear Vieira ,
    thank you for your respone
    I don't think i can catch an inner exeception it's an error that I catch by the  oCompany.GetLastError(ierr, serr) ,how can i get more details of the 2038 error?
    just one remark the deliveries are created very well,I think the errors occurs when there a lot of deliveries to create
    this the code that adds de Delivery
    Dim DocEntry As Integer
            Dim iPickID As Integer
            DocEntry = GetOrderEntry(H_So.order_no)
            iPickID = H_So.order_no.Substring(9, 6)
            Dim bGetOrder As Boolean = oOrder.GetByKey(DocEntry)
            oBP.GetByKey(oOrder.CardCode)
            oDelivery.CardCode = oOrder.CardCode
            oDelivery.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO
            oDelivery.ImportFileNum = oOrder.ImportFileNum
             'Add lines into Delivery
             Dim bIsFirstLine As Boolean = True
            Dim iQtyConfirmed As Integer = 0
            For Each L_So As L_Conf_NYK In L_SoArray
                iQtyConfirmed += L_So.pkd_qty
                If bIsFirstLine = False Then
                    oDelivery.Lines.Add()
                Else
                    bIsFirstLine = False
                End If
                Dim VisOrder As Integer = Me.GetVisOrderLine(oOrder, CInt(L_So.line_no))
                oOrder.Lines.SetCurrentLine(VisOrder)
                Dim ItemCode As String = GetItemCode(L_So.product_no)
                Dim oPLQuantity As Integer = GetPLQuantity(oOrder)
                oDelivery.Lines.BaseEntry = oOrder.DocEntry
                oDelivery.Lines.ItemCode = ItemCode
                oDelivery.Lines.BaseLine = CInt(L_So.line_no)
                oDelivery.Lines.BaseType = 17
                oDelivery.Lines.Quantity = CDbl(L_So.pkd_qty)
            Next
            'Set expenses to the Delivrey
            Dim bIsFirstLoop As Boolean = True
            Dim i As Integer = 0
            Dim TotalFreightOnOrder As Double = 0
            While i < oOrder.Expenses.Count
                oOrder.Expenses.SetCurrentLine(i)
                TotalFreightOnOrder += oOrder.Expenses.LineTotal
                i += 1
            End While
            i = 0
            If TotalFreightOnOrder > 0 And iQtyConfirmed > 0 Then
                Do
                    If bIsFirstLoop = True Then
                        bIsFirstLoop = False
                    Else
                        oDelivery.Expenses.Add()
                    End If
                    oOrder.Expenses.SetCurrentLine(i)
                    oDelivery.Expenses.ExpenseCode = oOrder.Expenses.ExpenseCode
                    If oOrder.Expenses.LineTotalFC = 0 Then
                        oDelivery.Expenses.LineTotal = oOrder.Expenses.LineTotal
                    Else
                        oDelivery.Expenses.LineTotal = oOrder.Expenses.LineTotalFC
                    End If
                    oDelivery.Expenses.TaxCode = oOrder.Expenses.TaxCode
                    oDelivery.Expenses.BaseDocEntry = oOrder.DocEntry
                    oDelivery.Expenses.BaseDocLine = oOrder.Expenses.LineNum
                    oDelivery.Expenses.BaseDocType = oOrder.DocObjectCode
                    i += 1
                Loop While i < oOrder.Expenses.Count
            End If
            Threading.Thread.Sleep(1000)
            Dim iAddition As Integer = 0
            Dim ierr As Integer
            'i try to create a delivery each time the error 5002 and 2038 errors occurs
            Do
                ierr = oDelivery.Add
                If ierr <> 0 Then
                    ErrFlag = False
                   Threading.Thread.Sleep(1000)
                    iAddition += 1
                End If
            Loop While (Math.Abs(ierr) = 5002 Or Math.Abs(ierr) = 2038) And iAddition <= 5
             If ierr <> 0 Then
                ErrFlag = False
                Dim serr As String = ""
                oCompany.GetLastError(ierr, serr)
                Throw New Exception(serr & ". Delivery for order number " & oOrder.DocNum & " in the pick list number " & iPickID & " cannot be created.")
            End If
    Best regards
    Abderrahim
    Edited by: Boukhris Abderrahim on Mar 13, 2009 1:24 PM

  • Vendor Text / Internal notes during Invoice creation

    Hello,
    We can create user ID for a Vendor contact using "Employee for Business partner" under "Manage Business partner" option.
    With this user ID, while trying to create an Invoice, Vendor text / Internal notes drop down does not appear under "Document tab" at item level. We only see one option "Comments from Vendor".
    But during invoice creation by a regular user , we see the drop down for "Vendor Text / Internal notes". We dont see the option "Comments from Vendor"
    Question : Is it possible to have the "Vendor Notes / Internal notes" drop down made available for Vendor Contacts just like reuglar users?
    FYI - We are using Standalone scenairo.
    Thanks for your reply in advance.
    Regards,
    UM.

    Hi Jon,
    Like said Yann, try to use BBP_DOC_CHECK badi.
    In this badi You can use FM BBP_PD_SC_GETDETAIL.
    Example:
      call function 'BBP_PD_SC_GETDETAIL'
        exporting
          i_guid     = iv_doc_guid
        importing
          e_header   = wa_e_header
        tables
          e_item     = e_item
          e_account  = e_account
          e_longtext = e_longtext
          e_messages = e_messages.
    This FM show You all longtext attached in document.
    Regards,
    Marcin Gajewski

  • Error in Invoice creation in MIRO

    Hello,
    Version 4.6 C
    During invoice creation in MIRO, the following error message occurs :
    " Item: 000001 PO Commitment Item 2CO0703800 Invoice Commitment Item.
    Message No FICUSTOM 068".
    For the message class FICUSTOM 068 in 4.6c the description is "PO Commitment item && Invoice Commitment item"
    we have also checked the PO.there is a sufficient balance in the PO Quantity for this invoice.
    Pls advise.
    Regards
    Prasad M

    Hi Prasad,
    Message FICUSTOM068 was created by the SAP note 567119. Please kindly check this note in the service market place.
    ========================
    As per note 567119:
    068 For Transfer please select both processes RECV and SEND
    Long Text for message 68:
    Diagnosis
    When selecting only SEND (sender side of the transfer process) or RECV
    (receiver side of the transfer process) and not both it could lead to
    inconsistencies in the Database.A  document to transfer the budget could
    be partially deleted.
    System response
    The transaction stops. A pop-up is displayed.
    Procedure
    Please select both SEND and RECV.
    =================
    The strange thing is that this note is only available as of 4.7 release and you are on 4.6. There is no another standard note regarding this error message. Therefore as the text of the error that you are receiving in your system is different from the one provided in the note, it seems to be that it is an own development.
    Did you try to do a watchpoint or checking in the program code (SE38) where this message is changed to this content or where this message is issued? It will give a good direction to understand why this error is issued.
    I hope it helps
    Best Regards,
    Vanessa Barth.

  • Error in invoice creation using BAPI BAPI_INCOMINGINVOICE_CREATE

    Hi All,
    I am using BAPI_INCOMINGINVOICE_CREATE to create an invoice using below data,
    wa_header-invoice_ind = 'X'.
    wa_header-doc_date = sy-datum.   "Enter the document date
    wa_header-pstng_date = sy-datum. "Enter the posting date
    wa_header-ref_doc_no = 'Test'.
    wa_header-comp_code = 'L110'.
    wa_header-gross_amount = '528.2400'.  "Enter the gross amount(aft. tax) for the invoice
    wa_header-calc_tax_ind = 'X'.
    wa_header-currency = 'USD'.
    wa_item-invoice_doc_item = '000001'.
    wa_item-po_number = '4600013733'.    "Enter the PO number
    wa_item-po_item = '00010'.           "Enter the PO item number
    wa_item-tax_code = 'I1'.             "Enter the tax code applicable
    wa_item-item_amount = '528.2400'.     "Enter the item amount
    wa_item-quantity = '1'.           "Enter the invoice quantity
    wa_item-po_unit = 'PC'.              "Enter the UoM
    APPEND wa_item TO it_item.
    when i call the BAPI its giving me an error
    Enter a tax code in item 000001
    so  when i entered a data in  TAXDATA  table of BAPI again it throw an error,
    Enter value in either field HEADERDATA-CALC_TAX_IND or field TAX_AMOUNT (import parameter TAXDATA).
    As per my requirement we wanted to set CALC_TAX_IND .
    Kindly suggest me.
    Thanks and regards,

    Dear Reddy
    My excel contain date format 'YYYYMMDD'
    But the server in i am uploading data having date format 'DDMMYYYY'.
    bapi also having date format YYYYMMDD.
    BUT in TCODE AS91 HAVING DATE IN DDMMYYYY FORMAT.
    Due to this format it is giving error.

  • Error while invoice creation through VF01

    Hey while saving a invoice through VF01....... following  syntax error is coming:
    The disctinary structure or table k9rprd6000003 is either not active or does not exist. Request to help me to solve the problem

    Hi
    Kindly check in the program RV60AFZZ that you have written some code by taking the data form table which is not exist
    If you can give me the correct error message no. help you more
    Regards
    Damu

  • To many errors creating invoices.

    Hi,
    I made a scenario that writes an invoice as soon as a delivery is made.
    This worked fine while testing.
    But now in production the deliveries are made by the pick and pack manager.
    now about 20% go into failure.
    messages are:
    Exception : DI Error: (-2028) Customer record not found
    Exception : DI Error: (-2038) Record locked by another transaction
    Exception : DI Error: (-2028) Internal error (-2038) occured
    It looks like timing problems.
    Is there a way to retry the scenario again automatically?
    Like you can do manualy.
    Thanks,
    John

    Hello John,
    How are you, hope you're doing well!
    Depending on the way you config B1i and the step, this could be reprocessed automatic by b1i. Check Maintenance - cg Error Handling.
    How did you set up the step? Try to avoid to get an object and write to an (other) object in the same step. You must split this step and bind them with a queue.
    Good luck.
    Best Regards Teun

  • Internal error (3006) occurred

    We have formatted searches on user-defined fields
    When I run the query associated with that formatted search from the menu, it runs just fine:
    But when I run the formatted search from within the form (single mouse click on litte magnifying glass icon), I get an u2018internal erroru2019(3006) occurred.
    What can be the reason and how can we solve it.

    HI
    Check this link:
    -2038 - Internal error (-2038) occurred : on 19/05/2011 10:04:34
    and also check the sap notes in it...
    Hope this will help you..

  • Excise Invoice creation error -Billing document does not exists

    Dear Experts,
    I have created supplementary sales order, billing with refernece through sales order by VF01.
    Now I want to create Excise Invoice but system gives error Billing Document does not exists
    I have checked billing document in VBRK table & it is showing in table.
    My item categroy is L2N -and set it to C
    I have assigned Billing type under Outgoing excise invoice ->Assign billing type to delivery type still my excise invoice is not generating.
    Pl. guide me.
    Thanks
    Trupti

    Resolved my problem.
    Actually in Billing item categroy if you put SD Doc. Catg. as M you can do excise invoice even if you have not created the
    outbound delivery.
    So cycle will be Supplementary Sales Order->VF01 with ref. to SO->J1IIN -Excise invoice creation.
    Thanks to all.
    Trupti.

  • I am trying to open my HP photo creations and I get a message that says Launcher: internal error 1

    I am trying to open my HP Photo Creations, I am getting a pop up that says Launcher: Internal Error 1  How can I fixt this?

    Hi plosko.
    Please try uninstalling and then reinstalling the software. (You can download it at hp.com/go/hppc.)
    If it still doesn't launch, try restarting your computer. Our customer support team would be happy to help. You can reach them at [email protected]
    Thank you!
    RocketLife
    RocketLife, developer of HP Photo Creations
    » Visit the HP Photo Creations Facebook page — news, tips, and inspiration
    » See the HP Photo Creations video tours — cool tips in under 2 minutes
    » Contact Customer Support — get answers from the experts

  • Internal error Occoured while posting A/P Invoice

    Hi Experts,
                         While posting A/P Invoice. I am getting the following error message and I am unable to add the document.
    "Internal Error (512) Occoured [Message 131-183]
    Please do the needfull.
    Thanks & Regards,
    Srikanth.

    Hi......
    Please drop all the FMS and SPs applied at AP Invoice Form and then try to add......
    Hope this will solve the problem....
    If problem with FMS then you need to re create....
    Regards,
    Rahul

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

  • VM creation on a cluster fails with Internal error code: 0x80990C1D

    I am getting the following error when creating a VM from template on a 2012 R2 cluster:
    Error (3101)
    VMM failed to mount virtual hard disk (VHD) file XXXX.vhdx on the XXXX server. A timeout occurred.
    Internal error code: 0x80990C1D
    Recommended Action
    Open Services to make sure the startup type for Virtual Disk service is set to manual or automatic. Ensure that the service can start and then try the operation again.
    The errer occurs while running "Install VM Components" task. I did check services on the host and all is running as expected. The same template works without problem on non-clustered hosts, but fails two out of three times on HV cluster with
    CSV storage on FC SAN. I am running SCVMM 2012 R2 UR3.
    Any ideas what may cause this issue?
    Thanks
    Gleb.

    Hi,
    it's a strentgh issue. I don't have any certain information on the hand but I am just thinking out loud now. Maybe it helps.
    If it fails at "Install VM Components" this would mean that the problem occurs during injecting or ejecting the integration services. I am right now not sure if VMM injects the integration services as an ISO file or as an vhd file. The second option is also
    possible.
    From this point of view my question would be;
    1) Are you creating the VM from a blank disk with an ISO OS file attached ? If yes
    2) Are you experienceing the same problem with an syspreped vhd or vhdx file too ?
    3) How many VM's are running on your Cluster Nodes ?
    4) Are there any differences in the behavior when you select a different cluster node as destination host during the creation of a VM from template ?
    5) What's the workload on your cluster nodes right now disk, memory, cpu ?
    Regards,
    Cengiz Kuskaya

Maybe you are looking for

  • Media center problem with Qosmio G35-650 - error message

    hello all I have a problem with media center on qosmio g35-650. When starting live tv , an error message appears and writes "application failure please restart your computer again. if problem persists again please contact with your hardware assistanc

  • How to make asset class as chart of depreciation dependent

    Hello sap Experts we have a requirement from business user where they want that we make an asset class as chart of depreciation DEPENDENT. please suggest how to do this & what is the impact of it. Thanks & Reagrds Deepak Garg

  • Unable to start the OracleXETNSListener

    Hi All, I have installed Oracle XE11G version on my system sucessfully, but unable to open the database homepage since the OracleXETNSListener is not able to start. When trying to the OracleXSTNSListener it is giving the below specified message. The

  • Linked Wordpad Object in Asynchronous call

    Hi everyone, I detect an issue when loading reports in asynchronous mode: 1: I have a linked Ole object to a wordpad document saved in disk. 2: When calling report.load in normal(synchronous) way it loads the report just fine. 3: When calling report.

  • Cannot load USA Today nor another website since upgrading get "time out" message

    since upgrading firefox cannot load USA Today or EmergencyMail. ORG get a time out message: The connection has timed out The server at service.usatoday.com is taking too long to respond. * The site could be temporarily unavailable or too busy. Try ag