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

Posting Multiple Records into DB Table Using Odata

$
0
0

Hello Experts ,

 

    I want to Insert Multiple Records into SAP DB Table Using Odata POST Method. For that I created an EntityType , Entity Set in a DataModel

and Generated Runtime Objects , Later Redefined the Create Method with the Logic as shown below and Implemented the service.

 

 

EntityType Properties :

ItemNum type Edm.String

PickQty   type Edm.String

ItemPosnn type Edm.String

 

Redefining Create Entity with the Following Logic .

 

   DATA : T_PICK TYPE STANDARD TABLE OF TY_PICK,

          W_PICK TYPE ZCL_ZSTR_PICK_INSERT_MPC=>TS_ZSTRPIC,

          ITEMNUM TYPE ZSTR_PIC-ITEM_NUM,"POSNR_VL,

          PICKQTY TYPE ZSTR_PIC-PICK_QTY, "BDC_FVAL,

          ITEMPOSNN TYPE ZSTR_PIC-ITEM_POSNN ."POSNR_VL.

 

   W_PICK-ITEM_NUM = ITEMNUM.

   W_PICK-PICK_QTY = PICKQTY.

   W_PICK-ITEM_POSNN = ITEMPOSNN.

   APPEND W_PICK TO T_PICK.

 

   INSERT ZSTR_PIC FROM TABLE T_PICK.

   COMMIT WORK.

 

Using The generated Odata service I tried to Post the Record into Table with the following XML Content.

 

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

<entry xml:base="<server>:<port>/sap/opu/odata/sap/ZSTR_PICK_INSERT_SRV/ZSTR_PIC/"

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/ZSTR_PICK_INSERT_SRV/ZSTR_PIC/</id>

<title type="text">ZSTR_PIC</title>

    <category term="/ZSTR_PICK_INSERT_SRV./zstr_pick_insert_srv" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>

    <link href="ZSTR_PIC" rel="self" title="/ZSTR_PICK_INSERT_SRV"/>

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

    <m:properties>

<d:ItemNum>000070</d:ItemNum>

<d:PickQty>20.000</d:PickQty>

<d:ItemPosnn>000070</d:ItemPosnn>

</m:properties>

    </content>

    </entry>

 

Record Posting Into table was done with the Values '0' , but not with the Content I am Passing in XML .

 

Please Let me know whether the Approach I Followed is Correct or anything I missed.

 

 

   

Appreciate your help.

 

 

 

 

 

Thanks,

Uday.


Unable to setup SAP NetWeaver Gateway in Eclipse

$
0
0

Hi ,

I have developed some android application using eclipse juno 4.2 but, these application do not consume data from sap system.

Now i wanted to connect to sap system and get data to use in my application.

 

After searching i came across this awesome post by Gal Roter but, somehow i am not able to get the thing done.

 

List of things i have installed,

 

1) Installed Eclipse Juno .

2) SDK manager

3) Android version4.1.2( Jelly Bean )

4) Then i downloaded SAP NetWeaver Gateway plugin for eclipse.

 

Here is the problem i am facing,

 

I try to create new project using SAP NetWeaver Gateway under that i selected Starter application project

 

I enter all the details like: project name, project for android ,application name ,pacakage etc..

but, i am not able to select the Build Target dropdown because that dropdown is empty.

 

What to do..? How to go ahead..???

 

I have attached the snapshot of the error i am getting.

 

 

Thanks in advance,

Vishesh

SAP Netweaver Gateway Demo System - Any samples that allow data manipulation?

$
0
0

Hi everyone,

 

I am currently trying to get a better understanding of the OData based communication between the SAP Netweaver Gateway and a mobile app. Today I succeeded in building a sample app that consumes the Flight Example services, which is great.

What I am now aiming at is to include data manipulation in my app - create, delete, and update entities. http://scn.sap.com/docs/DOC-31221#section6 is a very helpful resource, however none of the examples listed there seems to allow CDU operations (or maybe I am missing something). Is there any other sample service that fulfills my needs?

 

Thanks,

Thomas

Problem: how to expose SAP Business Workflow to SAP Netweaver Gateway SP05

$
0
0

Hello,

 

I want to expose SAP Business Workflow to SAP Netweaver Gateway and I have two Guides found: from year 2011 and 2012. Which should I use? I didn't found from year 2013 one.

 

For the first one I have configured Gateway and when I call URL .../sap/opu/sdata/sap/wfactivitytaskprocessing/WorkflowTaskCollection?$format=xml

I get error message:

 

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

<code>
/IWFND/CM_IFL/003
</code>

<messagexml:lang="en">

GW Business Data Provider failed
</message>

<innererror>

GW Business Data Provider failed.
</innererror>

