SBO 2007a -  oInventoryGenEntry .Add()   Error -5002

We convert the com-DI to work with the new SBO 2007a after upgrading and this code only stop to
work and return -5002
m_InternalDocObj is of type SAPbobsCOM.BoObjectTypes.oInventoryGenEntry
:(here is the code...)
'region document -add data
MyBase.m_InternalDocObj.CardCode = ""
MyBase.m_InternalDocObj.DocTotal = 1
'Document_Lines is a child object of Documents object and represents the line entries of a
document in the Marketing Documents and Receipts module
'and the Inventory and Production module.
'Region(oInvGenEntry.Lines) - add data
MyBase.m_InternalDocObj.Lines.ItemCode = itemCode
MyBase.m_InternalDocObj.Lines.AccountCode = ""
MyBase.m_InternalDocObj.Lines.ItemDescription = ItemDescription
MyBase.m_InternalDocObj.Lines.WarehouseCode = WHcode '
MyBase.m_InternalDocObj.Lines.Currency = Currency 
MyBase.m_InternalDocObj.Lines.Price = GRTotalPrice
MyBase.m_InternalDocObj.Lines.Quantity = SerialsQuantity
For i = 0 To SerialsQuantity - 1
ManufacturerSerialNumber = ManufacturerSerialNumber + i
MyBase.m_InternalDocObj.Lines.SerialNumbers.ManufacturerSerialNumber =
ManufacturerSerialNumber.ToString() 
MyBase.m_InternalDocObj.Lines.SerialNumbers.InternalSerialNumber = ""
MyBase.m_InternalDocObj.Lines.SerialNumbers.BatchID = BatchID
MyBase.m_InternalDocObj.Lines.SerialNumbers.Notes =
ManufacturerSerialNumber.ToString()
MyBase.m_InternalDocObj.Lines.SerialNumbers.Location = ""
' The last Lines.SerialNumbers should not used Lines.SerialNumbers.Add()
If i = SerialsQuantity - 1 Then
Else : MyBase.m_InternalDocObj.Lines.SerialNumbers.Add()
End If
Next
m_iErr = MyBase.m_InternalDocObj.Add()  - Error ocured here -5002
thanks in advance
yaniv

Hello,
So,
Please decide whihc serial number type you are using
Only the First Row of Serial Numbers collection is not necessary to use the Lines.SerialNumbers.Add()
So,
For i = 0 To SerialsQuantity - 1
' add a new lines to Serial numbers collection
if i > 0 then Lines.SerialNumbers.Add()
Lines.SerialNumbers.SetCurrentLine(i)
' Check the AdministrationSystem Init .. General SettingsInventory TAB for Unique Serial Number type...
ManufacturerSerialNumber = ManufacturerSerialNumber + i
MyBase.m_InternalDocObj.Lines.SerialNumbers.ManufacturerSerialNumber =
ManufacturerSerialNumber.ToString()
MyBase.m_InternalDocObj.Lines.SerialNumbers.InternalSerialNumber = ""
' Not Needed MyBase.m_InternalDocObj.Lines.SerialNumbers.BatchID = BatchID
MyBase.m_InternalDocObj.Lines.SerialNumbers.Notes =
ManufacturerSerialNumber.ToString()
MyBase.m_InternalDocObj.Lines.SerialNumbers.Location = ""
' The last Lines.SerialNumbers should not used
'not needed If i = SerialsQuantity - 1 Then
'Else : MyBase.m_InternalDocObj.Lines.SerialNumbers.Add()
'End If
Next
Regards
János

