on 12-13-2016 9:58 AM
Dear All,
We are trying to cancel incoming payment and other documents using b1if. But, its automatically taking actual document date. How to cancel using system current date using b1if steps.
Options available in DI API, but we require in B1if. Sample DI API Code.
DI API sample:
Incoming :
-------------
// init the Incoming object
OrderApp.oPayments = ((SAPbobsCOM.Payments)(OrderApp.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)));
if (OrderApp.oPayments.GetByKey(1610000275) == true)
{ // If the addition failed
lRetCode = OrderApp.oPayments.CancelbyCurrentSystemDate();
if (lRetCode != 0)
{
OrderApp.oCompany.GetLastError(out lErrCode, out sErrMsg);
}
}
else
{
OrderApp.oCompany.GetLastError(out lErrCode, out sErrMsg);
Interaction.MsgBox(lErrCode + " " + sErrMsg, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); // Display error message
}
Journal :
-------------
OrderApp.oJournal = ((SAPbobsCOM.JournalEntries)(OrderApp.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)));
if (OrderApp.oJournal.GetByKey(10672) == true)
{ // If the addition failed
OrderApp.oJournal.ReferenceDate = DateTime.Now;
lRetCode = OrderApp.oJournal.Cancel();
if (lRetCode != 0)
{
OrderApp.oCompany.GetLastError(out lErrCode, out sErrMsg);
}
}
else
{
OrderApp.oCompany.GetLastError(out lErrCode, out sErrMsg);
Interaction.MsgBox(lErrCode + " " + sErrMsg, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); // Display error message
}
Thanks & Regards,
Venkatesan
Dear Venkatesan,
No suc tag to cancel the incoming payment on current date exists in B1IF, which is much needed. I have raised this as an Improvement Request to SAP. Request ID: 232790
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
7 | |
6 | |
6 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.