Hello Experts,
I am using DeepInsert Method for Creating Return Order Header and Items Creation(Parent and Child) relation that too based on a Existing Return order creation RFC. I am getting 500 internal server error as "No valid source context supplied" and In gateway error log "DeSerialization of XML Failed via transformation 'ID'" . Also I tried to keep the edm core type abap field for date as Nullable & Internal type as Date , decimal values with Packed but it's not accepting to change the datatype as it is different from Abap Type.
In Detail:-
I have 5 Entitysets for Header,Partner,Items,Conditions,Schedues.
Out of them I am using Header Entityset in the POST URL(http://host:port/sap/opu/odata/ZRETURNS_SRV/HeaderCollection)
and passing Header, Items,Partners,conditions,schedules inline entries via rest client based on http://scn.sap.com/docs/DOC-22305 .
Is that approach correct of having 5entity sets and passing only HeaderSet in URL ? The below Request Body shows the Inline entries belonging to all the Entitysets. So here the doubt arise , the way of passing the Inline entries is correct or any other approach for different entitysets.
URL:-http://host:port/sap/opu/odata/ZRETURNS_SRV/HeaderCollection
RequestBody:-
<?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:DocType>RE</d:DocType>
<d:SalesOrg>1000</d:SalesOrg>
<d:DistrChan>10</d:DistrChan>
<d:Division>10</d:Division>
<d:DateType>1</d:DateType>
<d:OrdReason>101</d:OrdReason>
<d:PartnRole>AG</d:PartnRole>
<d:PartnNumb>0000000011</d:PartnNumb>
</m:properties>
</atom:content>
<atom:link
rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/SOItems"
type="application/atom+xml;type=feed"
title="Header_Items">
<m:inline>
<atom:feed>
<atom:entry>
<atom:content type="application/xml">
<m:properties>
<d:ItmNumber>000010</d:ItmNumber>
<d:Material>P500042</d:Material>
<d:Plant>1000</d:Plant>
<d:StoreLoc>1000</d:StoreLoc>
<d:TargetQty>5.000</d:TargetQty>
<d:TargetQu>EA</d:TargetQu>
<d:ShortText>JACK DANIELS WHISKEY</d:ShortText>
<d:MatlGroup>50200000</d:MatlGroup>
<d:CondStNo>011</d:CondStNo>
<d:CondCount>01</d:CondCount>
<d:CondType>PR00</d:CondType>
<d:Currency>USD</d:Currency>
<d:ReqDate>11-11-2013</d:ReqDate>
<d:ReqQty>5.000</d:ReqQty>
</m:properties>
</atom:content>
</atom:entry>
<atom:entry>
<atom:content type="application/xml">
<m:properties>
<d:ItmNumber>000020</d:ItmNumber>
<d:Material>P500042</d:Material>
<d:Plant>1000</d:Plant>
<d:StoreLoc>1000</d:StoreLoc>
<d:TargetQty>5.000</d:TargetQty>
<d:TargetQu>EA</d:TargetQu>
<d:ShortText>BRANDY</d:ShortText>
<d:MatlGroup>50200000</d:MatlGroup>
<d:CondStNo>011</d:CondStNo>
<d:CondCount>01</d:CondCount>
<d:CondType>PR00</d:CondType>
<d:Currency>USD</d:Currency>
<d:ReqDate>11-11-2013</d:ReqDate>
<d:ReqQty>5.000</d:ReqQty>
</m:properties>
</atom:content>
</atom:entry>
</atom:feed>
</m:inline>
</atom:link>
</atom:entry>
Appreciate your help.
Thanks,
Uday.