cancel
Showing results for 
Search instead for 
Did you mean: 

POST returns 201, but all the data is blank

dave_price
Participant
0 Kudos

I've done several POSTs that work fine now, so this is one is odd.  As far as I can tell, this one is set up the same as the ones that work. Not sure if the issue is with the POST body or something in SEGW or ABAP.

I confirmed through debugger that the data is flowing out through ER_ENTITY in our custom call and it uses the DEEP structure, which also appears to be correct.

I rewrote the POST form scratch, and the same thing is still happening.

Anyone else seen this happen?  Output looks like this, note that all values are blank.  Values were passed in and made it all the way to ER_ENTITY.

I guess next I'll try to trace the ER_ENTITY values through the stack after the custom method and see why they don't make it into the fields...

-----   POST response body

  <title type="text">MtlDtls(SalesOrg='',DistributionChannel='',Division='')</title>

  <updated>2016-03-03T14:19:28Z</updated>

  <category term="Z_NAQW_AMPORTAL_SRV.MtlDtl" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

  <link href="MtlDtls(SalesOrg='',DistributionChannel='',Division='')" rel="self" title="MtlDtl" />

  <link href="MtlDtls(SalesOrg='',DistributionChannel='',Division='')/MtlDtlOutput" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/MtlDtlOutput" type="application/atom+xml;type=feed" title="MtlDtlOutput" />

- <link href="MtlDtls(SalesOrg='',DistributionChannel='',Division='')/MtlDtlInput" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/MtlDtlInput" type="application/atom+xml;type=feed" title="MtlDtlInput">

  <m:inline />

--- POST request body

<?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:SalesOrg></d:SalesOrg>

             <d:Division></d:Division>

             <d:DistributionChannel></d:DistributionChannel>

         </m:properties>

     </atom:content>

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

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

     title="">

         <m:inline>

             <atom:feed>

                 <atom:entry>

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

                         <m:properties>

                             <d:MaterialNumber>200</d:MaterialNumber>

                         </m:properties>

                     </atom:content>

                 </atom:entry>

                 <atom:entry>

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

                         <m:properties>

                             <d:MaterialNumber>360</d:MaterialNumber>

                         </m:properties>

                     </atom:content>

                 </atom:entry>

             </atom:feed>

         </m:inline>

     </atom:link>

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

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

     title="">

         <m:inline>

             <atom:feed>

                 <atom:entry>

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

                         <m:properties>

                         </m:properties>

                     </atom:content>

                 </atom:entry>

             </atom:feed>

         </m:inline>

     </atom:link>

  </atom:entry>

Accepted Solutions (1)

Accepted Solutions (1)

dave_price
Participant
0 Kudos

OK, this is solved, turned out to be something relatively obvious -- when passing parameters from the redefined base /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY method to my custom CREATE_DEEP_ENTITY method, I had copied everything from my other POST in the same base /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY method, and I missed one change -- the IS_DATA parameter was still pointed to the old type. Apparently SAP will not error when this happens, it just won't transfer any data to the POST body outputs.

Hope this helps someone else!

Answers (1)

Answers (1)

dave_price
Participant
0 Kudos

OK I think I have a clue as to how this happens now -- I started playing with my POST methods that do work, and I noticed if you change the custom deep entity type in MPC_EXT (changed vkorg to vkorga, etc), those values come back blank.

former_member184867
Active Contributor
0 Kudos

Maybe you can close the thread then