Quantcast
Channel: SCN : Popular Discussions - SAP NetWeaver Gateway Developer Center
Viewing all 1657 articles
Browse latest View live

Error in using key predicates

$
0
0

Hi all,

 

When executing the service URL with key predicates i am getting an error raised by exception /IWBEP/CX_MGW_TECH_EXCEPTION (message Internal error occurred, contact your system.).

 

The Associations, Referential constraints and Navigation properties have been maintained correctly.

 

The key predicates being passed are:

Airlineid='AA',Connectid='0017',Flightdate=datetime'2013-09-04T00:00:00'

 

The complete URL looks like:

http://<host>:<port>/sap/opu/odata/SAP/FLIGHTLISTDCR/FlightLists(Airlineid='AA',Connectid='0017',Flightdate=datetime'2013-09-04T00:00:00')/FlightDetail where FlightLists is the name of the Entity set and FlightDetail is the name of the Navigation property. Without the key predicates the entity set  returns the desired result.

 

Metadata

 

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

 

-<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"

 

 

-<edmx:DataServices m:DataServiceVersion="2.0">

 

 

-<Schema Namespace="FLIGHTLISTDCR" xml:lang="en" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">

 

 

-<EntityType Name="FlightDetail" sap:content-version="1">

 

 

-<Key>

 

 

<PropertyRefName="Airlineid" />

 

 

<PropertyRefName="Connectid" />

 

 

<PropertyRefName="Flightdate" />

 

</Key>

 

<PropertyName="Flighttime" Type="Edm.Int32" Nullable="false" sap:label="Flight time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Distance" Type="Edm.Decimal" Nullable="false" Precision="9" Scale="4" sap:label="Distance"
sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="CurrIso" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="ISO code" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Econofree" Type="Edm.Int32" Nullable="false" sap:label="Free seats" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Businfree" Type="Edm.Int32" Nullable="false" sap:label="Free seats" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Firstfree" Type="Edm.Int32" Nullable="false" sap:label="Free seats" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Curr" Type="Edm.String" Nullable="false" MaxLength="5" sap:label="Airline local currency" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Airlineid" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Airline" sap:sortable="false"
sap:filterable="false" />

 

 

<PropertyName="Airline" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Airline" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Connectid" Type="Edm.String" Nullable="false" MaxLength="4" sap:label="Connection Number" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Price" Type="Edm.Decimal" Nullable="false" Precision="23" Scale="4" sap:label="Airfare" sap:creatable="false"
sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Flightdate" Type="Edm.DateTime" Nullable="false" sap:label="Flight Date" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Airportfr" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Departure airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Cityfrom" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Depart. city" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Arrdate" Type="Edm.DateTime" Nullable="false" sap:label="Arrival date" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Airportto" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Destination airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Cityto" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Arrival city" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Deptime" Type="Edm.Time" Nullable="false" sap:label="Departure time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Arrtime" Type="Edm.Time" Nullable="false" sap:label="Arrival Time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

</EntityType>

 

-<EntityType Name="FlightList" sap:content-version="1">

 

 

-<Key>

 

 

<PropertyRefName="Flightdate" />

 

 

<PropertyRefName="Connectid" />

 

 

<PropertyRefName="Airlineid" />

 

</Key>

 

<PropertyName="Airportto" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Destination airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Cityfrom" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Depart. city" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Airportfr" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Departure airport" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Flightdate" Type="Edm.DateTime" Nullable="false" sap:label="Flight Date" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Connectid" Type="Edm.String" Nullable="false" MaxLength="4" sap:label="Connection Number" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Airline" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Airline" sap:creatable="false"
    sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Airlineid" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="Airline" sap:sortable="false"
    sap:filterable="false" />

 

 

