Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

How to Post Multiple Rows at a time into Database table using Odata ...

$
0
0

Hello Experts ,

 

I want to Post Multiple Records into Database table using Odata Post Method for a Remote Enabled Function Module. For that, using SE80 I created a data model and Mapped fields for table using Function Module. Then Created a consumption Model and Activated the service . Then Calling the service from REST Client and tried to post using XML Content as shown below.

 

In the Below XML Content I tried to Post 2 Records into DB Table, But Showing error as"Error while parsing an XML stream".

Could you please suggest How to Pass Multiple Records At a time using Odata Create/Post Method , like we post Multiple Records at the time of Function Module Execution by clicking NewLine/DoubleLine in Tables Tab.


XML Content :


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

<entry xml:base="http://Server:port/sap/opu/odata/sap/Z_RFC_POST/z_rfc_postCollection/"

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

<id>http://Server:port/sap/opu/odata/sap/Z_RFC_POST/z_rfc_postCollection/</id>

<title type="text">GoodsReceipt Status</title>

    <category term="/Z_RFC_POST./z_rfc_post"

scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>

    <link href="z_rfc_postCollection" rel="self" title="/Z_RFC_POST"/>

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

    <m:properties>

    <d:empid>0000000050</d:empid>

    <d:ename>Ram</d:ename>

    <d:city>Chennai</d:city>

    <d:empid>0000000090</d:empid>

    <d:ename>Kumar</d:ename>

    <d:city>Bangalore</d:city>

    </m:properties>

    </content>

    </entry>

 

 

Appreciate your help.

 

 

 

Thanks,

Uday.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



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