on 07-11-2016 10:39 AM
Hi all,
I have a question related to XML.
I'm not good in XML, but according to my example of tags and screenshots I can write XML tags which have CardCode and Dates of GRPO.
The problem I have now is I do know how I can include document rows in my tags
Example of tags
<?xml version="1.0" encoding="utf-8"?>
<GRPO>
<Goods>
<CardCode>V10000</CardCode>
<DocDate>07/11/2016</DocDate>
<DocDueDate>07/11/2016</DocDueDate>
<TaxDate>07/11/2016</TaxDate>
</Goods>
<Goods>
<CardCode>V1010</CardCode>
<DocDate>07/11/2016</DocDate>
<DocDueDate>07/11/2016</DocDueDate>
<TaxDate>07/11/2016</TaxDate>
</Goods>
</GRPO>
Screenshots
I want to have the above data in XML,
How can I include document rows in my XML tags?
Please anyone can help me.
Hi,
With all B1 related xml documents it is easiest is to first see what format the system outputs. You could adapt this code to get the xml representation of a multi-row GRPO:
Dim YourMultiRowGRPOnumber As Integer
Dim doc As SAPbobsCOM.Documents
doc = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
If doc.GetByKey(YourMultiRowGRPOnumber) Then
doc.GetAsXML()
End If
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johan,
I want to do a third party in php which will help me to import data in SAP B1 from XML file, so what I want to know is how the document headers and rows of GRPO can be written in XML tags in order to know how I will access data from XML file. From now I can access data from XML file but which has one row, I do know how to write XML tags which has more than one rows.
Hi,
Are you writing the 3rd party and in control of the format ?
If yes, I suggest you to follow what Johan pointed.
Following SAP's format of XML will help you greatly.
Example, with it's format you can just load the document and add it straight away without having to fill up each properties.
Note please set
oCompany.XmlExportType= BoXmlExportTypes.xet_ExportImportMode
Before exporting the document.
Regards
Edy
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.