<PropertyName="Cityto" Type="Edm.String" Nullable="false" MaxLength="20" sap:label="Arrival city" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Deptime" Type="Edm.Time" Nullable="false" sap:label="Departure time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Arrtime" Type="Edm.Time" Nullable="false" sap:label="Arrival Time" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Arrdate" Type="Edm.DateTime" Nullable="false" sap:label="Arrival date" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Price" Type="Edm.Decimal" Nullable="false" Precision="23" Scale="4" sap:label="Airfare"
    sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="Curr" Type="Edm.String" Nullable="false" MaxLength="5" sap:label="Airline local currency" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<PropertyName="CurrIso" Type="Edm.String" Nullable="false" MaxLength="3" sap:label="ISO code" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false" />

 

 

<NavigationPropertyName="FlightDetail" Relationship="FLIGHTLISTDCR.FlightListFlightDetail"
FromRole="FromRole_FlightListFlightDetail" ToRole="ToRole_FlightListFlightDetail" />

 

</EntityType>

 

-<Association Name="FlightListFlightDetail" sap:content-version="1">

 

 

<EndType="FLIGHTLISTDCR.FlightList" Multiplicity="1" Role="FromRole_FlightListFlightDetail" />

 

 

<EndType="FLIGHTLISTDCR.FlightDetail" Multiplicity="1" Role="ToRole_FlightListFlightDetail" />

 

 

-<ReferentialConstraint>

 

 

-<Principal Role="FromRole_FlightListFlightDetail">

 

 

<PropertyRefName="Flightdate" />

 

 

<PropertyRefName="Connectid" />

 

 

<PropertyRefName="Airlineid" />

 

</Principal>

 

-<Dependent Role="ToRole_FlightListFlightDetail">

 

 

<PropertyRefName="Flightdate" />

 

 

<PropertyRefName="Connectid" />

 

 

<PropertyRefName="Airline" />

 

</Dependent>

</ReferentialConstraint>

</Association>

 

-<EntityContainer Name="FLIGHTLISTDCR" m:IsDefaultEntityContainer="true">

 

 

<EntitySetName="FlightDetails" EntityType="FLIGHTLISTDCR.FlightDetail" sap:pageable="false" sap:addressable="false"
sap:content-version="1" />

 

 

<EntitySetName="FlightLists" EntityType="FLIGHTLISTDCR.FlightList" sap:requires-filter="true" sap:content-version="1" />

 

 

-<AssociationSet Name="AssocSet_FlightListFlightDetail" Association="FLIGHTLISTDCR.FlightListFlightDetail"
sap:creatable="false" sap:updatable="false" sap:deletable="false" sap:content-version="1">

 

 

<EndEntitySet="FlightLists" Role="FromRole_FlightListFlightDetail" />

 

 

<EndEntitySet="FlightDetails" Role="ToRole_FlightListFlightDetail" />

 

</AssociationSet>

</EntityContainer>

 

<atom:linkrel="self" href="http://<host>:8000/sap/opu/odata/sap/FLIGHTLISTDCR/$metadata"
    xmlns:atom="http://www.w3.org/2005/Atom" />

 

 

<atom:linkrel="latest-version" href="http://<host>:8000/sap/opu/odata/sap/FLIGHTLISTDCR/$metadata"
    xmlns:atom="http://www.w3.org/2005/Atom" />

 

</Schema>

</edmx:DataServices>

</edmx:Edmx>

 

 

The Error log message is vague and is as follows:

Internal error occurred, contact your system administrator.

 

Shall be grateful for any hints which could help me resolve this issue.

 

regards

Nitesh


Eclipse: unable to create a Gateway Connection

$
0
0

Installed SW (Frontend)

 

Backend

  • AS ABAP 7.40

 

Hello Collegues,

 

I've created a NW Gateway Service on the backend (Service is working correctly) and now I want to create a UI5 Application on the Eclipse site.

Before creating the project I have to create a Gateway connection first. But I'm getting a "Network Connection Error".

 

error.PNG

Connection data (host, port) is correct, also tried with IP instead of hostname already.

I'm getting the same error if I'm using the (new) ES Workspace data (sapes1.sapdevcenter.com, Port 80?).

 

Tried also on another PC, same error.

 

Any ideas?

Unable to load sap fiori launchpad designer.

$
0
0

Hi expert,

 

