cancel
Showing results for 
Search instead for 
Did you mean: 

oData development based on Backend RFC

Former Member
0 Kudos

Hi All,

I started developing a oData gateway service in Gateway system which is connected to ERP backend system.

Initially I would like to use the Gateway service as Wrapper. I have to pass few input parameters like UI5 launch pad login user id, date, selected value from the drop down.

The below are the steps I have done so far, stuck here and need some input and help here.

1. with the help some blogs I able to create a project and import the RFC. All input parameter fields I have choosen as keys shown in the picture and mapped. Out put parameters also mapped. I just need a read operaion with hard coded input parameter values as part of the oData testing  in the first step. When I run the service with these values I have expected to see some data in the XML format But I am getting some errors when I run the service in SAP NetWeaver Gateway client.

The query , I have passed in SAP SEGW client:

/sap/opu/odata/SAP/ZNY_PT_ARQ_ACCOUNTS_GET_1_SRV/TimeAccounts1Set(ImEndda='9999-12-31T00:00:00',ImModus='R',ImPernr='12868',ImSelBegda='2014-11-21T00:00:00',ImSelEndda='9999-12-31T00:00:00',ImSelPernr='12868')

ERROR:

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

-<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<code>005056A509B11EE1B9A8FEC11C22778E</code>

<message xml:lang="en">Invalid key predicate type for 'ImEndda'. Expected type is 'Edm.DateTime'</message>

-<innererror xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<transactionid>D68991E5A83BF1A080C4005056A85FC5</transactionid>

<timestamp>20151123023256.5880000</timestamp>

-<Error_Resolution>

<SAP_Transaction>Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details</SAP_Transaction>

<SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note>

</Error_Resolution>

</innererror>

</error>

Error message from the /IWDFND/ERROR_LOG is:

Message details:

Invalid key predicate type for "ImEndda". Expected type is

"Edm.DateTime"

Attached screenshots of mapping and data types from the gateway service.

Thanks

Krish

Accepted Solutions (0)

Answers (2)

Answers (2)

AbhishekSharma
Active Contributor
0 Kudos

Hi Krish,

Instead of using = use +eq+ or only with eq as below

/sap/opu/odata/SAP/ZNY_PT_ARQ_ACCOUNTS_GET_1_SRV/TimeAccounts1Set(ImEndda+eq+datetime'9999-12-31T00:00:00',ImModus='R',ImPernr='12868',ImSelBegda+eq+datetime'2014-11-21T00:00:00',ImSelEndda+eq+datetime'9999-12-31T00:00:00',ImSelPernr='12868')




Thanks-

Abhishek

former_member184867
Active Contributor
0 Kudos

The date time values need to be passed with a datetime keyword


Example

http://abc.corp:50015/sap/opu/odata/sap/Z_SERV_14/CheckFlightAvailability?AirLineID='AA'&FlightConne...'
Former Member
0 Kudos

Thanks Mallik.

I have update the URL parameter values as per the given example above but still I am facing the same error:

here is the updated URL with 'datetime' keyword.

/sap/opu/odata/SAP/ZNY_PT_ARQ_ACCOUNTS_GET_1_SRV/TimeAccounts1Set(ImEndda=datetime'9999-12-31T00:00:00',ImModus='R',ImPernr='12868',ImSelBegda=datetime'2014-11-21T00:00:00',ImSelEndda=datetime'9999-12-31T00:00:00',ImSelPernr='12868')

Thanks

Krishna