how to create a downpayment from odraft document
I need to know how to créate a downpayment from odraft document. My application créate all the document as draft, but I want to make a process automatic for creation my all odraft payment.
my versión for di api is sap 2007. I dont know how to do it. for please help me.
Edy Simon replied
Are you referring to converting a Draft Object into the actual document ?
In SAP 2007, there is no easy way of doing this,
You have 2 options.
1. Load the draft object, create a new document object and copy each properties one by one.
2. Load the draft object. Call the oDoc.SaveXML(FileName) method to save it to an xml file. Modify the XML to change the ObjectType from 112 to the Desired ObjectType and use the oCompany.GetBusinessObjectFromXML to load it as document object.
Note. to use the XML method, before you call the SaveXML, set
oCompany.XmlExportType = BoXmlExportTypes.xet_ExportImportMode
Aside from changing the objecttype in the xml file, some values you will need to change also.
You need to test it and look at the error to know what all the fields that need changes.