cancel
Showing results for 
Search instead for 
Did you mean: 

Deep entity in JSON

Former Member
0 Kudos

Hi expert,

I implemented deep entity and it works for XML format.

I want to test it with JSON format.

Could you please help me to change this format to JSON as my HTTP Request input ?

and also please let me know what should i use in the Header for JSON ?

Header :

* X-CSRF-Token

* Content-Type : application/atom+xml

HTTP Request in XML

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

<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:d=
"http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m=
"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<atom:content type=
"application/xml">
<m:properties>
<d:DealerID>ABC1234</d:DealerID>

<d:DealerName>Dealer Automotive</d:DealerName>

<d:Street>123 Main Street</d:Street>

<d:City>Southfield</d:City>

<d:State>MI</d:State>

<d:PostalCode>40834</d:PostalCode>
</m:properties>
</atom:content>

<atom:link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/BankSet"

type="application/atom+xml;type=feed"

title="ZMASTERDATA_SRV.Bank">

<m:inline>

<atom:feed>

<atom:entry>

<atom:content type="application/xml">

<m:properties>

<d:BankAcct>1234567892</d:BankAcct>
<d:BankKey>122000247</d:BankKey>
<d:DealerID>ABC1234</d:DealerID>
<d:BankDetailID>TES8</d:BankDetailID>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

  </atom:entry>

Thank you in advance,

-Martin Darmawi-

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

Hi Martin,

I have not done this, but this is how I would approach.

In the GW Client, I would do a $expand with $format=json.

Then do a 'use as request'.

I believe the headers should be populated on its own.

Thanks

Krishna

Former Member
0 Kudos

Hi Krishna,

it works with XML to 'use as request' - but it does NOT work for JSON for some reason.

This is the error message that I got