I have given admin authorization to user but unable to proper load launchpad designer for create cat log/titles/Group.

 

Kindly help me .

 

Thanks,

Sam

The navigation information 'ErrorCaseSet_ERRORDETAILSET' is not valid

$
0
0

Hello,

 

I created a project in SEGW and used for my header and detail structure for each a different ABAP CDS view. I built an association from the header to the detail which has a 1..1 relationship.

 

When I test this all works ok, e.g. I get data for my both entity sets but if I navigate to my detail it doesn't work:

 

/sap/opu/odata/SAP/Z_IDOC_TOOL_SRV_03/ErrorCaseSet('0000000000000001')/ErrorDetailSet

 

Get this exception:

 

CX_SADL_CONTRACT_VIOLATION


The navigation information 'ErrorCaseSet_ERRORDETAILSET' is not valid


So I'm on WAS 7.40 SP9 and the Gateway is patched to SP12. I tried to look in OSS for this error but found nothing. Is there a good way to troubleshoot this association stuff?.


Here my config:


And the error:

 

The application log etc. doesn't really say more. Somehow it doesn't like this ErrorCaseSet_ERRORDETAILSET. This comes from here:

 

Any idea anybody?

 

Thanks

Stefan

Odata Service Creation Using SEGW Transaction

$
0
0


Hi All,

 

I am trying to create an Odata service using one RFC that takes three input parameters and returns one structure as output parameter.

When I am trying to do mapping of Get Entity Set it is saying that key variable does not have output mapping. But my key variable is input parameter so I am unable to change the mapping direction of key variable.

Please some body suggest how to change the mapping direction of mandatory import parameters in get entity set query.

 

 

 

With Regards

Neha Pandey

Unable to test application from SICF service .

$
0
0

Hi Guru,

 

Standard and z- fiori application is not working through the SICF service,hv activated service for particular applications.

 

Error is File sap/<application name>/index.html NOT found while testing the application  from sicf service.

 

Kindly help for this sol..

 

Regards,

Sam

JSON deep insert returns atom/xml

$
0
0

Dear,

 

When I test a json deep insert (For eaxmple:a POST on /sap/opu/odata/sap/<Gateway_service>/<GW_Data>Set in the GW Client then it returns the result in atom/xml....

 

If i add ?$format=json to the call i receive following error:

 

gw_json_error.png

The Data Services Request contains SystemQueryOptions that are not allowed for this Request Type

 

 

Is there a way to get the response in json for a POST deep insert/create?

 

Thanks in advance!

 

Kind Regards,

 

Robin

Cannot select No return in Function import return type kind

$
0
0

Hi,

 

I have created a function import , its for calling an API ,and there is no returning parameter.

 

But I am not able to select the return type kind against the Function import as No return.

 

While trying to generate I am getting an error ' No return is currently not supported by the runtime'.

 

 

Regards,
Vivek.


The specified HTTP method is not allowed for the resource identified by the Data Service Request URI

$
0
0

Hi,

 

i am trying to use POST method for sending updates to SAP from GW.

 

1) i have used GET parameter to fetch the XCSRF token, which is successful.

2) i would like to use POST method for updating one of the field in SAP, for which i am getting the below error.

 

The specified HTTP method is not allowed for the resource identified by the Data Service Request URI


3) i tried using PUT method which is successful.

 

below is the URL and payload and content type i am using to for POST method.

 

Content-type : multipart/mixed; boundary=batch

 

URL :http://:/sap/opu/odata/SAP/Z_POC_READ_UPDATE_SRV/ZREADUPDATESet(ImVbeln='0000004969')

 

 

 

--batch

Content-Type: multipart/mixed; boundary=changeset

 

--changeset

Content-Type: application/http

Content-Transfer-Encoding: binary

 

POST ZREADUPDATESet HTTP/1.1

Content-Type: application/atom+xml

Content-Length: 975

 

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

<atom:entry xmlns:atom="http://www.w3.org/2005/Atom">

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

<m:properties

xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"

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

    <m:properties>

     <d:ImAuart/>

     <d:ImErnam/>

     <d:ImLifsk/>

     <d:ImSpart/>

     <d:ImTrvog>1</d:ImTrvog>

     <d:ImVbeln>0000004969</d:ImVbeln>

     <d:ImVkorg/>

     <d:ImVtweg/>

    </m:properties>

</atom:content>

</atom:entry>

 

--changeset--

--batch--

Can we achieve Push Notification only using NW Gateway?

$
0
0

Hi Experts,

We have developed a mobile app using NW gateway,exposing a custom workflow decision step, my requirement is to get a push notification to the mobile device whenever that workflow has been triggered. Can we achieve Push Notification to a mobile device only using NW Gateway? What are the technologies available to achieve the same?(I have tried with SMP)

 

 

 

 

Thanx & Regards

Header Response in Batch Processing

$
0
0

Hello,

 

My Scenario:

Multiple records update is required from the front end. This is achieved via Batch Processing. Upon processing of each record, an update message for each record should be sent back to UI5.


Requirement:

Need to send back the status message to UI for each single record.


Actual Process followed:

Lets say I have 3 records for updating, the sequence of methods called are as below:

1. Change Set BEGIN.

2. Update Entity (Called 3 times)

3. Change Set END.


In Begin method is just redefined and has no code.

In Update entity I am collecting all the individual record in an global internal table of same class.

In End method, calling an RFC to update all 3 records at a time. This RFC returns 3 messages indicating success or failure which needs to sent to UI.


Hence I thought to send these messages by concatenating into single message and send via Header response in method Change Set END as follows:

  1. data:  ls_header               TYPE ihttpnvp. 
  2. ls_header-name = 'my-custom-message'
  3. ls_header-value = 'my_message'
  4. /iwbep/if_mgw_conv_srv_runtime~set_header( ls_header ).

 

Problem:

I am not getting any header response with name my-custom-message.

 

Kindly suggest me to send the messages to UI5 with any corrections to above procedure or an alternative procedure.

 

Note: The header response with above method is only working from method Update Entity and I don't want to call the RFC for each single entity.

 

Regards,

Satish D R

Odata Service Creation Using SEGW Transaction

$
0
0


Hi All,

 

I am trying to create an Odata service using one RFC that takes three input parameters and returns one structure as output parameter.

When I am trying to do mapping of Get Entity Set it is saying that key variable does not have output mapping. But my key variable is input parameter so I am unable to change the mapping direction of key variable.

Please some body suggest how to change the mapping direction of mandatory import parameters in get entity set query.

 

 

 

With Regards

Neha Pandey

Gateway download links from main page

$
0
0

Hello,

 

The gateway download links from the main page of this SCN forum aren't working for me. Where can I get those files?

 

Sincerely,

 

Gabriel

Need advise on SAP Netweaver gateway/Odata/Eclipse

$
0
0

Hi All,

 

I am bit confused with all these terminology. Could you please advise me how do I make app for mobile using SAP netweaver gateway/Odata/Eclipse ..?I think that Eclipse is the way forward .....

 

I have SAP netweaver gateway system 2.0 installed and have Eclipse Kepler. Recently I have seen GWPA ..how and where can I get that ? and I am not able to install SAP Netweaver Gateway Plugin for Eclipse..can you please advise..

 

Kind Regards

Rama

Navigation Properties and the $orderby command

$
0
0

Hi All

 

I am trying to sort results using a Gateway OData Service as follows:

 

http://<hostname>:<port>/sap/opu/odata/sap/<Service>/MaterialHeaderSet('ABC')/NP_MatlHeader_SOItem?$expand=NP_SOHeader&$orderby=NP_SOHeader/DocumentDate%20desc,OrderId%20desc&area=SP&sap-ds-debug=true

 

Which means:

a) Find me all the Sales Order Items that are for Material 'ABC' using the Navigation Property 'NP_MatlHeader_SOItem' (Material Header to Sales Order Item using the Property of Material (MATNR) that is common to both MatlHeader and SOItem).