</error>

 

The second one of year 2012 is better. But I still not get any proper Collection output:

/sap/opu/odata/IWWRK/WFSERVICE/WorkflowTaskCollection?$format=xml

 

<feedxmlns="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"xml:base=".../sap/opu/odata/IWWRK/WFSERVICE/">

  • <id>.../sap/opu/odata/IWWRK/WFSERVICE/WorkflowTaskCollection</id>
  • <titletype="text">WorkflowTaskCollection</title>
  • <updated>2013-07-02T11:46:07Z</updated>
  • -<author>
    • <name/>
    </author>
  • <linkhref="WorkflowTaskCollection" rel="self" title="WorkflowTaskCollection"/>

</feed>

 

Do you have any idea?

 

 

The output  from .../sap/opu/odata/IWWRK/WFSERVICE/?$format=xml:

 

<app:servicexml:lang="en"xml:base=".../sap/opu/odata/IWWRK/WFSERVICE/" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData">

<app:workspace>
<atom:titletype="text">
Data
</atom:title>

<app:collectionsap:addressable="false"sap:requires-filter="true"sap:content-version="1"href="AttachmentCollection">

<atom:titletype="text">
AttachmentCollection
</atom:title>

<sap:member-title>

Attachment
</sap:member-title>
</app:collection>

<app:collectionsap:creatable="false"sap:updatable="false"sap:deletable="false"sap:addressable="false"sap:content-version="1"href="CommentCollection">

<atom:titletype="text">
CommentCollection
</atom:title>

<sap:member-title>

Comment
</sap:member-title>
</app:collection>

<app:collectionsap:creatable="false"sap:deletable="false"sap:addressable="false"sap:content-version="1"href="ExtensibleElementUpdateCollection">

<atom:titletype="text">
ExtensibleElementUpdateCollection
</atom:title>

<sap:member-title>

ExtensibleElementUpdate
</sap:member-title>
</app:collection>

<app:collectionsap:creatable="false"sap:updatable="false"sap:deletable="false"sap:addressable="false"sap:content-version="1"href="ExtensibleElementCollection">

<atom:titletype="text">
ExtensibleElementCollection
</atom:title>

<sap:member-title>

ExtensibleElement
</sap:member-title>
</app:collection>

          ...

 

Regards

Vladislav Shakhmatov

Unable to install Gateway Eclipse plugin

$
0
0

Hello All,

I need to install the gateway plugin for eclipse. I have downloaded the zip file from the SDN.

The steps provided in the plugin document were followed. But, I receive the error. Kindly assist in the regard.

gateway plugin error.png

Cannot complete the install because one or more required items could not be found.

  Software being installed: SAP NetWeaver Gateway – Framework (Required) 2.4.101.201202091725 (com.sap.iw.gw.oc.eclipse.feature.feature.group 2.4.101.201202091725)

  Missing requirement: SAP NetWeaver Gateway – Common 2.4.101.201202091725 (com.sap.iw.gw.oc.eclipse.common 2.4.101.201202091725) requires 'bundle org.eclipse.ui 3.6.0' but it could not be found

  Cannot satisfy dependency:

    From: SAP NetWeaver Gateway – Framework (Required) 2.4.101.201202091725 (com.sap.iw.gw.oc.eclipse.feature.feature.group 2.4.101.201202091725)

    To: com.sap.iw.gw.oc.eclipse.template.list [2.4.101.201202091725]

  Cannot satisfy dependency:

    From: SAP NetWeaver Gateway – List Template 2.4.101.201202091725 (com.sap.iw.gw.oc.eclipse.template.list 2.4.101.201202091725)

    To: bundle com.sap.iw.gw.oc.eclipse.common 2.4.101

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).

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

HTTP 'PUT' request for Netweaver Gateway Service (OData) using JSON format

$
0
0

Hi there,

 

