on 09-05-2008 2:59 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply,
This code works fine, its was just a field that has a wrong value...
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.