on 03-27-2018 2:57 AM
Hi
I have some difficulty getting an input into SAP B1 BP Master.
What I want to do is to get the following json code, transform it in B1iF and eventually create a BP Master record.
What I am not clear is how to do the transformation in B1iF.
My inbound data is shown below. I can get it in B1iF using RESTful and POST.
{
"BPMaster":[{
"CustomerName": "ABC New-Aotao",
"Address": "Unit 13/79-85 Mars Road, Earth, XYZ 2066",
"BusinessName": "ABC New",
"IsGroup": true
}]
}
Does someone have an example I can follow to get this working or provide step by step instructions?
Thank you
Regards
Ashvin
Hello,
I think what you need is an XSL transformation and a B1 object call.
An simple example:(Not full example)
<xsl:template name="transform">
<BusinessPartners>
<row>
<CardCode>C0620</CardCode>
<CardName>
<xsl:value-of select="$msg/bfa:io/bfa:object/bfa:array/bfa:object/bfa:string[./@name='CustomerName']"></xsl:value-of>
</CardName>
</row>
</BusinessPartners>
</xsl:template>
The test result:
<Payload xmlns="urn:com.sap.b1i.vplatform:entity" Role="S">
<io xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="json">
<object>
<array name="BPMaster">
<object>
<string name="CustomerName">ABC New-Aotao</string>
<string name="Address">Unit 13/79-85 Mars Road, Earth, XYZ 2066</string>
<string name="BusinessName">ABC New</string>
<bool name="IsGroup">true</bool>
</object>
</array>
</object>
</io>
</Payload>
<vpf:Payload xmlns="urn:com.sap.b1i.vplatform:entity" Role="X" id="atom2" ts="2018/06/20 06:25:23">
<BusinessPartners xmlns="">
<row>
<CardCode>C0620</CardCode>
<CardName>ABC New-Aotao</CardName>
</row>
</BusinessPartners>
</vpf:Payload>
<Payload xmlns="urn:com.sap.b1i.vplatform:entity" Role="C" id="atom1" system="0010000100" status="success" b1login="Technical User" method="Synchronous Insert with fallback to Update" objectid="2" payload="atom2"keyname="CardCode" keyvalue="" DIresult="success" DImsg="C0620"/>
Thanks & best regards
Huan Yang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
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.