Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

DraftKey population in a GoodsReceipt via XML file?

$
0
0

Howdy Guys,

So when promoting a GoodReceipt draft to a GoodReceipt though the GUI, The OIGN.DraftKey field is populated to indicate the GR's base Document.

However when I use the COM DI (SAPbobsCom) via:

 

SAPbobsCOM.Company Vcmp = new SAPbobsCOM.Company();

SAPbobsCOM.Documents oDraft = (SAPbobsCOM.Documents)Vcmp.GetBusinessObject(BoObjectTypes.oDrafts);

Vcmp.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;

oDraft.GetByKey(1)

oDraft.SaveXML(@"C:drafts.xml");

XmlDocument xml = new XmlDocument();

xml.Load(@"C:drafts.xml"); 

XmlNode Objectnode = xml.SelectSingleNode("/BOM/BO/AdmInfo/Object"); 

Objectnode.InnerText = "59";

xml.Save(@"C:drafts.xml");

SAPbobsCOM.Documents receipt =   (SAPbobsCOM.Documents)Vcmp.GetBusinessObjectFromXML(@"C:drafts.xml", 0);

int RetCode = receipt.Add();

 

OIGN's DraftKey is left unpopulated...


I'm looking for the best method to populate OIGN's DraftKey field with the draft's number.

if that's adding a node to the draft XML then what would the node/element naming convention be?

 

if it's doing something like this:

 

SAPbobsCOM.Documents oGR = (SAPbobsCOM.Documents)Vcmp.GetBusinessObject(BoObjectTypes.oInventoryGenEntry);

oGR.Draftkey.magic = 1;

 

Then what's the syntax..

 

if i'd have to go back and update the DraftKey field via SQL(yikes, I'd rather not).. What would the fallout be?

 

Thanks in advance guys!

 

SteveZ


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>