Quantcast
Channel: SCN : Popular Discussions - SAP Gateway
Viewing all 1195 articles
Browse latest View live

Netweaver Gateway tutorials and guides

$
0
0

Hi guys,

I am new to Netweaver gateway and would like to know more about how to use it. I have connected to SAP Netweaver Gateway provided by SAP. But I have no clue on what to do next. can someone provide some LINKS to articles/tutorials explaining the same.

 

many thanks,


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.

SAP NW Gateway - Network Connection Error

$
0
0

Hi All,

 

I am facing an issue with the SAP Netweaver GW connectivity via Eclipse Juno 2.0

I have the SAP NW Gateway components and installed and configured on SAP Netweaver 7.0 Ehp 2 (CRM System).

 

When I create a new connection it errors with the message 'Network Connection Error' .

 

I have tried creating a connection through Eclipse to the SAP Demo Gateway server it's showing error "Network Connection Error".

 

 

This is the Log File:

 

 

Message:

Network connection error

 

Exception stack trace:

com.sap.nw.gateway.odata.client.exceptions.RestClientException

    at com.sap.nw.gateway.odata.client.connectivity.impl.RestClientBase.execute(RestClientBase.java:54)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.testConnection(ConfigurationValidator.java:138)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.testConnection(ConfigurationValidator.java:118)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.validateConfiguration(ConfigurationValidator.java:84)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.validateCreatedObject(ConfigurationValidator.java:37)

    at com.sap.gw.oc.eclipse.preferences.ui.validator.ConfigurationValidator.validateCreatedObject(ConfigurationValidator.java:1)

    at com.sap.gw.oc.eclipse.preferences.ui.AbstractGatewayConfigurationDialog.getDialogStatus(AbstractGatewayConfigurationDialog.java:546)

    at com.sap.gw.oc.eclipse.preferences.ui.AbstractGatewayConfigurationDialog.okPressed(AbstractGatewayConfigurationDialog.java:560)

    at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)

    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at com.sap.gw.oc.eclipse.preferences.PreferencesController.createNewConfiguration(PreferencesController.java:76)

    at com.sap.gw.oc.eclipse.preferences.GatewayPreferencePage$AddConfigSelectionListener.widgetSelected(GatewayPreferencePage.java:323)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.open(WorkbenchPreferenceDialog.java:215)

    at com.sap.odata.dt.framework.sap.dialogs.ServiceCatalogProvider$5.linkActivated(ServiceCatalogProvider.java:440)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)

    at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at com.sap.iw.gw.oc.eclipse.component.exploration.page.ExplorationPage$4.widgetSelected(ExplorationPage.java:427)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)

    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)

    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)

    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)

    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:180)

    at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)

    at org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:535)

    at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)

    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)

    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)

    at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)

    at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)

    at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)

    at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)

    at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)

    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)

    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)

    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)

    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)

    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)

    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)

    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

 

 

Session Data:

eclipse.buildId=M20130204-1200

java.version=1.7.0_21

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_IN

Framework arguments:  -product org.eclipse.epp.package.jee.product

Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

 

 

and also attached screenshot...

 

 

Could someone help in case I am missing something here.

 

Thanks,

Raj kishor

Create Operation

$
0
0

Hi All,

 

I was trying out the newly installed gateway server. I did some POCs around the read operation and it seems to be working fine. Thanks to the articles and well documented help site.

 

Now the issue is when it comes to create operation.

 

For my example, I wanted to expose the BAPI_USER_CREATE1 as a gateway service.

 

Here i have skipped the implementation of all operations except for create. In the create, i have used map to data source and done the mapping.

Now my question is what is the easiest way to create the source XML for invoking the operation?

 

Appreciate your insights.

 

Thanks,

Shabarish

How to read parameters for entity set query operation

$
0
0

Hi All,

 

 

How to read the parameters for entity set query operation? For eaxmple, to get list of sales orders based on document date where document date is not a part of entity type.

 

Thanks,

 

Suresh 

Is it really necessary to make use of tables while implementing function imports

$
0
0

Hi,

 

      In the process of trying out different stuff on NetWeaver Gateway Service Builder, I came across a scenario where i had to actually use an internal table to perform a simple addition operation at runtime.( which I think is a overhead on the performance, not sure though ! )

     I did this by implementing a custom action using function import ( My function import calls an RFC which basically accepts two input parameters and returns the sum). as an odata service.

 

For implementing this I had to write some code in ABAP to redefine RUNTIME ~EXECUTE_ACTION (A method in one of the run time objects generated).   

 

Here is the sequence of steps I did ...

 

Name of the gateway project : ZMY_OPS

