Quantcast
Channel: SCN : All Content - SAP NetWeaver Gateway Developer Center
Viewing all 750 articles
Browse latest View live

SAP Netweaver 2.0 SP06 Install Parallels on OS X hints

$
0
0

I run a number of VMs using Parallels on my Mac and wanted to use the same for the available Netweaver Gateway 2.0 SP06 . There were a couple of issues after install that needed to be resolved before I could use the system.

 

VMList.png

 

The install was very quick and straightforward without any problems.

 

The first issue I hit was when starting using SAPMC . The user and hosts had been configured during the install, but the msg_server process had not started. Looking at the log the host nwgw was not reachable.

 

failedprocess.png

 

Checking the /etc/hosts file, no entry for nwgw existed. ifconfig -a yielded the IP address and the entry was added to the hosts file:

192.168.1.12      nwgw

 

With the hosts entry added Gateway started and the provided services could be accessed.

 

workingprocess.png

 

The next hurdle was to get my own services working. A model/service was created and configured.

 

serviceenable.png

 

model.png

This image combines both the Gateway server and IWBEP addon for service enablement, so transactions for both are available in the system.

 

/ifwnd/maint_service is the transaction for enabling the new services.

 

addservice.png

 

Selecting the service to be added caused a short dump:

 

sdump.png

Looking at the errors they we are related to the NONE destination connection call failing on an RFC. Digging around Note 1532825 the suggestion for RFC_PING to be used is alluded to. Simply using SE37 to RFC_PING NONE solved the problem.

 

rfcnone.png

 

With the NONE issue resolved it was now possible to create and run my own services:

 

gwtest.png


Getting started with the SAP Netweaver Gateway Service Consumption System

$
0
0

Welcome to sign up for the SAP Netweaver Gateway Service Consumption System. If you feel comfortable with handling an SAP ERP System feel free to jump immediately to the sign up below. We do however suggest that before doing so you take the time to read this document as it will not only give you the information on how to connect but also other valuable information you might need when using the system.

 

Where do I sign up?

To get started follow this link to the sign up form. When you sign up the form will take your SCN data as user data. The form also asks you to agree to the EULA. Once you have done that an email will be send to the email address that SCN has on file for your user with your logon information. Please make sure that the email address displayed is a valid email address for you if it is not please update your email address in your SCN profile before registering to the system.

 

How do I connect to the system?

Minutes after you registered to the system you should receive an email with your username and password. Once you have that the fastest way to change your initial password is by using the WebGUI. The WebGui for the system is located at https://sapes1.sapdevcenter.com/webgui. The WebGui is also the simplest way to connect to the system and navigate around in it. It is best to use Microsoft Internet Explorer for WebGui although Firefox and Safari should work fine too. We do however advice against using Google Chrome as we have seen things not working.

If you happen to have SAP Gui Windows or Java version you do however also have the option of creating a connection to the system in there. At this point we do not have an option of giving SAP Gui to you should you not have the rights to download it from SAP Service Marketplace. The connection information for SAP Gui to the system is as follows:

 

Application Server: lvpal259.dmzpal.sap.corp

Instance Number: 00

SystemID: ES1

SAPRouterString: /H/erpgw.sapdevcenter.com/S/3299/H/

 

SAPGuiConnection.PNG

 

What can I do with the System?

The main purpose of the system is to learn about consuming SAP Netweaver Gateway Services. All URL's to Gateway for this system start with

 

https : //sapes1.sapdevcenter.com/sap/opu..

 

Please have a look at the Sample Services and how to use them. The system is only for consumption of OData Services not for building new ones. If you are interested in building new services you have the option of choosing one of the other systems on the previous entry page.

 

What is on the System?

The System is an SAP ECC (Enterprise Core Components) filled with some Demo Data. You do have read and write authorizations to all modules but are restricted form accessing administrative functionality. Furthermore the system allows you to access the development tools but does not allow development itself. Debugging with viewing permissions is however possible.

 

If I need help.

If you have a question about Gateway feel free to post a message in the forum. If you have operational questions feel free to post them in the forum as well or send an email to devcenter@sap.com. Please also consider subscribing to the Operations Announcement Dokument where we will post information on the status of the system. In the future we are going to compile an FAQ, but for now we put the most pressing things into this document.

 

If I forgot my username password.

Go back to the sign-up form. The form will find you in the system and allow you to reset your user. Once your user is reset you will get an email confirming that the password has been reset.

