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

Re: Posting data in Json format in OData services

$
0
0

Hi Binson,

 

I have done as you suggested.. any how its still not working and giving same error.. I am sharing the payload with you.. If you can point out and correct. I have added my comments on rows which I have removed..

 

{

  "d" : {

    "__metadata" : {

      "id" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Headers(Pernr='00000016',Fromdate=datetime'2013-12-24T00%3A00%3A00',Todate=datetime'2013-12-29T00%3A00%3A00',Profile='Z_TE01')",

      "uri" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Headers(Pernr='00000016',Fromdate=datetime'2013-12-24T00%3A00%3A00',Todate=datetime'2013-12-29T00%3A00%3A00',Profile='Z_TE01')",

      "type" : "ZPA_TIMESHEET_T_SRV.Emp_Header",

      "properties" : {

        "Emp_Times" : {

          "associationuri" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Headers(Pernr='00000016',Fromdate=datetime'2013-12-24T00%3A00%3A00',Todate=datetime'2013-12-29T00%3A00%3A00',Profile='Z_TE01')/$links/Emp_Times"

        }

      }

    },

    "Pernr" : "00000016",

    "Fromdate" : "\/Date(1387843200000)\/",

    "Todate" : "\/Date(1388275200000)\/",

    "Profile" : "Z_TE01",

    "Emp_Times" :

**** Here I have removed the result     { "results" :

  [

        {

          "__metadata" : {

            "id" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Times(Counter='000000000588',Pernr='00000016',Profile='Z_TE01',Todate=datetime'2013-12-29T00%3A00%3A00',Fromdate=datetime'2013-12-24T00%3A00%3A00')",

            "uri" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Times(Counter='000000000588',Pernr='00000016',Profile='Z_TE01',Todate=datetime'2013-12-29T00%3A00%3A00',Fromdate=datetime'2013-12-24T00%3A00%3A00')",

            "type" : "ZPA_TIMESHEET_T_SRV.Emp_Time",

            "properties" : {

              "Emp_Headers" : {

                "associationuri" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Times(Counter='000000000588',Pernr='00000016',Profile='Z_TE01',Todate=datetime'2013-12-29T00%3A00%3A00',Fromdate=datetime'2013-12-24T00%3A00%3A00')/$links/Emp_Headers"

              }

            }

          },

          "Counter" : "000000000588",

          "Lstar" : "H11",

          "Lstnr" : "",

          "Rkostl" : "",

          "Rproj" : "U-010000038.0010",

          "Approved" : "",

          "Awart" : "",

          "Lgart" : "",

          "Tasktype" : "",

          "Status" : "40",

          "Refcounter" : "",

          "Reason" : "",

          "Catshours" : "7.00",

          "Catsamount" : "0.00",

          "ZzworkLoc" : "WL01",

          "Zzcreason" : "",

          "ZzlabortypeDesc" : "",

          "Action" : "",

          "Pernr" : "00000016",

          "Workdate" : "\/Date(1388016000000)\/",

          "Skostl" : "C120699998",

          "ZzLabortype" : "",

          "ZzBillFlag" : "",

          "ZzTask" : "",

          "Profile" : "Z_TE01",

          "Todate" : "\/Date(1388275200000)\/",

          "Fromdate" : "\/Date(1387843200000)\/",

          "Emp_Headers" : {

            "__deferred" : {

              "uri" : "http://<**********>/sap/opu/odata/sap/ZPA_TIMESHEET_T_SRV/Emp_Times(Counter='000000000588',Pernr='00000016',Profile='Z_TE01',Todate=datetime'2013-12-29T00%3A00%3A00',Fromdate=datetime'2013-12-24T00%3A00%3A00')/Emp_Headers"

            }

          }

        }

      ]

    }

  }

}  **** Also remove this for corresponding "results"

 

Thanks


Viewing all articles
Browse latest Browse all 10665

Trending Articles



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