Name of the RFC : ZF_GWADD

Name of the function import : FI_ADD

 

segw_startup.JPG

 

SEGW screen

 

 

ZF_GWADD.JPG

 

RFC enabled function module screen

 

metadata_1.JPG

 

metadata screen 1

 

metadata_2.JPG

metadata screen 2

 

 

workbench.JPG

 

Implementation of RUNTIME~EXECUTE ACTION method

 

 

FI_Query.JPG

 

Gateway client screen with the service URI ( " /sap/opu/odata/sap/ZMY_OPS_SRV/FI_ADD?A=4&B=9 " )

 

Well, after trying this out I dint get the sum of two numbers. as you can see in the image the parameters show the value as 0.

I tried setting breakpoints in the function module and debugging it and realised the values being passed in the URI is not taken by the import parameters (A & B).

 

WHAT I FINALLY DID....

 

I created a gateway model in ABAP workbench, created a mapping with the RFC parameters and created a query operation

I made a few changes in the RFC as well, I created the RFC with import parameters and table parameters and passed the values to import parameters and get the values into table parameters. ( So this is like making use of the tables in SAP)

 

I felt this is kind of a work around way considering the fact that NetWeaver Gateway Service Builder is primarily supposed to help Non - ABAPpers and may be even a overhead.

 

 

Could someone please throw light on this.

Would be of great help.

 

 

 

Thanks & Regards,

Prathik

Gateway OData Generator Tool

$
0
0

Hi All,

 

I am using the OData generator tool to create a simple query operation. However I keep on getting the below error when I try to consume in my web browser. Anyone seen this before?

 

Data Provider implementation 'Z_TIMESHEET_0001_PS' '01' '' does not exist

 

  • Z_TIMESHEET_0001_PS is the name of my gateway data model.

 

Thanks,

 

Megan

Maintain stateful Odata service

$
0
0

Hi All,

   

   I have developed a Sencha Extjs application in which i am using ODATA (from Tcode SEGW) to get the data from the backend  and in the GET_ENTITYSET of data provider class method i am initially getting data from dbtable into global variable (class attribute).
and now when i update the data from the front-end  and save it. the UPDATE_ENTITY method is called . and here i want to access the data stored in that global variable save in the  GET_ENTITYSET method ( instead of getting from the database again )

 

Here, the odata is stateless.How can i maintain its state to stateful.?

 

And here i provide a small piece of my code.

 

METHOD carrid_get_entityset.

   IF mt_test IS INITIAL.

       SELECT * FROM ztest2 INTO CORRESPONDING FIELDS OF TABLE mt_test.

   ENDIF.

ENDMETHOD.

 

METHOD carrid_update_entityset.

" Now i want to access  data in mt_test  here but it is initial.

ENDMETHOD.


Any help could be appreciated. Thanks in advance.

 

 

Regards,

Shiva


Fiori manager error Task Facade not implemented for provider

$
0
0

Dear team,

 

I have configured Fiori Application

While accessing Manager app there is a error message

Task Facade not implemented for provider Scenario definitions are properly configured and get response from GW client is 200

task fagade.png

SAP Fiori error in Manager APP

$
0
0

Dear Team,

 

I have configured and followed all the steps from the Fiori Guide

Successfully configured Employee Application for leave request

I have tested the connection from Sicf- /default_host/sap/bc/ui5_ui5/sap/ui5_hcm_lr_cr to test leave request and it worked

When I tried to test Approve leave request from the location Sicf- /default_host/sap/bc/ui5_ui5/sap/ui5_hcm_lr_apv

Assigned all the roles to user of approval after logging with the user in the URL

There is a error Http status 403. I have attached the screen shot.

 

Kindly advice me proceed further.

 

Thanks & regards,

Rathish.S

How to call a FM from backend

$
0
0

Hi

I need to understand how we from Gateway can call a FM on backend.

In backend I want to call my BAPI (a BAPI I only can find in the backend).

 

When I created the Datamodel, I did import the structure of my BAPI (from Backend system) to Gateway.

 

But in the method PURCHASEHEADER_GET_ENTITYSET of my class, I can't call a BAPI, that isn't in the Gateway system. But how do I call the BAPI then?

 

I have searched the system, and I can't find information that solve my problem.

http://scn.sap.com/thread/3361319

 

In Manage SAP System Aliases" my settings are:

SAP System Alias: ABC_400
Description: Backend

Local GW: <space>

For local App: X

RFC destination ABCCLNT400

Software Version: DEFAULT

 

Anyone who will help me?

 

Thanks


Aikon

The specified HTTP method is not allowed for the resource identified