Update of selected properties using PATCH

$
0
0

We are all familiar with the HTTP verbs POST and PUT which are used to create and update entities, but there is another verb at our disposal - PATCH.

 

When an update is carried out using PUT, you must supply a body that represents the entire changed property set; that is, you need to GET the entity, change the property (or several) that you wish to update and then put all properties back with a PUT request.

 

A PATCH request is a merge operation and only needs to be given the properties that are changed, which is useful. Assume you know an entity has a 'Price' property and you wish to change it; all you need to know in addition to the property name is the entity key. Then issue a PATCH request, which is in the same form as a PUT except the full property set does not need to be in the content.

 

Example: simple price change

 

1 - POST a new entity

 

<entry 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">

<content type="application/xml">

<m:properties>

<d:FooID></d:FooID>

<d:Currency>GBP</d:Currency>

<d:Price>150.59</d:Price>

<d:Category>M</d:Category>

<d:Foonumber>90031</d:Foonumber>

<d:Name>Post32</d:Name>

</m:properties>

</content>

</entry>

 

New entry has the key "foos(binary'005056A307981ED2BEB93B640CF48EF8')"

 

2 - PATCH to that key with a new Price value.

 

<entry 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">

<content type="application/xml">

<m:properties>

<d:Price>199.99</d:Price>

</m:properties>

</content>

</entry>

 

(a PUT would look like this:)

 

<entry 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">

<content type="application/xml">

<m:properties>

<d:FooID>AFBWoweYHtK+uTtkDPSO+A==</d:FooID>

<d:Currency>GBP</d:Currency>

<d:Price>199.95</d:Price>

<d:Category>M</d:Category>

<d:Foonumber>90001</d:Foonumber>

<d:Name>Post31</d:Name>

</m:properties>

</content>

</entry>

 

3 - GET the updated entity to check.

 

<m:properties>

<d:FooID>AFBWoweYHtK+uTtkDPSO+A==</d:FooID>

<d:Currency>GBP</d:Currency>

<d:Price>199.95</d:Price>

<d:Category>M</d:Category>

<d:Foonumber>90001</d:Foonumber>

<d:Name>Post31</d:Name>

</m:properties>

 

 

The use of PATCH does not require any additional coding in the DPC class; it will work out-of-the-box assuming that:

  1. There is an UPDATE method defined for the relevant entity - this method still needs to be called by the OData handler.
  2. No locking is required.
  3. The entity instance actually exists.

 

It is also important to NOT send any empty property values unless they are intended to be cleared, i.e. do not take a feed and simply empty the properties before patching.

 

All DPC extension classes within later SP releases contain an inherited PATCH handler - /IWBEP/IF_MGW_APPL_SRV_RUNTIME~PATCH_ENTITY. This is a generic handler which will merge the current entity state with your changed state and apply it using the entity-specific UPDATE method. You won't find a generated PATCH method per entity like UPDATE and CREATE.

 