Similar Messages

  • Error messages in SBO 2007A

    Is there a table in SBO 2007A where I can see recent error messages for all users?

    Those error messages are saved under Log folder under B1 client one by one.  There is no table to hold all users' error messages
    Thanks,
    Gordon

  • XL Reporter Runtime error - upgraded from SBO 2005A to SBO 2007A

    Hi Experts,
    We upgraded our client SBO 2005A to SBO 2007A. We have this issue with XL Reporter that everytime we go to Advanced Report Builder-> Cell -> Transaction Row -> Attribute ->ARP_Series we are getting IXSelectionBarctl error window that says Run-time error '0', and the only option you have is OK. After pressing OK, it returns another IXSelectionBarctl window error:
    Run-time error '-2147418105 (80010007)'
    Automation error
    the callee (server (not server application) is not available and disappeared; all connection are invalid. The call may have executed.
    After pressing OK button the Advanced Report Builder is still visible but no longer accessible.
    Here is the command under Attribute I'm trying to access.
    "FIG( SO_DocDate = @d1:@d2 And ARP_Series = "1" ) ARDT( Code = "Invoice" )"
    Also, this report does not display the item quantity recorded in the invoice. It returns no data when running the report.
    I think the problem is that the ARP_Series is no longer available in 2007A, if not where do I find the series or somewhat similar to ARP Series function?
    Any help will be greatly appreciated.
    Thank you!

    Please check this thread:
    Unable to connect XL Reporter in 2007 B
    Thanks,
    Gordon

  • Add/Update Business Partner Error 5002

    Hi,
    I'm having problem with the DI API. We are testing our application with SAP B1 SP1 PL 34. With this version, it seems impossible to add or update a business partner. oBP.add and oBP.update always return the error -5002 with no description.
    I even have the error if I remove every line of code that change something on the bp. So, I have a code like this that return the error -5002
    oBP.GetByKey(intBPID)
    oBP.Update
    How this can return an error if we change nothing otherwise it is a bug ?
    Anybody has an idea or suggestion ?
    Thank you for your help
    Jodérick Picard

    Hi,
    I've more details.
    I was testing the update with my code :
    oBP.GetByKey(intBPID)
    oBP.Update
    and I found some business partner where the code works ok, BUT most of the business partner doesn't work.
    All business partners update without error in SAP B1. So how could it not work with the SDK when the data itself is valid for SAP B1 when using the GUI?
    Thank you
    Jodérick Picard

  • Error  Connection SBO 2007A PL 49 using Citrix MPX Version 4

    Dear All,
    I have some problem connection. We use Citrix for connection to SBO 2007A PL 49. When we through  Citrix Connection, the SBO Menu appears then show error message:Application has problem. Diagnostic file C:\Program FIles\SAP\SAP BUsiness One\Log\SAP Business One_20090907170137.dmp was created.
    We use Citrix MPX Version 4 and  Windows Server 2000.
    Please give me the solution ASAP. Because, the user can not do the transaction because of this.
    Thank you for your kind attention.
    Regards,
    Fitri

    Hi Fitri,
    There are various reasons why the error happened.
    You should create a support message to SAP and attach these 2 files:
    1.  SAP Business One YYYY MM DD HH MM SS.DMP.
    2.  SAP Business One YYYY MM DD HH MM SS_dyagnostic.TXT.
    from the  :Program Files\SAP\SAP Business One\Log
    Regards,
    David

  • Exception : DI Error: (-5002) At least one amount is required in document rows

    Trying to create a MaterialRevaulation object. doesn't matter what I am using I can getting this error message "Exception : DI Error: (-5002) At least one amount is required in document rows"
    Formate of payload looks like 
    <Payload Role="X" id="atom1">
    - <MaterialRevaluation xmlns=""> 
    - <row> 
    <RevalType>P</RevalType>  
    <DocDate>20140701</DocDate>  
    <JournalMemo>Inventory Revaluation</JournalMemo>  
    <InflationRevaluation>tNO</InflationRevaluation>  
    </row>
    </MaterialRevaluation>
    - <MaterialRevulation_Lines xmlns=""> 
    - <row> 
    <LineNum>0</LineNum>  
    <ItemCode>Item1</ItemCode>  
    <WarehouseCode>WH1</WarehouseCode>  
    <Price>14.973030</Price>  
    </row>
    - <row> 
    <LineNum>1</LineNum>  
    <ItemCode>Item2</ItemCode>  
    <WarehouseCode>WH1</WarehouseCode>  
    <Price>15.973030</Price>  
    </row>
    - <row> 
    <LineNum>2</LineNum>  
    <ItemCode>Item3</ItemCode>  
    <WarehouseCode>WH1</WarehouseCode>  
    <Price>13.973030</Price>  
    </row>
    </MaterialRevulation_Lines>
    </Payload>
    And my SBO object call looks like this
    <Payload Role="C" id="atom2" system="0010000102" status="success" b1login="Technical User" method="Synchronous Insert with fallback to Update" objectid="162" payload="atom1" keyname="" keyvalue="" DIresult="failure" DImsg="Exception : DI Error: (-5002) At least one amount is required in document rows" />
    I don't think I need to put anything in KeyName or Keyvalue. Since I am insert.
    But it looks like it is not even look at the XML changes. I have tried to with no change
    1. Add BOM/BO admin structure
    2. Rouding price difference (from 0 decimla ot 6)
    3. Put in Quantity
    4. Add LineNum
    5.Change Item
    6.Change WHS
    Running out of ideas!! Any help will be appreciated. Thank You!

    Successful format looks like this
    Strange enough, and I still don't know why. Certain item in combination give me the error message. If I break it out to individual document. Then it give me the proper error message. But if it bundled with number of item together then it become this at least one amount is needed at document row error message.
    <BOM xmlns="">
    <BO>
    <AdmInfo>
    <Object>162</Object>
    <Version>2</Version>
    </AdmInfo>
    <MaterialRevaluation>
    <row>
    <DocDate>20140702</DocDate>
    <RevalType>P</RevalType>
    </row>
    </MaterialRevaluation>
    <MaterialRevaluation_lines>
    <row>
    <ItemCode>ITEM1</ItemCode>
    <WarehouseCode>WH1</WarehouseCode>
    <Price>14.587</Price>
    </row>
    </MaterialRevaluation_lines>
    </BO>
    </BOM>

  • SBO 2007A Client on VISTA

    Hello Experts,
    I am getting a problem in SBO 2007A Client in VISTA,
    After installation it gives an ERROR at Login "Internal Error ..."
    Help Required ...
    Regards,
    Shazad Nazir

    Hi,Shazad Nazir 
    In order to try to resolve this issue, please do the following:
    1. Go to start -> Run -> %temp% and clean up all the files.
    2. Go to Control panel -> Add and remove program and uninstall the SAP Business one client.
    3. Reboot the Notebook.
    4. Turn off UAC (disable UAC) before installing the client so the registration of both the UI and DI will work. UAC -> a new security mechanism was introduced in Vista. It is called "user Account Control"
    (For more info about this new feature please visit: What is User Account Control? and Turn User Account Control on or off.)
    5. Then reinstall the client from the B1_SHR.
    Follow the SAP Note :1231901.
    Please make sure that you have followed the step no. 4 before doing client reinstallation.
    hope it helps

  • "Internal error (-5002) occurred" On Pick List Update Picked Quantity

    Hi Experts,
    I have an SDK program that simply tries to update the Picked Quantity in SAP. Previously it has been working fine, until I try to use the same logic for items managed by Batch or Serial Number.
    In this scenario, I have created a PickList with only 1 row, the item is managed by Serial Number.
    I try to simplify the code as below.
    Dim oBaseDocument As SAPbobsCOM.PickLists
    oBaseDocument = oComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPickLists)
    BaseDocument.GetByKey(12345)
    oBaseDocument.Lines.SetCurrentLine(0)
    oBaseDocument.Lines.PickedQuantity += 1
    oBaseDocument.Lines.BinAllocations.Add()
    oBaseDocument.Lines.BinAllocations.SetCurrentLine(0)
    oBaseDocument.Lines.BinAllocations.BinAbsEntry = CInt(sBinAbsEntry)
    oBaseDocument.Lines.BinAllocations.Quantity += dXML_Quantity
    oBaseDocument.Lines.SerialNumbers.InternalSerialNumber = sXML_BatchSerialNo      ' <--- ***
    lRet = oBaseDocument.Update
    I have added the *** line for handling the Serial Number, but when it hit the Update command, the SDK returns "Internal error (-5002) occurred".
    I'm not sure what does it means.
    Anyway I tried to remove the *** line and it works fine for item not managed by Batch or Serial, but the issue will remains for the Items managed by Serial or Batch.
    Please advise whether I missed anything in this code.
    Thank you in advance.
    Best Regards,
    Krisma

    Hi Krisma,
    I haven't done this thing practically but error -5002 will occur, if there is any Invalid Object.
    You can check it accordingly.
    Hope it helps.
    Thanks & Regards
    Ankit Chauhan

  • ITunes 10.6 stopped iTunes Match (error 5002)

    I have a large iTunes Match upload step in progress (will prob take a couple of omnths to complete!) and I upgraded to iTunes 10.6 today.  ie. before the upload step was completed.
    When I tried to start the Match process again after upgrading, I kept getting error 5002 saying there was a problem with the iTunes store.
    I tried signing out and then back in to the iTunes Store from iTunes but then Match said that I needed to add my computer to the Match service - this also errored out with 5002 when I tried to do it.  ie.  It no longer recognised my existing compter as being authorised for the store and wouldn't let me add it again.
    I did manage to reoslve the problem by completing the following from within iTunes:
    1. Store -->  Sign Out.
    2. Store  -->  Sign In
    3. Store --> View This Account
    4. (Apple ID Summary)  Deathorise All Computers.  Click Done
    5. Click iTunes Match and No Thanks to add this computer (this turned Match off).
    6. Store -->  Turn on iTunes Match
    7. iTunes Match  -->  Add this Computer
    I was then able to start the Match process again.

    KeithJenner wrote:
    Does anyone know how much of Sgt Pepper matched previously? Roebeet previously reported 3 tracks from Magical Mytery Tour matched, but I haven't done them myself.
    Here are my results for the Beatles Sgt. Pepper's and Magical Mystery Tour 2009 Mono Remastered albums prior and after the iTunes 10.6 update (IOW, no change)...
    I tried deleting all of the songs on both albums (without deleting them from iCloud) and downloaded them again...and everything remained the same.  However that may be because all of my Beatles albums were ripped at 320kbps, so other's results may vary. 
    BTW, I have both the 2009 Mono and Stereo Remastered versions of these albums.  100% of the stereo versions were matched (not uploaded) prior to iTunes 10.6.
    IIRC one of the odd "unmatched" tracks others reported right after iTunes Match went live was the Beatles Abby Road "She Came In Through the Bathroom Window".  I never experienced that bug however.
    I have noticed that since the iTunes 10.6 and iOS 5.1 updates, cover art that would sometimes go missing on my iPhone 4 and/or iPad (or even my Apple TV2) now seem to show up without fail...including cover art that I had added myself.
    Hope that helps!

  • Error -5002, Update quantities in purchase order? (INV1.Quantity) Line[2]

    We are trying to create Invoices using the SDK tool for a clients interface. Everything goes ok, except at the point where we add the document, we get the following message:
    Error -5002, Update quantities in purchase order? (INV1.Quantity) Line[2]
    Any ideas? We have searched the SAP notes, but nothing is available. Are we missing anything?
    We are running on Version 6.50.098
    Thanks
    Marios

    Hello Marios,
    This error occurs because the last line you are trying to add to the Marketing Document is an empty line. It is a new functionality in Version 6.5 that the document object automatically comes with one document line so if you are adding just one line you do not need to use oDocument.Lines.Add,                                           
    It is only for the second and subsequent lines of marketing documents that you require the method oDocument.Lines.Add. Note 722693 describes the issue.                 
    Regards,
    Lisa

  • Why do I get "Internal Error (-5002) occurred" when doing external recon via SDK ?

    I can reconcile an invoice and matching incoming payment as below:
    Table OJDT is:
    BatchNum
    TransId
    BtfStatus
    TransType
    BaseRef
    RefDate
    Memo
    Ref1
    Ref2
    CreatedBy
    LocTotal
    FcTotal
    SysTotal
    TransCode
    OrignCurr
    TransRate
    BtfLine
    TransCurr
    Project
    DueDate
    TaxDate
    PCAddition
    FinncPriod
    DataSource
    UpdateDate
    CreateDate
    UserSign
    UserSign2
    RefndRprt
    LogInstanc
    ObjType
    Indicator
    AdjTran
    RevSource
    StornoDate
    StornoToTr
    AutoStorno
    Corisptivi
    VatDate
    StampTax
    Series
    Number
    AutoVAT
    DocSeries
    FolioPref
    FolioNum
    CreateTime
    BlockDunn
    ReportEU
    Report347
    Printed
    DocType
    AttNum
    GenRegNo
    RG23APart2
    RG23CPart2
    MatType
    Creator
    Approver
    Location
    SeqCode
    Serial
    SeriesStr
    SubStr
    AutoWT
    WTSum
    WTSumSC
    WTSumFC
    WTApplied
    WTAppliedS
    WTAppliedF
    BaseAmnt
    BaseAmntSC
    BaseAmntFC
    BaseVtAt
    BaseVtAtSC
    BaseVtAtFC
    VersionNum
    BaseTrans
    ResidenNum
    OperatCode
    Ref3
    SSIExmpt
    SignMsg
    SignDigest
    CertifNum
    KeyVersion
    CUP
    CIG
    SupplCode
    SPSrcType
    SPSrcID
    SPSrcDLN
    DeferedTax
    AgrNo
    SeqNum
    ECDPosTyp
    RptPeriod
    RptMonth
    U_BType
    U_CLIST
    NULL
    3285
    O
    13
    1328
    2014-08-10 00:00:00.000
    A/R Invoices - AFR100
    1328
    1328
    900.000000
    900.000000
    900.000000
    NULL
    NULL
    0.000000
    NULL
    USD
    NULL
    2014-08-10 00:00:00.000
    2014-08-10 00:00:00.000
    N
    104
    I
    2014-08-10 00:00:00.000
    2014-08-10 00:00:00.000
    1
    1
    N
    0
    30
    NULL
    N
    N
    NULL
    NULL
    N
    N
    NULL
    N
    17
    3285
    N
    4
    NULL
    NULL
    944
    N
    N
    N
    N
    NULL
    0
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    9.02.003.11
    NULL
    1
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    N
    NULL
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    3286
    O
    24
    1375
    2014-08-10 00:00:00.000
    Incoming Payments - AFR100
    1375
    1375
    900.000000
    900.000000
    900.000000
    NULL
    NULL
    0.000000
    NULL
    USD
    NULL
    2014-08-10 00:00:00.000
    2014-08-10 00:00:00.000
    N
    104
    I
    2014-08-10 00:00:00.000
    2014-08-10 00:00:00.000
    1
    1
    N
    0
    30
    NULL
    N
    N
    NULL
    NULL
    N
    N
    NULL
    N
    17
    3286
    N
    15
    NULL
    NULL
    945
    N
    N
    N
    N
    NULL
    0
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    9.02.003.11
    NULL
    1
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    N
    NULL
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    Table JDT1:
    TransId
    Line_ID
    Account
    Debit
    Credit
    SYSCred
    SYSDeb
    FCDebit
    FCCredit
    FCCurrency
    DueDate
    SourceID
    SourceLine
    ShortName
    IntrnMatch
    ExtrMatch
    ContraAct
    LineMemo
    Ref3Line
    TransType
    RefDate
    Ref2Date
    Ref1
    Ref2
    CreatedBy
    BaseRef
    Project
    TransCode
    ProfitCode
    TaxDate
    SystemRate
    MthDate
    ToMthSum
    UserSign
    BatchNum
    FinncPriod
    RelTransId
    RelLineID
    RelType
    LogInstanc
    VatGroup
    BaseSum
    VatRate
    Indicator
    AdjTran
    RevSource
    ObjType
    VatDate
    PaymentRef
    SYSBaseSum
    MultMatch
    VatLine
    VatAmount
    SYSVatSum
    Closed
    GrossValue
    CheckAbs
    LineType
    DebCred
    SequenceNr
    StornoAcc
    BalDueDeb
    BalDueCred
    BalFcDeb
    BalFcCred
    BalScDeb
    BalScCred
    IsNet
    DunWizBlck
    DunnLevel
    DunDate
    TaxType
    TaxPostAcc
    StaCode
    StaType
    TaxCode
    ValidFrom
    GrossValFc
    LvlUpdDate
    OcrCode2
    OcrCode3
    OcrCode4
    OcrCode5
    MIEntry
    MIVEntry
    ClsInTP
    CenVatCom
    MatType
    PstngType
    ValidFrom2
    ValidFrom3
    ValidFrom4
    ValidFrom5
    Location
    WTaxCode
    EquVatRate
    EquVatSum
    SYSEquSum
    TotalVat
    SYSTVat
    WTLiable
    WTLine
    WTApplied
    WTAppliedS
    WTAppliedF
    WTSum
    WTSumFC
    WTSumSC
    PayBlock
    PayBlckRef
    LicTradNum
    InterimTyp
    DprId
    MatchRef
    Ordered
    CUP
    CIG
    BPLId
    BPLName
    VatRegNum
    SLEDGERF
    U_CLIST
    3285
    0
    100200200100000
    900.000000
    0.000000
    0.000000
    900.000000
    900.000000
    0.000000
    USD
    2014-08-10 00:00:00.000
    1328
    1
    AFR100
    0
    0
    400100100300000
    A/R Invoices - AFR100
    1
    13
    2014-08-10 00:00:00.000
    NULL
    1328
    1328
    1328
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    NULL
    0.000000
    0.000000
    N
    N
    30
    NULL
    0.000000
    0
    N
    0.000000
    0.000000
    N
    0.000000
    NULL
    3
    D
    0
    NULL
    900.000000
    0.000000
    900.000000
    0.000000
    900.000000
    0.000000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    3285
    1
    200100200900000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    USD
    2014-08-10 00:00:00.000
    1328
    -2
    200100200900000
    0
    0
    AFR100
    A/R Invoices - AFR100
    13
    2014-08-10 00:00:00.000
    NULL
    1328
    1328
    1328
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    X0
    900.000000
    0.000000
    N
    N
    30
    NULL
    900.000000
    0
    Y
    0.000000
    0.000000
    N
    0.000000
    NULL
    3
    C
    0
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    3285
    2
    400100100300000
    0.000000
    900.000000
    900.000000
    0.000000
    0.000000
    900.000000
    USD
    2014-08-10 00:00:00.000
    NULL
    NULL
    400100100300000
    0
    0
    AFR100
    A/R Invoices - AFR100
    13
    2014-08-10 00:00:00.000
    NULL
    1328
    1328
    1328
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    NULL
    0.000000
    0.000000
    N
    N
    30
    NULL
    0.000000
    0
    N
    0.000000
    0.000000
    N
    0.000000
    NULL
    3
    C
    0
    NULL
    0.000000
    900.000000
    0.000000
    900.000000
    0.000000
    900.000000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    3285
    3
    100200100100200
    0.000000
    891.710000
    891.710000
    0.000000
    0.000000
    891.710000
    USD
    2014-08-10 00:00:00.000
    NULL
    NULL
    100200100100200
    0
    0
    AFR100
    A/R Invoices - AFR100
    13
    2014-08-10 00:00:00.000
    NULL
    1328
    1328
    1328
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    NULL
    0.000000
    0.000000
    N
    N
    30
    NULL
    0.000000
    0
    N
    0.000000
    0.000000
    N
    0.000000
    NULL
    3
    C
    0
    NULL
    0.000000
    891.710000
    0.000000
    891.710000
    0.000000
    891.710000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    3285
    4
    500100100700000
    891.710000
    0.000000
    0.000000
    891.710000
    891.710000
    0.000000
    USD
    2014-08-10 00:00:00.000
    NULL
    NULL
    500100100700000
    0
    0
    AFR100
    A/R Invoices - AFR100
    13
    2014-08-10 00:00:00.000
    NULL
    1328
    1328
    1328
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    NULL
    0.000000
    0.000000
    N
    N
    30
    NULL
    0.000000
    0
    N
    0.000000
    0.000000
    N
    0.000000
    NULL
    3
    D
    0
    NULL
    891.710000
    0.000000
    891.710000
    0.000000
    891.710000
    0.000000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    3286
    0
    100200500100500
    900.000000
    0.000000
    0.000000
    900.000000
    900.000000
    0.000000
    USD
    2014-08-10 00:00:00.000
    1375
    -1
    100200500100500
    0
    0
    AFR100
    Incoming Payments - AFR100
    NULL
    24
    2014-08-10 00:00:00.000
    NULL
    1375
    1375
    1375
    NULL
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    NULL
    0.000000
    0.000000
    NULL
    N
    N
    30
    NULL
    NULL
    0.000000
    0
    N
    0.000000
    0.000000
    N
    0.000000
    NULL
    0
    D
    0
    NULL
    900.000000
    0.000000
    900.000000
    0.000000
    900.000000
    0.000000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    NULL
    NULL
    NULL
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    3286
    1
    100200200100000
    0.000000
    900.000000
    900.000000
    0.000000
    0.000000
    900.000000
    USD
    2014-08-10 00:00:00.000
    NULL
    -99
    AFR100
    0
    0
    100200500100500
    Incoming Payments - AFR100
    1375
    24
    2014-08-10 00:00:00.000
    NULL
    1375
    1375
    1375
    NULL
    NULL
    2014-08-10 00:00:00.000
    0.000000
    NULL
    0.000000
    1
    NULL
    104
    -1
    -1
    N
    0
    NULL
    0.000000
    0.000000
    NULL
    N
    N
    30
    NULL
    NULL
    0.000000
    0
    N
    0.000000
    0.000000
    N
    0.000000
    NULL
    0
    C
    0
    NULL
    0.000000
    900.000000
    0.000000
    900.000000
    0.000000
    900.000000
    Y
    N
    0
    NULL
    0
    N
    NULL
    NULL
    NULL
    1900-01-01 00:00:00.000
    0.000000
    NULL
    NULL
    NULL
    NULL
    NULL
    0
    0
    0
    -1
    -1
    0
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    1900-01-01 00:00:00.000
    NULL
    NULL
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    N
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    N
    NULL
    NULL
    0
    NULL
    NULL
    N
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    NULL
    But when I try the same in SDK/DI (oCmpSrv previously set),  I get "Internal Error (-5002) occurred":
            Try
                Dim ExtReconSvc As SAPbobsCOM.ExternalReconciliationsService = oCmpSrv.GetBusinessService(SAPbobsCOM.ServiceTypes.ExternalReconciliationsService)
                Dim ExtReconciliation As SAPbobsCOM.ExternalReconciliation = ExtReconSvc.GetDataInterface(SAPbobsCOM.ExternalReconciliationsServiceDataInterfaces.ersExternalReconciliation)
                ExtReconciliation.ReconciliationAccountType = SAPbobsCOM.ReconciliationAccountTypeEnum.rat_BusinessPartner
                Dim jeLine1 As SAPbobsCOM.ReconciliationJournalEntryLine = ExtReconciliation.ReconciliationJournalEntryLines.Add()
                jeLine1.TransactionNumber = "3285"
                jeLine1.LineNumber = 0
                Dim jeLine2 As SAPbobsCOM.ReconciliationJournalEntryLine = ExtReconciliation.ReconciliationJournalEntryLines.Add()
                jeLine2.TransactionNumber = "3286"
                jeLine2.LineNumber = 1
                ExtReconSvc.Reconcile(ExtReconciliation)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
    I do not understand what I am doing wrong and I have no idea what this error means.
    Thanks in advance for your help.

    Sorry Images were very poor in original post.

  • SP01: DI error -5002 Invalid Total ORDR.DocTotal

    Hi All,
    i'm getting a strange error.
    i'm adding a sales order via DI.
    when the code is executed via the .net debugger it works great.
    when i create an installer and install the Addon i receive the error:
    -5002 Invalid Total [ORDR.DocTotal]
    do someone ever had this kind of error?
    btw i'm using SAPB12005A SP1 PL2
    thanks
    Moty Moshin

    Here is the code:
    oNewOrder = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                        'B1Connections.diCompany.StartTransaction()
                        Dim LinesAdded As Integer = 0
                        For i = 1 To intDupAmount
                            Try
                                ' this loop adds the different items to the Delivery object
                                oNewOrder.CardCode = strBPCode
                                oNewOrder.Series = strSeriesCode
                                oNewOrder.NumAtCard = strVendorRefNo
                                oNewOrder.Project = strProjectCode
                                oNewOrder.ShipToCode = strShipToCode
                                oNewOrder.DocDueDate = strDocDueDate
                                oNewOrder.Comments = strComments
                                oNewOrder.PaymentGroupCode = strPaymentTerms
                                oNewOrder.PaymentMethod = strPaymentMethod
                                'Currently not available thru the DI/UI
                                'oNewOrder.header = OQUTHeader
                                'oNewOrder.Footer = OQUTFooter
                            Catch ex As Exception
                                B1Connections.theAppl.MessageBox("In For Step 1")
                            End Try
                            Try
                                oNewOrder.Lines.SetCurrentLine(0)
                                'Line item fields that are visible on the sales order form
                                oNewOrder.Lines.ItemCode = currSalesFormLines.ItemCode 'As String '1     'ItemCode
                                oNewOrder.Lines.ItemDescription = currSalesFormLines.ItemDesc 'As String '1     'ItemDesc
                                oNewOrder.Lines.WarehouseCode = currSalesFormLines.WhsCode 'As String '24     'WhsCode
                                oNewOrder.Lines.UnitPrice = currSalesFormLines.UnitPrice 'As Double '14     'UnitPrc
                                oNewOrder.Lines.DiscountPercent = currSalesFormLines.DiscPct 'As Double '14     'DiscPct
                                oNewOrder.Lines.Price = currSalesFormLines.Price 'As Double '17     'Price
                                oNewOrder.Lines.Quantity = currSalesFormLines.Quantity 'As Double '11     'Quantity
                                'Line item fields that are not visible on the sales order form
                                oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_EstQty).Value = currSalesFormLines.EstQty  'As Double 'U_XX_EstQty
                                'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_STCC).Value = currSalesFormLines.STCC.ToString    'As Double 'U_XX_STCC
                                'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_HSC).Value = currSalesFormLines.HSC   'As String 'U_XX_HSC
                                'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_CVal).Value = currSalesFormLines.CVal.ToString    'As Double 'U_XX_CVal
                                oNewOrder.Lines.TotalLc = currSalesFormLines.TotalLc 'As Double '21     'TotalLc
                                oNewOrder.Lines.Total()
                                oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_QtyMT).Value = currSalesFormLines.QtyMT  'As Double 'U_XX_QtyMT
                                oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_QtyST).Value = currSalesFormLines.QtyST   'As Double 'U_XX_QtyST
                                'oNewOrder.Lines.UserFields.Fields.Item("U_" + cUDinit.udfMdL_DGood).Value = currSalesFormLines.DGood.ToString    'As String 'U_XX_DGood
                            Catch ex As Exception
                                B1Connections.theAppl.MessageBox("In For Step 2 - Lines")
                            End Try
                            Try
                                'Header level UDF's
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ConNum).Value = cLastUdfMD.ConNum
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ConTyp).Value = cLastUdfMD.ConTyp
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ConSta).Value = cLastUdfMD.ConSta
                                If cLastUdfMD.RefCon <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_RefCon).Value = cLastUdfMD.RefCon
                                End If
                                'Get Release number
                                'B1Connections.theAppl.MessageBox("Before Add Msg 2")
                                lngNextRelease = cReleaseNumber.GetNextNum(cUDinit.udoRn_ReleaseNumber, strSeries)
                                If lngNextRelease = -1 Then
                                    B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack)
                                    retVal = cReleaseNumber.UnLockNumbering(cUDinit.udoRn_ReleaseNumber, strSeries)
                                    B1Connections.theAppl.MessageBox("Error - Cannot Get Next Number from NNM1")
                                    Exit Sub
                                End If
                                releaseNumbers.Add(lngNextRelease)
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_RelNum).Value = lngNextRelease.ToString  'intRelNum
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ShDtSt).Value = cLastUdfMD.ShDtSt
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_ShDtEn).Value = cLastUdfMD.ShDtEn
                                If cLastUdfMD.StrDt <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_StrDt).Value = cLastUdfMD.StrDt
                                End If
                                If cLastUdfMD.StrAmt <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_StrAmt).Value = cLastUdfMD.StrAmt
                                End If
                                If cLastUdfMD.AcrAmt <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_AcrAmt).Value = cLastUdfMD.AcrAmt
                                End If
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_CQTY).Value = cLastUdfMD.CQTY
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_LN).Value = cLastUdfMD.LN
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STerms).Value = cLastUdfMD.STerms
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Mode).Value = cLastUdfMD.Mode
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Carrier).Value = cLastUdfMD.Carrier
                                If cLastUdfMD.PortEntry <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_PtEnt).Value = cLastUdfMD.PortEntry
                                End If
                                If cLastUdfMD.CBrok <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_CBrok).Value = cLastUdfMD.CBrok
                                End If
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Fterm).Value = cLastUdfMD.FTerms
                                If cLastUdfMD.PriveEq <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_PrivEq).Value = cLastUdfMD.PriveEq
                                End If
                                If cLastUdfMD.Route <> "" Then
                                    oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Route).Value = cLastUdfMD.Route
                                End If
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_TF).Value = cLastUdfMD.TF
                                'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_Season).Value = cLastUdfMD.Season
                                'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STCity).Value = cLastUdfMD.STCity
                                'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STCtr).Value = cLastUdfMD.STCtr
                                'oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_STSt).Value = cLastUdfMD.STSt
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_TAmtIn).Value = cLastUdfMD.TAmtIn
                                oNewOrder.UserFields.Fields.Item("U_" + cUDinit.udfMdH_TAmtOr).Value = cLastUdfMD.TAmtOr
                            Catch ex As Exception
                                B1Connections.theAppl.MessageBox("In For Step 3 - Header Level UDF")
                            End Try
                            ' add sales order current quntity () from total (U_XX_TQTYR)
                            ' add sales order current dollar value() from total (U_XX_TAMTR)
                            ' Try to add the sales order object to the database
                            'B1Connections.theAppl.MessageBox("Before Add Msg 3")
                            lRetCode = oNewOrder.Add()
                            'B1Connections.theAppl.MessageBox("Before Add Msg 3.1")
                            If lRetCode <> 0 Then ' If the addition failed
                                B1Connections.diCompany.GetLastError(lErrCode, sErrMsg)
                                B1Connections.theAppl.MessageBox("Error - " & lErrCode & sErrMsg)
                                '   B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack)
                                Try
                                    B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack)
                                Catch ex As Exception
                                    B1Connections.theAppl.MessageBox("Error - Add Error:" & lRetCode & " - " & ex.Message)
                                End Try
                                retVal = cReleaseNumber.UnLockNumbering(cUDinit.udoRn_ReleaseNumber, strSeries)
                                'B1Connections.diCompany.GetLastError(lErrCode, sErrMsg)
                                'B1Connections.theAppl.MessageBox("Error - " & lErrCode & sErrMsg)
                                Exit Sub
                            Else
                            End If
                            LinesAdded = LinesAdded + 1
                            ' init the order object
                            oNewOrder = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                        Next i
                        'B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_Commit)
                        retVal = cReleaseNumber.UnLockNumbering(cUDinit.udoRn_ReleaseNumber, strSeries)

  • OIncomingPayment + BillOfExchange = error -5002 - Invalid dll path or name

    Hi for all,
       I´m having a problem when I try to pay a incoming payment from a invoice with BillOfExchange, I´ve been search all this forum for many hours, with all possibile combinations of subject, but any past topic could explain this problem.
       When I try to add a BillOfExchange of one invoice, I´m getting the error -5002 called 'Invalid dll path or name'. I know that the PaymentMethod that I use references the BankOfBrazil.dll library, but how can I handle this error? I´ve tried to put this file on my projects folder, but It wasn´t works...
       Here´s the code, I´m using the SAP B1 2005B PL36:
       Thanks
                'oIP = oIncomingPayments
                oIP = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
                chave = oIP.DocEntry
                oIP.CardCode = oBP.CardCode
                oIP.CardName = oBP.CardName
                oIP.DocDate = Now
                oIP.DueDate = Now
                oIP.TaxDate = Now
                oIP.Invoices.AppliedFC = 0
                oIP.Invoices.DocEntry = oInvoiceIn.DocEntry
                oIP.Invoices.InvoiceType = 13
                oIP.Invoices.SumApplied = 5.85
                oIP.Invoices.InstallmentId = 1
                oIP.Invoices.Add()
                 oIP.BillOfExchange.PaymentMethodCode = oInvoiceIn.PaymentMethod
                oIP.BoeAccount = "1121110"
                oIP.BillOfExchangeAmount = 5.85
                '**** Commita ****
                lErrCode = oIP.Add 'Occours error -5002
                connmatriz.getConn().GetLastError(lErrCode, sErrMsg)
                If lErrCode <> 0 Then
                    connmatriz.getConn().EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
                    GoTo FALHA
                End If

    HI
    I have also got several times same message:
    1. Disconnect with development environment
    2. Clear the SM_OB_DLL directory from the TEMP directory.
    3. Start it again, and try
    In the BankofBrazil stuffs i am so perfect....
    Regards,
    J.

  • Entry Point Not Found Errror while Install SBO 2007A client

    While I am trying to Install SBO 2007A client (SP01 PL05)  this Error shows:
    " SAP Business One.exe - Entry Point Not Found -
    The procedure entry point ?CompareNoCase@SBOString@@QBEHPBG@Z could not be located in the dynamic link library SAP Business One.exe"
    Your help please
    BR,
    Meital

    Log in as Admin
    and it worked.

  • Internal error 5002 while DI api stock transfer ?

    Hi Expert,
       I am Getting the error Code -5002  While DI API Stock transfer Add Method.
      but One thing  this error does not occur in demo Company , But Occur in the Company  that i have Created ...
    Do some Specific  Functional  set required or other issue  in it .
    Regards,
    Mayank Shah

    Hi Mayank,
    I haven't done this thing practically but error -5002 will occur, if there is any Invalid Object.
    You can check it accordingly.
    Hope it helps.
    Thanks & Regards
    Ankit Chauhan

Maybe you are looking for