cancel
Showing results for 
Search instead for 
Did you mean: 

BillOfExchange Generated->Deposited???Sap Employee

Former Member
0 Kudos

Hi, i've this type of problem:

i've a record in Bill of Exchange form (OBOE table); this record is in BoeStatus = G (Generated). i'd like to set the status of this record in D (Deposited) using the BillOfExchangeTransaction Object.

I try this, but this code doesn`t work...


oIncomingBillExTransF = connmatriz.getConn().GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBillOfExchangeTransactions)
 
 
        oIncomingBillExTransF.StatusFrom = SAPbobsCOM.BoBOTFromStatus.btfs_Generated
        oIncomingBillExTransF.StatusTo = SAPbobsCOM.BoBOTFromStatus.btfs_Deposited
        oIncomingBillExTransF.PostingDate = "2008-08-31"
        oIncomingBillExTransF.TaxDate = "2008-08-31"
        oIncomingBillExTransF.IsBoeReconciled = SAPbobsCOM.BoYesNoEnum.tNO
        ' Bank information is necessary here,
        ' just the same as what we do via B1 client.
        oIncomingBillExTransF.Deposits.BankCountry = "BR"
        oIncomingBillExTransF.Deposits.BankAccount = "110102003"
        oIncomingBillExTransF.Deposits.BankDepositAccount = "110588"
        oIncomingBillExTransF.Deposits.BankBranch = "0352"
        oIncomingBillExTransF.Deposits.PostingType = SAPbobsCOM.BoDepositPostingTypes.dpt_Collection
        oIncomingBillExTransF.Lines.BillOfExchangeNo = 2
        oIncomingBillExTransF.Lines.BillOfExchangeType = SAPbobsCOM.BoBOETypes.bobt_Incoming
        lErrCode = oIncomingBillExTransF.Add
 
        If lErrCode  0 Then
            MsgBox("[** ERRO **] Código: " & lErrCode & " - Msg:" & sErrMsg)
        Else
            MsgBox("OK")
        End If

Somebody can tell me how can i do this type of operation?

Thank You very much

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marcio,

What is the error message you have when you execute your code ?

The code you post add a new bill of exchange. It's what you want ? or do you want to update an existing document ?

Best regards.

Michael.

Former Member

Thanks for reply,

This code works fine, its was just a field that has a wrong value...

Former Member
0 Kudos

Great.

I think you can mark this post as answer.

Regards

Michael

Answers (0)