{

error:

{

code: "CX_SXML_PARSE_ERROR/001560AA0E081DEB8CA398CC1690D406"

message:

{

lang: "en"

value: "Error while parsing an XML stream"

}

-

innererror:

{

transactionid: "698E5BE3294BF1878C53842B2BFC45C1"

errordetails:

[ } } -
}

Please let me know what you think.

Thank You,
-Martin Darmawi-
kammaje_cis
Active Contributor
0 Kudos

The error message means that it is considering the input as xml, and definitely parser will fail.

Can you try passing the request header

Content-Type :application/json

Former Member
0 Kudos

Hi Krishna,

Yes, I passed the following request header :

* X-CSRF-Token

* Content-Type : application/json

* Accept : application/json

and I still got the same error.

I am not sure why they still consider my HTTP input request as XML.

Any thoughts ?

Thank You,

-Martin Darmawi-

kammaje_cis
Active Contributor
0 Kudos

In this blog, author uses json data. UTF-8 might be required? But I do not think it should make any difference. Anyway check this out.

http://scn.sap.com/community/mobile/blog/2013/04/15/json-post-put-on-gateway

Former Member
0 Kudos

Hi Krishna,

Thanks for the link.

Yeah, i added UTF-8 in 'Content-Type' - I still got the same problem.

Not sure what is the problem.

Thank You,

-Martin Darmawi-

arunchembra1
Participant
0 Kudos

Hi Martin,

I am also facing the same issue it works for XML format and its not working with JSON format. Please let me know how you solved this issue.

Thanks,

Arun

Former Member
0 Kudos

Hi Arun,

Can you give me your JSON file format ?

maybe i can take a look.

Thank You,

-Martin Darmawi-

arunchembra1
Participant
0 Kudos

Hi Martin,

Thanks .......

Get Deep Entity : /sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFHEADER('000010000012')/?$expand=QMNUM

I am using the above URL for Get Deep Entity in Gateway Client,once i get the response i am using the same for create .

URL For Create Deep Entity :

http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFHEADER

Header:  X-CSRF-==487fvi6p89p9-0unt8oh

            Content-Type : application/json

            Accept : application/json

{

"d":{

"__metadata":{

"uri":"http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFHEADER('10000012')","type":"ZMOB_AASTMGMT_SRV.NOTIFHEADER"},

"Breakdown":"X",

"Equipment":"10000002",

"LocAcc":"000000002216",

"Planplant":"1100",

"NotifNo":"10000012",

"NotifType":"ZB",

"ShortText":"Pump cavitating",

"Priotype":"PM",

"CreatedOn":"\/Date(1384992000000)\/",

"Notiftime":"PT14H57M11S",

"NotifDate":"\/Date(1384992000000)\/",

"PmWkctr":"10000178",

"Desstdate":"\/Date(1384992000000)\/","QMNUM":{

"results":[{

"__metadata":{

"uri":"http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFITEM(NotifNo='10000012',ItemKey='0001')","type":"ZMOB_AASTMGMT_SRV.NOTIFITEM"},

"NotifNo":"10000012",

"ItemKey":"0001",

"CreatedDate":"\/Date(1384992000000)\/",

"Prilang":"E",

"PosTime":"PT14H03M33S",

"ChangeTime":"PT00H00M00S",

"ItemSortNo":"0001"}]}}}

Thanks,

Arun

vadrevu_kk
Participant
0 Kudos

Hi Arun,

Can you try without dates first, if those are not mandatory. I think date format is wrong. Please check all properties and formats also.

Rgds,

Kiran.

Former Member
0 Kudos

Hi,

I am also working on same problem.. posting Json format data using deep entity method.. Did you got success is solving it..

Regards

Rajesh

vadrevu_kk
Participant
0 Kudos

Hi Rajesh,

Yes am able to post with deep entity using Json format.

What is the issue you are facing?

Rgds,

Kiran.

Former Member
0 Kudos

Thanks Kiran for responding..

It is giving me XML parsing error.. seems like it is expecting XML in request body...

How to proceed on this..

Thanks

vadrevu_kk
Participant
0 Kudos

No Rajesh, It is not expecting XML. Your Json data is wrong. Please check types and also any empty properties.

Rgds,

Kiran.

former_member184867
Active Contributor
0 Kudos

Hi Kiran,

Deep insert with empty field in JSON payload leads to parsing error. Checkout note 1874920

Regards,

Atanu

Former Member
0 Kudos

Thanks Atanu,

After looking at note seems like we have to implement this.. any how I have tried to POST the data in Json format with all values, no empty field.. still its giving XML parsing error..

Thanks

binson
Advisor
Advisor
0 Kudos

Hi Martin, Hi Arun,

The request body should not have below text for deep entity:-

{"results":

So, please remove text :-

{"results":

and corresponding closing bracket.

}

So Arun, after removing unwanted text, your request should be :-

{

"d":{

"__metadata":{

"uri":"http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFHEADER('10000012')","type":"ZMOB_AASTMGMT_SRV.NOTIFHEADER"},

"Breakdown":"X",

"Equipment":"10000002",

"LocAcc":"000000002216",

"Planplant":"1100",

"NotifNo":"10000012",

"NotifType":"ZB",

"ShortText":"Pump cavitating",

"Priotype":"PM",

"CreatedOn":"\/Date(1384992000000)\/",

"Notiftime":"PT14H57M11S",

"NotifDate":"\/Date(1384992000000)\/",

"PmWkctr":"10000178",

"Desstdate":"\/Date(1384992000000)\/","QMNUM":[{

"__metadata":{

"uri":"http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFITEM(NotifNo='10000012',ItemKey='0001')","type":"ZMOB_AASTMGMT_SRV.NOTIFITEM"},

"NotifNo":"10000012",

"ItemKey":"0001",

"CreatedDate":"\/Date(1384992000000)\/",

"Prilang":"E",

"PosTime":"PT14H03M33S",

"ChangeTime":"PT00H00M00S",

"ItemSortNo":"0001"}]}}

Please try it and let me know the results.

Regards,

Binson

arunchembra1
Participant
0 Kudos

Thanks Binson.............. the  issue got resolved

Former Member
0 Kudos

Hi,

We where able to resolve the issue after implementing Note # 1874920 and removing results tag

opening '{   "results" ' and corresponding closing '}'.

Thanks for useful inputs..

Regards,

Rajesh

Former Member
0 Kudos

hi Arun,

Will u share how u solve the issue, i am also following Binson format but still I am getting the error

"Error while parsing an XML stream" in response.I dont know where i am going wrong.

Here is My code

<script type="text/javascript">

var header_xcsrf_token;

OData.request

       ({

            requestUri: "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

                  method: "GET",

                  headers:

                      {    

                                     "X-Requested-With": "XMLHttpRequest",

                                     "Content-Type": "application/atom+xml",

                                     "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                                     "DataServiceVersion": "2.0",      

                                     "X-CSRF-Token":"Fetch"  

                      }          

               },

                function (data, response)

                {

                header_xcsrf_token = response.headers['x-csrf-token'];

                     alert("xcrf"+ header_xcsrf_token);

                     //alert(data[0]);

                }

         );

function create()

{

var requestOptions = {

  "d":{

  "__metadata": {

  "uri": "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders(Plant='0100',SLOC='0100',Material='',PINo='0000000000',Fiscalyear='0000')",

  "type": "ZPHYSICALINVENTORYCREATE.PIHeader"

  },

  "Plant": "0100",

  "SLOC": "0100",

  "Material": "",

  "PINo": "0000000000",

  "Fiscalyear": "0000",

  "SpecialStock": "",

  "DocumentDate": "\/Date(1385769600000)\/",

  "PlannedDate": "\/Date(1385769600000)\/",

  "PostingBlock": "",

  "FreezeBookInv": "",

  "DelBatches": "",

  "PIRefNo": "",

  "GroupingType": "",

  "PINoLong": "",

  "PIRefLong": "",

  "PIItems":{

  //[

  "results":[  

            {

            "__metadata": {

            "uri": "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIItems(Material='000000000000000230',PINo='',Fiscalyear='0000')",

            "type": "PHYSICALINVENTORYCREATE.PIItem"

            },

           

            "BatchNumber": "0000000000",

            "Material": "000000000000000230",

            "PINo": "",

            "Fiscalyear": "0000",

            "StockType": "1",

            "HandlingUOM": "X",

            "SalesOrder": "",

            "ItemNum": "000001",

            "VendorAccNo": "",

            "CustAccNo": "",

            "WBSElement": "",

            "LongMatnr": "",

            "ExternalGUID": "",

            "VerNo": "",

             

            } ] },

 

  }

};

//OData.request(requestOptions, AddSuccessCallback, AddErrorCallback);

OData.request({

  requestUri: "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

  method: "POST",

    data: requestOptions,

    headers:

    {    

                  "X-Requested-With": "XMLHttpRequest", 

                     "Content-Type": "application/json;charset=UTF-8",

                

                      "DataServiceVersion": "2.0",  

                     // "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                     "Accept": "application/json",

                      "X-CSRF-Token":header_xcsrf_token  

                 

    } , 

    user:"xxxxxx",

    password:"xxxxxx"

},AddSuccessCallback, AddErrorCallback,null);

}

function AddSuccessCallback(data, request)

{

  alert("successfull" );

  

}

//AddUser Error Callback

function AddErrorCallback(error)

{

 

   alert("error    "+error.message);

}

</script>

Firstly through GET i am fetching ths XCSRF token then use this token while POST request,

Thanks in advance

Regards

Syed Shadan Quaiser

Former Member
0 Kudos

Hi Syed,

Please check the above post maybe its useful, you have to remove "result" for payload and also check for note if it is implemented in you ECC box.

"

We where able to resolve the issue after implementingNote # 1874920 and removing results tag

opening '{   "results" ' and corresponding closing '}'."

"

Regards,

Rajesh

Former Member
0 Kudos

HI Rajesh,

I have already removed the "result" part. but  still its giving me same error.

just want to know that the SAP Note#1874920 is applicable only when POST in JSON format

or in POST through XML as well.

How to achieve the same in XML format.

Anyone Who has done please Guide.

Regards

Syed Shadan Quaiser

Former Member
0 Kudos

HI Syed,

You need to implement this note if you want to receive data in Json format..As per my understanding for xml format you don't need to do anything..

What error you getting while using XML format ?

Regards,

Rajesh

Former Member
0 Kudos

Hi Krishna,

will u please help in achieving deep insert in json format.

below  i have pasted the code..

Here is My code

<script type="text/javascript">

var header_xcsrf_token;

OData.request

       ({

            requestUri: "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

                  method: "GET",

                  headers:

                      {   

                                     "X-Requested-With": "XMLHttpRequest",

                                     "Content-Type": "application/atom+xml",

                                     "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                                     "DataServiceVersion": "2.0",     

                                     "X-CSRF-Token":"Fetch" 

                      }         

               },

                function (data, response)

                {

                header_xcsrf_token = response.headers['x-csrf-token'];

                     alert("xcrf"+ header_xcsrf_token);

                     //alert(data[0]);

                }

         );

function create()

{

var requestOptions = {

  "d":{

  "__metadata": {

  "uri": "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders(Plant='0100',SLOC='0100',Material='',PINo='0000000000',Fiscalyear='0000')",

  "type": "ZPHYSICALINVENTORYCREATE.PIHeader"

  },

  "Plant": "0100",

  "SLOC": "0100",

  "Material": "",

  "PINo": "0000000000",

  "Fiscalyear": "0000",

  "SpecialStock": "",

  "DocumentDate": "\/Date(1385769600000)\/",

  "PlannedDate": "\/Date(1385769600000)\/",

  "PostingBlock": "",

  "FreezeBookInv": "",

  "DelBatches": "",

  "PIRefNo": "",

  "GroupingType": "",

  "PINoLong": "",

  "PIRefLong": "",

  "PIItems":{

  //[

  "results":[ 

            {

            "__metadata": {

            "uri": "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIItems(Material='000000000000000230',PINo='',Fiscalyear='0000')",

            "type": "PHYSICALINVENTORYCREATE.PIItem"

            },

          

            "BatchNumber": "0000000000",

            "Material": "000000000000000230",

            "PINo": "",

            "Fiscalyear": "0000",

            "StockType": "1",

            "HandlingUOM": "X",

            "SalesOrder": "",

            "ItemNum": "000001",

            "VendorAccNo": "",

            "CustAccNo": "",

            "WBSElement": "",

            "LongMatnr": "",

            "ExternalGUID": "",

            "VerNo": "",

            

            } ] },

  }

};

//OData.request(requestOptions, AddSuccessCallback, AddErrorCallback);

OData.request({

  requestUri: "http://xxxxxxxxxxxx.com:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

  method: "POST",

    data: requestOptions,

    headers:

    {   

                  "X-Requested-With": "XMLHttpRequest",

                     "Content-Type": "application/json;charset=UTF-8",

               

                      "DataServiceVersion": "2.0", 

                     // "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                     "Accept": "application/json",

                      "X-CSRF-Token":header_xcsrf_token 

                

    } ,

    user:"xxxxxx",

    password:"xxxxxx"

},AddSuccessCallback, AddErrorCallback,null);

}

function AddSuccessCallback(data, request)

{

  alert("successfull" );

 

}

//AddUser Error Callback

function AddErrorCallback(error)

{

   alert("error    "+error.message);

}

</script>

Help me with this code

Thanks and regard

Syed shadan quaiser

Former Member
0 Kudos

Hi Arun,

I am facing a similar issue. i have implemented all the steps mentioned here. still i am getting the

"XML PARSING ERROR",Here is my code..

can u notice any error in this,then please let me know.

<script type="text/javascript">

var header_xcsrf_token;

OData.request

       ({

            requestUri: "http://xxxxxxxxxx:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

                  method: "GET",

                  headers:

                      {    

                                     "X-Requested-With": "XMLHttpRequest",

                                     "Content-Type": "application/atom+xml",

                                     "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                                     "DataServiceVersion": "2.0",      

                                     "X-CSRF-Token":"Fetch"  

                      }          

               },

                function (data, response)

                {

                header_xcsrf_token = response.headers['x-csrf-token'];

                     alert("xcrf"+ header_xcsrf_token);

                     //alert(data[0]);

                }

         );

function create()

{

var requestOptions = {

  "d":

  //{

  {

  "__metadata": {

  "uri": "http://xxxxxxxxxx:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders(Plant='0100',SLOC='0100',...')",

  "type": "ZPHYSICALINVENTORYCREATE.PIHeader"

  },

  "Plant": "0100",

  "SLOC": "0100",

  "Material": "",

  "PINo": "0000000000",

  "Fiscalyear": "0000",

  "SpecialStock": "",

  "DocumentDate": "\/Date(1385769600000)\/",

  "PlannedDate": "\/Date(1385769600000)\/",

  "PostingBlock": "",

  "FreezeBookInv": "",

  "DelBatches": "",

  "PIRefNo": "",

  "GroupingType": "",

  "PINoLong": "",

  "PIRefLong": "",

  "PIItems":

  // {

  [

  //"results":[  

            {

            "__metadata": {

            "uri": "http://xxxxxxxxxx:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIItems(Material='00000000000000023...')",

            "type": "PHYSICALINVENTORYCREATE.PIItem"

            },

           

            "BatchNumber": "0000000000",

            "Material": "000000000000000230",

            "PINo": "",

            "Fiscalyear": "0000",

            "StockType": "1",

            "HandlingUOM": "X",

            "SalesOrder": "",

            "ItemNum": "000001",

            "VendorAccNo": "",

            "CustAccNo": "",

            "WBSElement": "",

            "LongMatnr": "",

            "ExternalGUID": "",

            "VerNo": ""

           

           

           

         //end of first object  

            }

           

          //result  ]

           

           

           

            //end of array

            ]

  // },

  //end of d

  }

  //}

};

//OData.request(requestOptions, AddSuccessCallback, AddErrorCallback);

OData.request({

  //requestUri: "http://xxxxxxxxxx:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

  requestUri:"http://xxxxxxxxxx:8000/sap/opu/odata/sap/PHYSICALINVENTORYCREATE/PIHeaders",

  method: "POST",

    data: requestOptions,

    headers:

    {    

                  "X-Requested-With": "XMLHttpRequest", 

                     "Content-Type": "application/json;charset=UTF-8",

                    // "Content-Type":"charset=UTF-8"

                    // "Content-Type":"multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b",

                      "DataServiceVersion": "2.0",  

                     // "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                     "Accept": "application/json",

                      "X-CSRF-Token":header_xcsrf_token  

                 

    } , 

    user:"xxxxxz",

    password:"xxxxxxx"

},AddSuccessCallback, AddErrorCallback,null);

}

function AddSuccessCallback(data, request)

{

  alert("successfull" );

}

//AddUser Error Callback

function AddErrorCallback(error)

{

 

   alert("error    "+error.message);

}

</script>

We are already on higher version.hence the SAP NOTE is not applicable.

Regards

Syed Shadan Quaiser

Former Member
0 Kudos

hi Arun,

can u share how you resolved this issue.

I am also getting Xml parsing error.

regards

syed shadan quaiser

arunchembra1
Participant
0 Kudos

Hi Syed,

Sorry for the delay..... please find the below request body its working for me.

The issue which i faced because of

{"results":

and corresponding closing bracket.

}

URL : http://XXXXXXXX:8000/sap/opu/odata/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/NOTIFHEADER

Header:  X-CSRF-==487fvi6p89p9-0unt8oh

            Content-Type : application/json

            Accept : application/json

Request Body:

{

"d":{

"__metadata":{

"uri":"http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/

NOTIFHEADER('10000012')","type":"ZMOB_AASTMGMT_SRV.NOTIFHEADER"},

"NotifLongtext": " Test ",

"Maintloc": "100",

"NotifNo": "10000012",

"Maintplant": "1100",

"Planplant": "1100",

"LocAcc": "000000002216",

"AddrNumber": "22874","QMNUM":

[{

"__metadata":{

"uri":"http://XXXXXXXX:8000/sap/opu/odata/sap/ZMOB_AASTMGMT_SRV/

NOTIFITEM(NotifNo='10000012',ItemKey='0001')","type":"ZMOB_AASTMGMT_SRV.NOTIFITEM"},

"NotifNo":"10000012",

"ItemKey":"0001",

"CreatedDate":"\/Date(1384992000000)\/",

"Prilang":"E",

"PosTime":"PT14H03M33S",

"ChangeTime":"PT00H00M00S",

"ItemSortNo":"0001"}]}}

Thanks,

Arun

arunchembra1
Participant
0 Kudos

Hi Syed,

First can you try using REST client and make sure its working.

Thanks,

Arun

Former Member
0 Kudos

check this SAP Note:

http://service.sap.com/sap/support/notes/1922411

Build your JSON File from your GET Request and remove the "result" Tag as mentioned in this thread.

kammaje_cis
Active Contributor
0 Kudos

Let me Summarize checklist for Deep Insert with JSON. Hope it helps anyone coming here looking for a solution.

1. Implement Note 1874920

2. Ensure header Content-Type: application/json

3. In the request body, remove "results", "d" nodes

4. In any json string, last json property/value set should not have a 'comma' at the end

5. If a navigation property points to a multiple cardinality entity, then corresponding json value should be an array, even if it has single value/entry. ([ ]).

If a navigation property points to single cardinality entity, then corresponding json value should not be an array. ({ })

GowthamRaja
Participant
0 Kudos

Hi Arun,

I am facing issue with json input body for deep_entity post method.

Please correct my coding is correct or not.

{

                "SO_ID": "0",

                "CURRENCY": "EUR",

                "DOC_TYPE": "TA",

                "DOC_DATE": "2015-07-27T00:00:00",

                "SALES_ORG": "1000",

                "DIST_CHANNEL": "10",

                "DIVISION": "00",

                "SALES_GRP": "130",

                "SALES_OFF": "1030",

                "REQ_DATE_H": null,

                "PURCH_DATE": null,

                "INCOTERMS1": "CIP",

                "INCOTERMS2": "Nürnberg",

                "PMNTTRMS": "ZB01",

                "PRICE_DATE": "2015-07-27T00:00:00",

                "PURCH_NO_C": "TEST ORDER",

"SO_ITEMSet":[{

                            "SO_ID": "0",

                            "ITEM_NO": "000010",

                            "MAT_NO": "100-100",

                            "PLANT": "1000",

                            "TARGET_QTY": "4",

                            "TARGET_QU": "ST",

                            "ITEM_CATEG": "TAN",

                            "PURCH_NO_C": "TEST ORDER",

                            "PURCH_DATE": "2015-07-27T00:00:00",

                            "INCOTERMS1": "CIP",

                            "INCOTERMS2": "Nürnberg",

                            "PMNTTRMS": "ZB01",

                            "PRICE_DATE": "2015-07-27T00:00:00",

                            "SALES_UNIT": "ST",

                            "DIVISION": "00",

                            "CURRENCY": "EUR"

}]

}

From the above header details working fine. but item details are empty in the structure.

Please help me.

vadrevu_kk
Participant
0 Kudos

Hi Gowtham,

I did not see any wrong in format. Are you getting nay error?

Rgds,

Kiran.

GowthamRaja
Participant
0 Kudos

i am getting the item details "SO_ITEMSet" structure as empty.

vadrevu_kk
Participant
0 Kudos

Did You declare like this?

TYPES: BEGIN OF ty_s_carrier_flights.

     INCLUDE TYPE scarr.

     TYPES:

            carrierflights TYPE ty_t_sflight, "Should be same as navigation property name

            END OF ty_s_carrier_flights.

Pavan_Golesar
Active Participant
0 Kudos

Hello Ashwin Dutt R.

Regards

Pavan

Answers (0)