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

Re: Batch Process Vs Create Deep Entity

$
0
0

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 itemsSaveCodeSet

 

 

<?xml version="1.0" encoding="utf-8" ?>

 

-<feed xml:base="http://xxxx.yyy/sap/opu/odata/sap/Z_ACTION_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">

 

 

 

<title type="text">ActionSet1</title>

 

 

<updated>2015-09-15T03:50:08Z</updated>

 

 

-<author>

 

 

<name/>

 

</author>

 

<linkhref="ActionSet1" rel="self" title="ActionSet1" />

 

 

-<entry>

 

 

 

<title type="text">ActionSet1('0102')</title>

 

 

<updated>2015-09-15T03:50:08Z</updated>

 

 

<categoryterm="Z_ACTION_SRV.Action1" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

 

 

<linkhref="PpvActionSet1('0102')" rel="edit" title="PpvAction1" />

 

 

-<link href="PpvActionSet1('0102')/NavToSaveRc" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/NavToSaveRc" type="application/atom+xml;type=feed" title="NavToSaveRc">

 

 

-<m:inline>

 

 

-<feed xml:base="http://xxxx.yyy/sap/opu/odata/sap/Z_ACTION_SRV/">

 

 

<id>http://sapdev01a.corp.jabil.org:8010/sap/opu/odata/sap/Z_ACTION_SRV/ActionSet1('0102')/NavToSaveRc</id>

 

 

<title type="text">SaveReasonCodeSet</title>

 

 

<updated>2015-09-15T03:50:08Z</updated>

 

 

-<author>

 

 

<name/>

 

</author>

 

<linkhref="ActionSet1('0102')/NavToSaveRc" rel="self" title="SaveCodeSet" />

 

 

-<entry>

 

 

<id>http://sapdev01a.corp.jabil.org:8010/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')</id>

 

 

<title type="text">SaveReasonCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')</title>

 

 

<updated>2015-09-15T03:50:08Z</updated>

 

 

<categoryterm="Z_FI_PPV_SRV.SaveCode" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

 

 

<linkhref="SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')" rel="edit" title="SaveCode" />

 

 

-<content type="application/xml">

 

 

-<m:properties>

 

 

<d:Bukrs>0102</d:Bukrs>

 

 

<d:Belnr>10000234</d:Belnr>

 

 

<d:Gjahr>2013</d:Gjahr>

 

 

<d:Plant>0902</d:Plant>

 

 

<d:Matnr>mat03</d:Matnr>

 

 

<d:Prctr>PC03</d:Prctr>

 

 

 

</m:properties>

</content>

</entry>

 

-<entry>

 

 

<id>http://sapdev01a.corp.jabil.org:8010/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')</id>

 

 

<title type="text">SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')</title>

 

 

<updated>2015-09-15T03:50:08Z</updated>

 

 

<categoryterm="Z_FI_PPV_SRV.SaveCode" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

 

 

<linkhref="SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')" rel="edit" title="SaveCode" />

 

 

-<content type="application/xml">

 

 

-<m:properties>

 

 

<d:Bukrs>0102</d:Bukrs>

 

 

<d:Belnr>10000234</d:Belnr>

 

 

<d:Gjahr>2013</d:Gjahr>

 

 

<d:Plant>0902</d:Plant>

 

 

<d:Matnr>mat03</d:Matnr>

 

 

<d:Prctr>PC03</d:Prctr>

 

 

</m:properties>

</content>

</entry>

 

-<entry>

 

 

<id>http://sapdev01a.corp.jabil.org:8010/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')</id>

 

 

<title type="text">SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')</title>

 

 

<updated>2015-09-15T03:50:08Z</updated>

 

 

<categoryterm="Z_FI_PPV_SRV.SaveCode" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

 

 

<linkhref="SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')" rel="edit" title="SaveCode" />

 

 

-<content type="application/xml">

 

 

-<m:properties>

 

 

<d:Bukrs>0102</d:Bukrs>

 

 

<d:Belnr>10000234</d:Belnr>

 

 

<d:Gjahr>2013</d:Gjahr>

 

 

<d:Plant>0902</d:Plant>

 

 

<d:Matnr>mat03</d:Matnr>

 

 

<d:Prctr>PC03</d:Prctr>

 

 

 

</m:properties>

</content>

</entry>

</feed>

</m:inline>

</link>

 

<linkhref="ActionSet1('0102')/$links/NavToSaveRc" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/NavToSaveRc" type="application/xml" title="NavToSaveRc" />

 

 

-<content type="application/xml">

 

 

-<m:properties>

 

 

<d:Bukrs>0102</d:Bukrs>

 

 

<d:Action>S</d:Action>

 

 

<d:Type>D</d:Type>

 

</m:properties>

</content>

</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 xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

 

 

<code>005056A509B11ED199D882461C8C60FE</code>

 

 

<message xml:lang="en">The server is refusing to process the request because the entity has a unsupported format</message>

 

</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": {

                "id": "http://sapdev01a.corp.jabil.org:8010/sap/opu/odata/sap/Z_ACTION_SRV/SaveCodeSet(Bukrs='0102',Belnr='10000234',Gjahr='2013')",

                "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" ?>

 

-<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

 

 

<code>CX_XSLT_RUNTIME_ERROR/EE1D984A671BED4AAD4D1BD10D509C75</code>

 

 

<message xml:lang="en">No valid source context supplied</message>

 

 

-<innererror>

 

 

<transactionid>55F7FE566E02475BE1000000AC1FEA49</transactionid>

 

 

<errordetails/>

 

</innererror>

</error>



}

     





Viewing all articles
Browse latest Browse all 3354

Trending Articles



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