on 10-03-2005 4:27 AM
Hi,
Does DIAPI support saving a marketing document (SO, PO) as a draft?
Thanks,
Satish.
Hi Satish!
Yes, DI include a special BusinessObject for that purpose.
SAPbobsCOM.Documents oDraft, oDocFrom;
oDraft = (SAPbobsCOM.Documents)pCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts);
oDocFrom = (SAPbobsCOM.Documents)pCmpFrom.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
....
....
// doc type
oDraft.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPurchaseInvoices;
oDraft.CardCode = tbVendorCode.Text.Trim();
oDraft.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO;
oDraft.DocDate = oDocFrom.DocDate;
for (int i=0; i<oDocFrom.Lines.Count; i++)
{
oDocFrom.Lines.SetCurrentLine(i);
oDraft.Lines.ItemCode = oDocFrom.Lines.ItemCode;
oDraft.Lines.ItemDescription = oDocFrom.Lines.ItemDescription;
oDraft.Lines.Quantity = oDocFrom.Lines.Quantity;
oDraft.Lines.Price = oDocFrom.Lines.Price;
oDraft.Lines.WarehouseCode = tbWHCode.Text.Trim();
oDraft.Lines.Add();
}
HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
8 | |
7 | |
4 | |
4 | |
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.