If you require a locking mechanism (it's recommended!), the default implementation has a commented section at the end which provides a template for doing so.

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

MAP TO DATA SOUCE ODATA SERVICE RE-MAP a FUNCTION MODULE

$
0
0

Hey all,

 

for a project I've to create various odata services and map different RFC Function Modules.

 

So the Gateway SEGW is not dealing very good with different in / output types of the RFC Funtion Modules, so I build Wrapper Function Modules and try to convert, lets say STRING --> DATS and in return DATS --> String.

 

The Problem is I have to delete and RE MAP the Function Module all over again, if I change some Type Declaration of the Function Module like:

 

sddg.jpg

 

Did anybody know how to remap the RFC without delete and setup everything again???

 

Greetings

 

 

David

Upgrade Netweaver Gateway 2.0 SP4 of SAP ABAP Trial 7.02 SP11 Win64

$
0
0

Hello everyone,

 

Is it possible to update Netweaver Gateway 2.0 SP4 of a trial version SAP ABAP 7.02 SP11?

 

How can I do this?

 

Thanks a lot!

How to create Odata Service Post Method using SEGW...

$
0
0

Hello Experts ,

 

I would like to know the procedure of creating Odata Service using transaction SEGW , especially Posting records into database table. I tried to Post using the below procedure.

 

*Created DataModel->Entity Type

*Created Entity Set,

*Generating Runtime objects,

*System Alias Maintaining,

*Registering service ,

*Redefining the Create method and GetEntitySet method with the logic to Post records into Database Custom Table.

 

  But using this Approach , records are not getting  posted when i checked using REST Client.

 

So , Could you please suggest me which Classes and Methods I need to redefine and what business logic i need to follow for the post/create method

in SEGW.

 

 

Appreciate your help.

 

 

Thanks,

Uday.

Access SAP Netweaver Demo OData

$
0
0

What is the best or right way to use the SAP Demo Gateway OData URL and display the data in SharePoint 2013?

 

I was trying to access the SAP Demo Data urls with the below code.

 

In firefox, google chrome browser, the authorization window is popping up and not accepting the user id and password.

In IE , i am getting the below error message

 

The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again.

 

function GetSAPData() {

var call = jQuery.ajax({
    url
: _spPageContextInfo.webAbsoluteUrl +"/_api/SP.WebProxy.invoke",
    type
:"POST",
    data
: JSON.stringify({
                       
"requestInfo":{
                           
"__metadata":{"type":"SP.WebRequestInfo"},
                           
"Url":"https://sapes1.sapdevcenter.com/sap/opu/odata/IWBEP/GWDEMO/",
                           
"Method":"GET"
                       
}
                   
}),
headers
:{
   
"Accept":"application/json;odata=verbose",
   
"Content-Type":"application/json;odata=verbose",
   
"Authorization":"Basic <Base64 String>",
   
"X-RequestDigest": $("#__REQUESTDIGEST").val()
}
});

call
.done(function(data, textStatus, jqXHR){
   
if(data.d.Invoke.StatusCode==200){
        alert
(JSON.parse(data.d.Invoke.Body));
   
}
   
else{
       
var msg = alert(data.d.Invoke.Body);
        alert
("Error :"+ msg);
   
}
});

call
.fail(function(jqXHR, textStatus, errorThrown){
   
var response = JSON.parse(jqXHR.responseText);
   
var msg = response ? response.error.message.value : textStatus;
});    }

 

I have modified the above code and tried for public ODATA and it works fine. Here's the sample code with public odata. I guess the issue is more like sending the authentication data in HTTPS.

 

function GetSAPData() {

var call = jQuery.ajax({
    url
: _spPageContextInfo.webAbsoluteUrl +"/_api/SP.WebProxy.invoke",
    type
:"POST",
    data
: JSON.stringify({
                       
"requestInfo":{
                           
"__metadata":{"type":"SP.WebRequestInfo"},
                           
"Url":"http://datafeed.medicinehat.ca/v1/data/CityBuildings/",
                           
"Method":"GET"
                       
}
                   
}),
headers
:{
   
"Accept":"application/json;odata=verbose",
   
"Content-Type":"application/json;odata=verbose",
   
"X-RequestDigest": $("#__REQUESTDIGEST").val()
}
});

call
.done(function(data, textStatus, jqXHR){
   
if(data.d.Invoke.StatusCode==200){
        alert
(data);
   
}
   
else{
       
var msg = alert(data.d.Invoke.Body);
        alert
("Error :"+ msg);
   
}
});

call
.fail(function(jqXHR, textStatus, errorThrown){
   
var response = JSON.parse(jqXHR.responseText);
   
var msg = response ? response.error.message.value : textStatus;
});  }

 

Any hints..


Date field value is 000000 when passed through gateway service

$
0
0

Hi Team,

 

I have developed a simple Gateway service with three inputs, two of them being Date fields. when I pass dates through rest service, I am getting the date field value as '00000000'. though if I put a constant value, its taking the date.

 

Data type of the date in the function module is BEGDA .

 

Did anyone face this issue before?

 

Regards,

Pranay Aitha

Authenticate against LDAP - NW 740, SAP Gateway

$
0
0

We have a standalone SAP Gateway running on NW 740 and connects to ECC 6.

 

Developed a Custom Productivity App on iOS using SAP Gateway trying to find ways to authenticate with LDAP.

 

Do you know whether there is any plans or already available for Netweavor 7.40 to authenticate against Active Directory? We don't want our Mobile user to remember two password(Network and SAP Gateway) would be great if SAP Gateway can authenticate against AD.

 

Currently we are looking at adding SUP which supports this using SAP Portal in the middle for SSO2 cookie. But this is lot of infrastructure and places to fail.

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?

SAP Netweaver Gateway Consumption - Operations

$
0
0

Operations status for Netweaver Geteway Consumption System

 

Current Status: EPR system is working normal, but IT Maintenance weekend is scheduled for the upcoming weekend.

 

warninglabel.jpg

 

DateIssueStatus
17th - 19th of August 2013SAP IT is doing thier sheduled maintenance and the system will therefore not be accessible during this period. We will therefore shut down he system prior to the maintenance on August 16th at around 4pm PST.scheduled
15th of August 2013The sign up for to the system seems to throw an error after hitting the submit button. Users are never the less created and people receive a welcome email. We are looking to resolve the issuein progress
13th of May 2013

We have a new link to the form that is reachable from outside of the SAP network. We just tested it and it appeared to work fine. Should it still not work let us know with a comment here or on the How-To guide.

 

The sign-up form is currently only visible inside the SAP network. We are in the process of finding the firewall that blocks access from the outside.

 

We are getting notes that for some people on SCN the signup form is timing out while it works perfectly for others. At first we though this is due to people not logged on, but apparently this is not the case. We are working on finding out what the root cause of this is and let you know as soon as it is resolved.

resolved
9th of May 2013The form to sign-up to the system is not operational. The ERP and Gateway System however are fully operational and accessible. If you have an account don't worry about it. If you where intending to sing-up we appologize. Please check back as soon as it is resolved we are working on brining it backresolved

My First Netweaver Gateway showing blank page...

How to access NetWeaver GateWay Services through SAP Netweaver GateWay Webui

$
0
0

Hi,

 

I am new to Netweaver gateway environment, Can anyone tell me how to access Netweaver Gateway existing services through SAP Netweaver Gateway webgui for HTML5 Mobile apps...

 

Thanks & Regards,

Ramprasad.V

Service to Return a Structure

$
0
0

I've created a gateway service based on a function module.

 

It returns values in the READ operation based on the primary key.

 

It returns several structures and some of those structures have several entries- for instance appointments.

 

It will only return one appointment no matter how many entries there are.

 

I was hoping for all the appointment records to be in a nested XML structure that I can bind to table rows.

 

I know this is possible, I'm just not sure of the method. Can someone describe the process to me?

 

Thanks.


OData node missing in SICF transaction

Gateway in the cloud (paid or not)

$
0
0

Hi

 

I woud like to practice with SAP Gateway.

To create my own gateway services, test several options with the customzing of the gateway netweaver and so on.

But i have not got a system of my own to accomplish that.

 

I know that via AMAZON a system can be retrieved for a period of time if you would like to practice with SAP HANA.

These are paid services

 

Does anybody know if there is also such a service available for SAP gateway?

 

kind regards,

 

Anton Pierhagen

Error Handling through SAP Gateway

$
0
0

Hi,

 

We have few Update and Create Services being called, once these services are called and the record is updated or created, is there a way to get the success of error messages posted to the front end?

 

Thank you in Advance.

Error Handling through SAP Gateway

$
0
0

Reopening the issue.

 

reference to a similar issue http://scn.sap.com/thread/3343754

 

Hi,

 

I did raise the exception in my RFC FM as suggested in another discussion (ref. link given above)  . But the Gateway service ran into errors without even creating the record in backend.

 

Let me explain my scenario in detail.

 

I have a Gateway System connected to SolMan. The OData services are consumed by sharepoint. Its a complete Z Solution in SolMan so an RFC is consumed by the service. The Create service is called from sharepoint application and the record got created successfully in SolMan. However,GW system is unable to catch the return message and throws an exception/iwfnd/cx_mgw_tech_exception. I debugged the entire scenario and I could see that the message is being passed from SolMan but somehow, GW is unable to catch it.

 

Am I doing something wrong here ? Please let me know your inputs as I'm new to Gateway

 

Regards,

Naresh

How to create Odata Service Post Method using SEGW...

$
0
0

Hello Experts ,

 

I would like to know the procedure of creating Odata Service using transaction SEGW , especially Posting records into database table. I tried to Post using the below procedure.

 

*Created DataModel->Entity Type

*Created Entity Set,

*Generating Runtime objects,

*System Alias Maintaining,

*Registering service ,

*Redefining the Create method and GetEntitySet method with the logic to Post records into Database Custom Table.

 

  But using this Approach , records are not getting  posted when i checked using REST Client.

 

So , Could you please suggest me which Classes and Methods I need to redefine and what business logic i need to follow for the post/create method

in SEGW.

 

 

Appreciate your help.

 

 

Thanks,

Uday.

Viewing all 750 articles
Browse latest View live


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