on 03-11-2015 11:37 AM
Dear All Experts,
I want to ask you about a process in SAP B1 SDK.
Can I do something like when I create a A/R Invoice then a particular Sales Order should be closed and the relationship map should also maintained for these 2 documents ?
Can I do this ? Please reply me for this.
Regards
Hi Kuldeep,
Yes it can be done. I don't know what your requirement is but if you will create a Sales Invoice based on a Sales Order and that Invoice will have the reference of that particular Sales Order.
Then you can maintain the relationship map as well as the functionality same as in SAP System.
You need to use DIAPI for this.
Hope it helps.
Thanks & Regards
Ankit Chauhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here is how to do it :
SAPbobsCOM.Documents oInvoice = default(SAPbobsCOM.Documents);
oInvoice =(SAPbobsCOM.Documents)SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
oInvoice.CardCode = "C000003";
oInvoice.DocDueDate = DateAndTime.Now;
oInvoice.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oOrders);
oInvoice.Lines.BaseEntry = Convert.ToInt32(3616);
oInvoice.Lines.BaseLine = 1;
oInvoice.Lines.Quantity = 3;
oInvoice.Lines.Add();
oInvoice.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oOrders);
oInvoice.Lines.BaseEntry = Convert.ToInt32(3616);
oInvoice.Lines.BaseLine = 2;
int kth = 0;
kth = oInvoice.Add();
if (kth != 0)
{
int irrcode;
string errmsg;
SBO_Company.GetLastError(out irrcode, out errmsg);
Program.oMainSAPDI.ShowMessage(errmsg, BoStatusBarMessageType.smt_Error);
}
Hope that helps.
Thanks & Regards
Ankit Chauhan
Hi,
Suppose you created a Sales Order. In that Sales Order you have an item with 5 Quantity but while making invoice against this particular Sales Order, you want to make Sales Invoice for only 3 quantities.
Then you can do this as I have provided. If you need to make full invoice then use only Base Entry and Base Line.
Hope it is clear.
Thanks & Regards
Ankit Chauhan
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.