b) Expand to the Sales Order Header using the Navigation Property 'NP_SOHeader' (Sales Order Item to Sales Order Header using the property of OrderId (VBELN) that is common to both SOItem and SOHeader).

c) Order the results using the Properties of 'DocumentDate' (in Descending order) and 'OrderId' (in Descending order) which are contained in the Entity SOHeader and can be navigated to using the Navigation Property 'NP_SOHeader'.

 

The issue I have is that I get the following response:

 

Navigationproperties are not supported in ABAP select options

 

So the Gateway Framework does not support the use of Navigation Properties for specification of the $orderby command.   The exception is thrown at the following point in the Gateway Framework:

 

Exception /IWCOR/CX_DS_INTERNAL_ERROR occurred in Class /IWFND/CL_SODATA_PROCESSOR Method EXPR_NODE_TO_PROPERTY_PATH and Line 26

 

If I try this same command on public OData services such as Northwind, it works fine.  The business requirement behind the query (explained in points A-C above) is not unusual, indeed quite common.

 

Does anyone have suggestions about how I might be able to implement a solution for this?

 

Thanks very much for your consideration of my question.

 

Tony


Can we achieve Push Notification only using NW Gateway?

$
0
0

Hi Experts,

We have developed a mobile app using NW gateway,exposing a custom workflow decision step, my requirement is to get a push notification to the mobile device whenever that workflow has been triggered. Can we achieve Push Notification to a mobile device only using NW Gateway? What are the technologies available to achieve the same?(I have tried with SMP)

 

 

 

 

Thanx & Regards

Change/Enhance Generated Gateway Metadata

$
0
0

Is there a way to change the gateway generated metadata?  I understand that there Model Provider Extension Class which allows to manipulate some values however here is what I'm looking for.

 

Smart Filterbar and SmartTable controls require the attribute sap:filterable="true" or sap:required-in-filter="true".  While the gateway doesn't allow to set or return required-in-filter attribute but it does allow to set the filter field to true/false.  The default is true, so the meta doesn't return those values:

 

Capture.JPG

 

The examples from SAPUI5 Explored always contain embedded metadata with correct attributes set, hence work as expected, but they do not work with the gateway metadata.

 

I could modify the metadata and using the mock data make my code work, however I need to be able to do the same to the generated metadata until sap gateway team provides a fix or ui5 development interprets the metadata respecting the defaults.

 

Capture2.JPG

 

Appreciate any help from the Gateway gurus.

 

Thank You

Need advise on SAP Netweaver gateway/Odata/Eclipse

$
0
0

Hi All,

 

I am bit confused with all these terminology. Could you please advise me how do I make app for mobile using SAP netweaver gateway/Odata/Eclipse ..?I think that Eclipse is the way forward .....

 

I have SAP netweaver gateway system 2.0 installed and have Eclipse Kepler. Recently I have seen GWPA ..how and where can I get that ? and I am not able to install SAP Netweaver Gateway Plugin for Eclipse..can you please advise..

 

Kind Regards

Rama

Eclipse: unable to create a Gateway Connection

$
0
0

Installed SW (Frontend)

 

Backend

  • AS ABAP 7.40

 

Hello Collegues,

 

I've created a NW Gateway Service on the backend (Service is working correctly) and now I want to create a UI5 Application on the Eclipse site.

Before creating the project I have to create a Gateway connection first. But I'm getting a "Network Connection Error".

 

error.PNG

Connection data (host, port) is correct, also tried with IP instead of hostname already.

I'm getting the same error if I'm using the (new) ES Workspace data (sapes1.sapdevcenter.com, Port 80?).

 

Tried also on another PC, same error.

 

Any ideas?

Unable to create travel request for Standard application UI5

$
0
0

Hi Expert,

 

While creating travel request,getting below error.

 

[ Error:

 

Service SRA004_SRV failed. Contact your system administrator.


Cannot call service with URL: /sap/opu/odata/sap/SRA004_SRV/]



Kindly help me.


Regards,

Sam



Viewing all 1657 articles
Browse latest View live


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