cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make and test a gateway entity set with only the create operation?

derek_morin
Participant
0 Kudos

How do I make and test a gateway entity set with only the create operation?

I frequently see blogs with comments like:

To test POST operation, 1st execute GET operation and then press Use as Request button which will copy the response to request window and then select operation POST and execute.

Is there a way to get a "blank" document for using as a request without implementing the "get" operation?

I am writing a backend RFC to create maintenance orders and I want to expose it via the gateway.

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor

It is actually easy to build the request body in json. Try hand coding as below.

For example

{

'property1' : 'value1',

'property2': 'value2',

'property3': 'value3',

'property4': 'value4'

}

Answers (1)

Answers (1)

derek_morin
Participant
0 Kudos

I was able to change an update call by manually tweaking the xml. Krishna's post gave me the confidence that I could just easily tweak the xml.

<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://xxxxxxxxxxx/sap/opu/odata/sap/ZAPMEXTERNALDATA" 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">
 <link href="CreateMaintOrderSet" rel="edit" title="CreateMaintOrderSet"/>
 <content type="application/xml">
  <m:properties>
  <d:OrderType></d:OrderType>
  <d:ShortText></d:ShortText>
  <d:FunctLoc>?0100000000000000195</d:FunctLoc>
  </m:properties>
 </content>
</entry>