I am getting some error while creating multiple records using deep insert.
I use expanded entity set output as request payload for creating multiple records in my custom table but it is throwing me error for which i am not able to figure out specific reason.
I created a dummy header entity and one child entity for actual table entries along with necessary association & navigation path. I tried using output from expanded entity set as input for my deep create but it it throws error. I then tried passing JSON string which again is throwing some different error.
Here is my XML output from expand operation :
Dummy header : ActionSet1
Line items : SaveCodeSet
<?xml version="1.0" encoding="utf-8" ?>
</m:properties>
</content>
</entry>
</content>
</entry>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
</entry>
</feed>
URL which i used for deep insert
/sap/opu/odata/sap/Z_ACTION_SRV/ActionSet1?
Error
<?xml version="1.0" encoding="utf-8" ?>
</error>
2nd Approach : JSON PAYLOAD directly in gateway client but still Error
URL for Deep Insert /sap/opu/odata/sap/Z_FI_PPV_SRV/ActionSet1?
{
"Bukrs": "0102",
"Action": "S",
"Type": "D",
"NavToSaveRc": [
{
"__metadata": {
"uri": "http://XXXXXXXXXX.YYYY/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')",
"type": "Z_FI_PPV_SRV.SaveCode"
},
"Bukrs": "0102",
"Belnr": "10000234",
"Gjahr": "2013",
"Plant": "0902",
"Matnr": "mat03",
"Prctr": "PC03",
},
{
"__metadata": {
"id": "http://XXXXYY/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')",
"uri": "http://xxxxxx/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')",
"type": "Z_FI_PPV_SRV.SaveCode"
},
"Bukrs": "0102",
"Belnr": "10000234",
"Gjahr": "2013",
"Plant": "0902",
"Matnr": "mat03",
"Prctr": "PC03",
},
{
"__metadata": {
"id": "http://XXXXXX/sap/opu/odata/sap/Z_ACTION_SRV/SaveSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')",
"uri": "http://xxxxxxxxxxxx/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')",
"type": "Z_FI_PPV_SRV.SaveCode"
},
"Bukrs": "0102",
"Belnr": "10000234",
"Gjahr": "2013",
"Plant": "0902",
"Matnr": "mat03",
"Prctr": "PC03",
}
] }
1ERROR MESSAGE
<?xml version="1.0" encoding="utf-8" ?>
</innererror>
</error>
}