$
0
0

Hello Experts,

                      Getting following error  for update operation

 

 

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

 

 

Please Suggest

 

Regards

Manish

SEGW and OData Channel Development with IW_BEP

SAPUI5 mobile does not run in your browser

$
0
0

Dear all,

 

I am pretty sure that browsers like Chrome and Firefox can render SAPUI5 mobile pages. However when we try to test our SAP UI5 mobile application from one of these browser we receive an image with that message printed on it.

Is there a way to get around this problem?

 

sap_ui_5_does_not_run.png

 

Thanks,

Rene

CSRF token validation failed

$
0
0

Hello,

 

I have ~CHECK_CSRF_TOKEN Parameter is set to 0 in GUI Configuration

but I still get this exception.

 

Can you please help me?

 

Regards

Vladislav


Edm.DateTime format and conversion error.

$
0
0

Hi,

 

What is the correct way to define Date fieldsin Gateway services? I defined a field as Edm.DateTime in SEGW made it nullable but am getting runtime exception.

I tried defining a precision but then the runtime artifact generation fails saying Gateway field and RFC (DATS) field mapped to it are incompatible. Without precision the runtime artifacts are generated but failing at runtime with XML Serialization error.

 

Please let me know if we have to do anything special to map/define Date /DateTime fields of Gateway service.

 

Thanks,

Avishek.

 

P.S. We are on SP6 so hoping the earlier issues of SEGW mapping validation for DateTime fields is taken care of (Note: 1763390).

Is it really necessary to make use of tables while implementing function imports

$
0
0

Hi,

 

      In the process of trying out different stuff on NetWeaver Gateway Service Builder, I came across a scenario where i had to actually use an internal table to perform a simple addition operation at runtime.( which I think is a overhead on the performance, not sure though ! )

     I did this by implementing a custom action using function import ( My function import calls an RFC which basically accepts two input parameters and returns the sum). as an odata service.

 

For implementing this I had to write some code in ABAP to redefine RUNTIME ~EXECUTE_ACTION (A method in one of the run time objects generated).   

 

Here is the sequence of steps I did ...

 

Name of the gateway project : ZMY_OPS

Name of the RFC : ZF_GWADD

Name of the function import : FI_ADD

 

segw_startup.JPG

 

SEGW screen

 

 

ZF_GWADD.JPG

 

RFC enabled function module screen

 

metadata_1.JPG

 

metadata screen 1

 

metadata_2.JPG

metadata screen 2

 

 

workbench.JPG

 

Implementation of RUNTIME~EXECUTE ACTION method

 

 

FI_Query.JPG

 

Gateway client screen with the service URI ( " /sap/opu/odata/sap/ZMY_OPS_SRV/FI_ADD?A=4&B=9 " )

 

Well, after trying this out I dint get the sum of two numbers. as you can see in the image the parameters show the value as 0.

I tried setting breakpoints in the function module and debugging it and realised the values being passed in the URI is not taken by the import parameters (A & B).

 

WHAT I FINALLY DID....

 

I created a gateway model in ABAP workbench, created a mapping with the RFC parameters and created a query operation

I made a few changes in the RFC as well, I created the RFC with import parameters and table parameters and passed the values to import parameters and get the values into table parameters. ( So this is like making use of the tables in SAP)

 

I felt this is kind of a work around way considering the fact that NetWeaver Gateway Service Builder is primarily supposed to help Non - ABAPpers and may be even a overhead.

 

 

Could someone please throw light on this.

Would be of great help.

 

 

 

Thanks & Regards,

Prathik

Implement OPTIONS in Data Provider Class

$
0
0

Hi There,

 

We developed a OData service in our Gateway Server which we are trying to integrate with iPhone app. When we are testing a POST call in the simulator the call gets converted into OPTIONS. Is there any method in the Data Provider Class which needs to implemented for handling the OPTIONS call. Your help is much appreciated.

 

Thanks,

Chan

How to read parameters for entity set query operation

$
0
0

Hi All,

 

 

How to read the parameters for entity set query operation? For eaxmple, to get list of sales orders based on document date where document date is not a part of entity type.

 

Thanks,

 

Suresh 

Gateway OData Generator Tool

$
0
0

Hi All,

 

I am using the OData generator tool to create a simple query operation. However I keep on getting the below error when I try to consume in my web browser. Anyone seen this before?

 

Data Provider implementation 'Z_TIMESHEET_0001_PS' '01' '' does not exist

 

  • Z_TIMESHEET_0001_PS is the name of my gateway data model.

 

Thanks,

 

Megan

Viewing all 1195 articles
Browse latest View live


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