I am trying to update data using the update method of a Netweaver Gateway (OData) Service from SAPUI5 or the Gateway Client (that shouldn't matter).

 

So far I can only get a valid HTTP Response if I am using XML as the request body data.

 

Is it possible to use an HTTP request with a request body data using a JSON string instead of the XML string? If this can be done, what do I have to do before using the 'update()' method of an ODataModel object.

 

Best Regards

Patrick


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

How to config a HTTPS OData Service with SSO?

$
0
0

Hi All,

 

I am a new in NetWeaver Gateway. I tried to config a HTTPS OData Service with SSO cookie for testing.

Do you know how to config it? or please let me know if there was this kind of HTTPS OData Service.

 

Thank you very much!

 

Thanks,

Crystal  

Project.properties missing | Eclipse, SAP NW GW Plugin

$
0
0

Hi experts,

 

after GW100 I'm trying to "play around" with the SAP NetWeaver Gateway, Eclipse and Android.

 

I've installed different versions of Eclipse, but I'm unable to run my application.

 

What I have at the moment:

Eclipse Java EE IDE for Web Developers Juno Service Release 1

ADT 21.1.0

SAP NetWeaver Gateway - xxx 2.6.400

 

When I try to generate an Android App (File - New - Others - Starter Application Project), everything seems to be fine (I can chose my service from my SAP system). But when I generate the object, I always get the error

 

Project has no project.properties file! Edit the project properties to set one

 

What am I doing wrong?

 

Thanks

Michael

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

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

SAP Fiori Home Page

$
0
0

Dear All ,

 

We have installed and configured SAP fiori , The home page looks like below attached .I mean it shouldn't have plain white background , It should some flowers background I guess . do you think this is normal home page ?

 

I'm accessing home page via this URL.

 

http://xxxx.com:xxxx/sap/bc/ui5_ui5/ui2/launchpage/home.html

 

Please advise how can I get the actual fiori home page with flowers .

HR apps powered by SAP NW Gateway

$
0
0

Consider all the problems you could face weeks or months from now, if you're unable to prove that an employee obtained a leave approval from her manager? Unless your business has developed formal HR approval processes, you will likely review, approve or reject important HR requests on an ad-hoc basis.

 

 

Many of those, who use SAP HR Approvals app powered by SAP NetWeaver Gateway can now avoid these situations all together.

 

However, one important consideration that many businesses are facing when integrating with SAP HCM, is how to expose its functionality to mobile devices in days -- not months?

SAP NW Gateway allowed many businesses to accomplish just that.  NW Gateway provided a native and most importantly a quick way to integrate with SAP HCM, so that their employees and managers could take action on HR requests anywhere at any time. As exemplified in SAP HR Approvals app, NW Gateway extended the functionality of on-premise SAP HCM, allowing managers to evaluate and respond to approval requests right from their iPhone, and providing employees with quick replies and managers more time to focus on value-added work.

 

 

Most importantly, with SAP NW Gateway many organizations were able to build other mobile apps, not just for their HR Approvals, and leveraging the existing data and functionality stored in SAP HCM.  By using NW Gateway they significantly streamlined the cost and time required to coordinate common HR business processes by managing and tracking the human tasks involved in these processes. Because HR mobile apps assign tasks, send reminders, track participation, and creates a record of the entire process RIGHT FROM employee’s PHONE, employees can concentrate on performing work instead of chasing people and managing the logistics of the HR process.

 

 

Check out this example of SAP Capture.PNG

NW Gateway in action here: https://itunes.apple.com/us/app/sap-hr-approvals/id468092865?mt=8


Multiple output table parameters in custom RFC

$
0
0

Hi Experts,

 

This is my scenario. I have a custom RFC, is having multiple output table parameters. When importing data model from RFC, it is creating number of entity types based input parameters and output parameters. So that GW is allowing to create a entity set based on a entity type. And for each and every entity set, we can query the rfc execution.

 

Example: RFC ZSALES_ORDER_INFO is having improting parameter sales order number and output tables SALES_HEAD abd SALES_ITEM.

 

when I imported the data model from RFC, it is createting three entity types sales order number, SALES_HEAD and SALES_ITEM.

 

Now I can allowed to create entity sets like SALES_HEAD and SALES_ITEM. If I write query for SALES_HEAD, I need to call the ZSALES_ORDER_INFO and need to take SALES_HEAD only. If I write query for SALES_ITEM, I need to call the ZSALES_ORDER_INFO and need to take SALES_ITEM only.

 

Is there any option to give both SALES_HEAD and SALES_ITEM as single ODATA file output?

 

Thanks,

 

Suresh Yerra.

ABAP Dump issue while accessing Gateway

$
0
0

Hi

 

We have recently upgraded our Gateway server to SP03. Eversince after service generation while accessing the XML/Metadata from the consumption page we get an HTTP error with Dump. Has anyone faced this problem before.

 

 

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

- <error xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance">

  <code>HTTP/500/E/Internal Server Error</code>

  <message>Call of service /sap/opu/sdata/sap/Z14335_RFC_BP_1/ terminated because of an error. The following error text was processed in system AC1 : Syntax error in program /IWCOR/CL_REST_HTTP_HANDLER===CP .The error occurred on the application server njsapnet3. The termination type was: RABAX_STATE.If the termination type is RABAX_STATE, you will find more information on the cause of termination in system AC1 in transaction ST22. If the termination type is ABORT_MESSAGE_STATE, you will find more information on the cause of termination on the application server njsapnet3 in transaction SM21. If the termination type is ERROR_MESSAGE_STATE, you can search for further information in the trace file for the work process in transaction ST11 on the application server njsapnet3. You may also need to analyze the trace files of other work processes. If you do not yet have a user ID, contact your system adminmistrator.</message>

  </error>

Dynamic entitys

$
0
0

Hi experts,

 

is there a way to "generate" dynamic entitys?

 

For explanation:

 

I want to have a customizing table. Here the user should maintain which fields he need. Depending on this fields, I want to generate my entity.

 

Example:

My customizing-table has field MATNR -> entity only MATNR

Now I add MATKL, so my entity must also incluce MATKL.

 

Is this possible? Do I have to use the Model Provider Class? Or something else?

 

Thanks a lot

Michael

Error processing JSON input for Create operations.

$
0
0

Hi,

 

We are trying to give JSON as input to a Gateway services Create method and the same is failing in Gateway with RABAX ERROR. On checking ST22 logs found the following error 'Error while parsing an XML stream: 'BOM / charset detection failed'.'

We tried to pass this as input from REST client with the following headers along with the X-CSRF token in the header:

Content-Type : application/json; charset=utf-8

Accept: application/json

 

The same operation was tried from a SAPUI5 application where we set the model type as JSON [new sap.ui.model.odata.ODataModel( sServiceUrl ,  true,  "User",  "Pwd"); ] and got the same error in ST22. Whereas the same operation worked from SAPUI5 when model was XML [new sap.ui.model.odata.ODataModel( sServiceUrl ,  false,  "User",  "Pwd"); ].

 

The Gateway system in SP06 and is able to output JSON.

 

Any pointers to resolve the issue will be highly appreciated.

 

Thanks,

Avishek

Problem: how to expose SAP Business Workflow to SAP Netweaver Gateway SP05

$
0
0

Hello,

 

I want to expose SAP Business Workflow to SAP Netweaver Gateway and I have two Guides found: from year 2011 and 2012. Which should I use? I didn't found from year 2013 one.

 

For the first one I have configured Gateway and when I call URL .../sap/opu/sdata/sap/wfactivitytaskprocessing/WorkflowTaskCollection?$format=xml

I get error message:

 

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

<code>
/IWFND/CM_IFL/003
</code>

<messagexml:lang="en">

GW Business Data Provider failed
</message>

<innererror>

GW Business Data Provider failed.
</innererror>

</error>

 

The second one of year 2012 is better. But I still not get any proper Collection output:

/sap/opu/odata/IWWRK/WFSERVICE/WorkflowTaskCollection?$format=xml

 

<feedxmlns="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"xml:base=".../sap/opu/odata/IWWRK/WFSERVICE/">

  • <id>.../sap/opu/odata/IWWRK/WFSERVICE/WorkflowTaskCollection</id>
  • <titletype="text">WorkflowTaskCollection</title>
  • <updated>2013-07-02T11:46:07Z</updated>
  • -<author>
    • <name/>
    </author>
  • <linkhref="WorkflowTaskCollection" rel="self" title="WorkflowTaskCollection"/>

</feed>

 

Do you have any idea?

 

 

The output  from .../sap/opu/odata/IWWRK/WFSERVICE/?$format=xml:

 

<app:servicexml:lang="en"xml:base=".../sap/opu/odata/IWWRK/WFSERVICE/" xmlns:app="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData">

<app:workspace>
<atom:titletype="text">
Data
</atom:title>

<app:collectionsap:addressable="false"sap:requires-filter="true"sap:content-version="1"href="AttachmentCollection">

<atom:titletype="text">
AttachmentCollection
</atom:title>

<sap:member-title>

Attachment
</sap:member-title>
</app:collection>

<app:collectionsap:creatable="false"sap:updatable="false"sap:deletable="false"sap:addressable="false"sap:content-version="1"href="CommentCollection">

<atom:titletype="text">
CommentCollection
</atom:title>

<sap:member-title>

Comment
</sap:member-title>
</app:collection>

<app:collectionsap:creatable="false"sap:deletable="false"sap:addressable="false"sap:content-version="1"href="ExtensibleElementUpdateCollection">

<atom:titletype="text">
ExtensibleElementUpdateCollection
</atom:title>

<sap:member-title>

ExtensibleElementUpdate
</sap:member-title>
</app:collection>

<app:collectionsap:creatable="false"sap:updatable="false"sap:deletable="false"sap:addressable="false"sap:content-version="1"href="ExtensibleElementCollection">

<atom:titletype="text">
ExtensibleElementCollection
</atom:title>

<sap:member-title>

ExtensibleElement
</sap:member-title>
</app:collection>

          ...

 

Regards

Vladislav Shakhmatov

Viewing all 1195 articles
Browse latest View live


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