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

ERROR:"Invalid or no mapping to system data types found" in Gateway Client

$
0
0

Hello experts:

         I want to use http method 'post' to upload file to internal table,and after I redefine 'create_stream' in my DPC and test it in Client,It shows "Invalid or no mapping to system data types found".


no-slug.JPG

this is my MPC:


lo_entity_type = model->create_entity_type('File').

lo_entity_type->set_is_media( 'X' ).

 

lo_property = lo_entity_type->create_property( iv_property_name  ='Mandt    iv_abap_fieldname = 'MANDT').

lo_property = lo_entity_type->create_property( iv_property_name  ='Filename'  iv_abap_fieldname = 'FILENAME').

lo_property->set_is_key( ).

lo_property = lo_entity_type->create_property( iv_property_name  ='Sydate' iv_abap_fieldname = 'SYDATE').

lo_property = lo_entity_type->create_property( iv_property_name  ='Sytime' iv_abap_fieldname = 'SYTIME').

lo_property = lo_entity_type->create_property( iv_property_name  ='Value'  iv_abap_fieldname = 'VALUE').

lo_property = lo_entity_type->create_property( iv_property_name  ='Mimetype' iv_abap_fieldname = 'MIMETYPE').

lo_entity_type->bind_structure( 'Z_CL_MODEL_PROVIDER=>FILE' ).

lo_entity_type->create_entity_set( 'FILESET' ).


this is my DPC:

method/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_STREAM.

DATA ls_excel                     TYPE ZEXCELDETAIL.

 

         ls_excel-mimetype = is_media_resource-mime_type.

         ls_excel-filename = iv_slug.

         ls_excel-value = is_media_resource-value.

         copy_data_to_ref( EXPORTING is_data = ls_excel

                           CHANGING  cr_data = er_entity ).



Is anyone knows how to fix with it?

Thanks!!!!!!!



Regards,

Cao


ICM & Gateway

$
0
0

Can anyone help to explain what's the difference roles they play and their relatetionship?

I am a little confused with them.

 

In my opinion, ICM is to handler HTTP request like POST or GET.

So what does Gateway do then?

BEx Query Consume Error in Sap Netweaver Gateway

$
0
0

Hi,

 

 

I'm beginner consumming BEx Queries in Sap Netweaver Gateway, my scenario is the following:

 

 

I have one ERP where I created the service (in SEGW), I redefined the service following this tutorial:

 

 

Transform SAP BW Queries into OData Service: Part 1 - Generation and Activation

 

 

All seems to be OK when I clicked on "Generate Runtime Objects", all classes compiled with no errors.

 

 

My SAP Netweaver Gateway is in another machine, so I went to Service Maintenance in my services packet and I registered it in my GW, I created

 

 

an Alias to my BI Machine (Where the BEx queries are) in the same service packet and I tried to consume it clicking on 'Maintain'.

 

 

The first error I get at this point is the metadata of the service is not loaded correctly.

 

 

The error that I get when I tried to consume the ODATA is the following:

 

 

/IWFND/MED039 Model Z_XXXXX_XXXXX contains errors.

Please contact Administrator.

See SAP Note 1797736 for error analysis.

 

 

If I don't point to this alias and let the same machine where the service is as the alias, I get an error in Gateway that says: Cannot find the query XXXX/XXXXXXX in the system.

 

 

 

The schema of the scenario is the following:

 

 

*BI* (Where the data is and BEx Queries are created) <-----> *ERP* (where the service is located) <-----> *GW* (Where the ODATA are published)

 

 

 

 

I tried it in another development environment that we have, where the GW is in the same machine as the Backend. I followed the same method and I

 

 

connected to the same BI Server of the main scenario with RFC and then there are no errors, I can consume correctly the ODATA published and I

 

 

can see data of BI BEx Queries.

 

 

 

Thank you very much.

Carlos.

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

Retrieve X-CSRF-Token from sapes1 ZGWSAMPLE_SRV

$
0
0

Hi,

 

I have successfully retrieved the "X-CSRF-Token" token value for a number of the other odata services (eg ZCD204_EPM_DEMO_SRV) on sapes1 but I'm unable to get a response that includes the cookie & header being set in the response when accessing https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/ .

 

My username and password are correct, I can retrieve data in ZGWSAMPLE_SRV but when i set "X-CSRF-Token" to "Fetch" the response headers do not include a "X-CSRF-Token" entry.

 

Using the "REST Console" in chrome I can provide the details of a failing request.

 

Request Headers:

Authorization: Basic SOMEVALUE

X-CSRF-Token: Fetch

Accept: */*

Connection: keep-alive

Content-Type: application/xml

Origin: chrome-extension: //rest-console-id

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

 

 

Response Headers:

Status Code: 200

server: SAP NetWeaver Application Server / ABAP 702

dataserviceversion: 2.0

ntcoent-length: 2574

content-type: application/atomsvc+xml

 

 

The CSRF token header is missing.

 

 

Am I doing something wrong? Is the service mis-configured? What do I need to try to overcome this?

 

Cheers,

Tom

System expected the element '{http://www.w3.org/2005/Atom}entry'

$
0
0

Hi Experts,

I am trying to update t=data through SAP NW gateway using the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~UPDATE_ENTITY method.

I am using REST Client in firefox browser to test the update service.

Steps Followed .

 

1.     used GET method to get the x-csrf-token (and that was successfull)

2.     Using the obtained x-csrf-token, i am updating the data (PUT)

3.     Updated the body XML with some data .

 

Here  i m getting the return error - System expected the element '{http://www.w3.org/2005/Atom}entry'

How ever the request which i made is reaching G/W .

capt1.JPG

capt2.JPG

Please help me on this. I am really stuck. Whether to change something in gateway side, or in the XML side.

Thanks in Advance..

SAP_GWFND 740 Conflict between add-on GW_CORE 200 - For FIORI Apps

$
0
0

Hi All,

 

We are in process of implementing FIORI applications.

 

Hence installed the NW 7.4 which comes along with SAP_GWFND 740 consists of GW_CORE 200, IW_BEP 200.

 

Where as in my case, I am facing the issue while applying the patches to the following components.

 

Add-On component for the GW_CORE 200 and IW_BEP 200 etc components are missing in the SAP_GWFND 740.

When I try to install the same in SAINT, it throws with the error saying that:

 

----->

 

Phase ADDON_CONFLICTS_?: Explanation of Errors

 

There are conflicts between different Add-Ons or between Add-Ons and

Support Packages. To ensure consistency in your system, the add-on

installation is terminated until all the Conflict Resolution Transports

(CRTs) for the listed Support Packages are included in the installation

queue.

 

 

To include the CRTs in the queue, proceed as follows:

 

 

- Write down the Support Packages and Add-Ons where there are conflicts.

- Leave this screen by choosing 'Cancel' (F12).

- Delete the installation queue by choosing 'Back'.

- Load the CRTs for the Support Packages with conflicts from the SAP

  Service Marketplace or request them from your Add-On supplier.

- Restart the installation. The Add-On Installation Tool processes all

  the steps from the beginning.

 

 

If the problem involves an SAP Add-On, see SAP Note 53902 to see which

CRTs you need to resolve the conflicts. If it is a non-SAP Add-On,

contact your Add-On supplier and discuss what you need to do.

 

 

In the following, for each add-on you can see a table of Support

Packages or add-on piece lists, for which conflicts have been

identified. Column 'Information on the Conflict Resolution' specifies

how you can resolve the conflict. For more information, select the

corresponding 'Information on the Conflict Resolution' entry.

 

Conflicts Between Add-On GW_CORE 200 and other components

 

 

Component    Release      Add-On Piece List      Information on

                                                 Conflict Resolution

 

 

SAP_GWFND    740          SAPK-740BDINSAPGWFND   Unresolvable

                          SAPK-740BOINSAPGWFND   Unresolvable

                          SAPK-740BPINSAPGWFND   Unresolvable

                          SAPK-740BRINSAPGWFND   Unresolvable

<---------

 

I have attached the screenshots of the same.

 

Kindly guide us on the same.

 

Regards,

Sudh

Can't access SAP sample gateway services data

$
0
0

Hello Everybody,

 

I am trying to connect my UI5 application with SAP sample oData Gateway Services. But unfortunately it doesn't Show any data in the table of my UI5 application. oData Gateway URL and application code snippets are the following.

 

Sample Gateway Services: https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/$metadata

 

oData Entity values:

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

-<Key>

<PropertyRef Name="BusinessPartnerID"/>

</Key>

<Property Name="BusinessPartnerID" sap:updatable="false" sap:label="GeschPartnID" MaxLength="10" Nullable="false" Type="Edm.String" sap:creatable="false"/>

<Property Name="BpRole" sap:label="GeschPartnRolle" MaxLength="3" Type="Edm.String" sap:filterable="false"/>

<Property Name="EmailAddress" sap:label="E-Mail-Adresse" MaxLength="255" Type="Edm.String" sap:semantics="email" sap:filterable="false"/>

<Property Name="CompanyName" sap:label="Firmenname" MaxLength="80" Type="Edm.String"/>

 

Application code snippets:

 

createContent : function(oController) {

 

  var oModel = new sap.ui.model.odata.ODataModel("https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV");

  sap.ui.getCore().setModel(oModel);

 

  var oTable = new sap.ui.table.Table({

  editable: false

  });

 

  oTable.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "ID"}),

  template: new sap.ui.commons.TextField().bindProperty("value", "BusinessPartnerID"),

  sortProperty: "BusinessPartnerID"

  }));

  

  oTable.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "Name"}),

  template: new sap.ui.commons.TextField().bindProperty("value", "CompanyName"),

  sortProperty: "CompanyName"

  }));

  

  oTable.addColumn(new sap.ui.table.Column({

  label: new sap.ui.commons.Label({text: "E-mail"}),

  template: new sap.ui.commons.TextField().bindProperty("value", "EmailAddress"),

  sortProperty: "EmailAddress"

  }));

  

     oTable.setModel(oModel);

     oTable.bindRows("/BusinessPartner");

     oTable.placeAt("content");

 

  }

 

Please point me out where is the problem.

Thank you very much.


How to Integrate OAuth 2.0 in Gateway with Google/Yahoo/Facebook

$
0
0

Hi All,

 

I want to integrate OAuth 2.0 in Gateway with Google or Yahoo or facebook Login.

 

 

Scenario is as follows.

 

1. The user requests first hit the gateway server.

2. Then with the Oauth 2.0 configuration they have to land onto Google Login Page.

3. After Successful authentication they have to again land onto the Gateway Server.

 

 

Mainly this functionality is for Outside customers.

 

 

Kindly suggest some ideas.

 

 

 

Regards

Karthik

C# CRUD operation for SAP GAteWay

$
0
0

Dear All

 

Can you help us with codes or information about how to consume Odata service of SAP gateway  from Web Application developed in C# . We are able to do read operation (GET) but failed for POST or PUT. I have followed the link http://scn.sap.com/community/gateway/blog/2012/04/26/modifying-request-through-gateway-using-net-c

 

Though we have tried many times after following the above link's information , we failed for POST/PUT operation because of CSFR Token validation failed . We are also aware about " How to deactivate CSRF token validation" by setting parameter 0 in ~CHECK_CSRF_TOKEN. But we want to do POT/PUT with CSRF validation .

 

Also want to state that When we can do successfully  the POST operation using FireFox REST tool with CSRF token .

 

Please help us with information or codes for C#

 

 

-pk

Custom Task Providers for the SAP NW GW Task Gateway : who's doing it ?

$
0
0

There is a single post available today explaining what is involved in writing a custom task provider for the Task Gateway.

 

I was wondering whether there are already people who have tried to implement such a custom provider. A quick search through the SAP Store learns that at least within the SAP partner eco-system, there has so far been 0 attempts to create a commercial task provider implementation for the Task Gateway.

 

As we are currently considering such an implementation for a non-SAP workflow system, it would be great to hear from others about their experiences.

 

There is another confusing piece in the SAP Help Portal regarding custom task providers. It is a section in the documentation not for the Task Gateway, BUT the Workflow Services. Up until SAP NW Gateway SP06, there was this chapter, entitled "Task Provider Framework Capabilities", which appears to provide yet another set of APIs to build a custom task provider, with the added capability so it seems to also support push notificatoins. This raises the question : is this API no longer supported in later versions of the gateway and how does this framework relate to the Task Gateway APIs available to build a custom task provider.

 

 


 

One quite haunted Gateway cache issue

$
0
0

Hi experts,

 

I meet with one weird issue these days and I felt very confused.

 

I have added several news node to my OData models in backend system and I can ensure that the development are correct, since I have tested the related services on those new nodes in Gateway client and Chrome and every thing works.

 

The annoying issue is, some times the service suddenly does not work, and the issue is caused by that the old metadata before my enhancement is wrongly loaded in gateway system. See one error message for example: (ComplexNotes is one of the new nodes I added to the Model )

clipboard1.png

Even I have cleared the cache in both gateway and backend via tcode /IWFND/CACHE_CLEANUP and /IWBEP/CACHE_CLEANUP, the issue still occurs from time to time, but is NOT always reproducible.

 

Taking today's test for example.The last change timestamp for backend cache is say 20150112052753,

clipboard2.png


And it has been sent to gateway system and cached there ( pay attention to the timestamp )

clipboard3.png

And regarding the difference of type id between gateway and crm is I have done the following customizing in gateway system:

clipboard4.png

so far so good. Unfortunately sometimes I could really observe that the cache in gateway came to an old state , taking one below for example: today is 2015-01-12, why the cache in gateway is restored to the version on last Thursday(2015-01-08)??

clipboard5.png


I did some whereused list search on table /IWFND/I_MED_CTC, the only place to fill some data to this table is /IWFND/CL_MED_MDL_CACHE_PERSIS~SET_MERGED_MODEL, which is furtherly only called by /IWFND/CL_MED_MDL_PROVIDER~CREATE_CLUSTERED_MODEL. The latter is only called when a request for Medata model is issued.

clipboard6.png

Then comes my question: since the backend cache is already update-to-date ( 2015-01-12 ) and the same with Gateway cache, how could any Meta model request force the Gateway cache to be refreshed to the previous version ( 2015-01-08 ) ????

SAP Netweaver Gateway Licensing

$
0
0

Hi Colleagues

 

We are trying to position SAP Fiori at a customer who is already licensed for  SAP Business Suite. We were informed that SAP Netweaver Gateway is free for licensed SAP Business Suite customers? Is this correct? If yes, do these customers just go and download the software from the SAP Service Market Place with their S User or do they need to follow a specific process?

 

Any information or guidance will be appreciated.

 

Regards

Nishan Naicker

Retrieve X-CSRF-Token from sapes1 ZGWSAMPLE_SRV

$
0
0

Hi,

 

I have successfully retrieved the "X-CSRF-Token" token value for a number of the other odata services (eg ZCD204_EPM_DEMO_SRV) on sapes1 but I'm unable to get a response that includes the cookie & header being set in the response when accessing https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/ .

 

My username and password are correct, I can retrieve data in ZGWSAMPLE_SRV but when i set "X-CSRF-Token" to "Fetch" the response headers do not include a "X-CSRF-Token" entry.

 

Using the "REST Console" in chrome I can provide the details of a failing request.

 

Request Headers:

Authorization: Basic SOMEVALUE

X-CSRF-Token: Fetch

Accept: */*

Connection: keep-alive

Content-Type: application/xml

Origin: chrome-extension: //rest-console-id

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

 

 

Response Headers:

Status Code: 200

server: SAP NetWeaver Application Server / ABAP 702

dataserviceversion: 2.0

ntcoent-length: 2574

content-type: application/atomsvc+xml

 

 

The CSRF token header is missing.

 

 

Am I doing something wrong? Is the service mis-configured? What do I need to try to overcome this?

 

Cheers,

Tom

Network Connection Error from Eclipse

$
0
0

Dear experts,

I have created an OData Service and activated it in the backend. I am able to access this service from the REST Client in Chrome and it works fine.

When we try to give the service URL in Eclipse, it always ends in a "Network connection error". The service is not retrieved from the gateway system. When we tried the same with the demo system ES1, it works fine.

 

Is there any Gateway customization/authorization that I am missing here? I am trying to access the OData Service on the SAP Gateway directly without using SMP.


Any pointers will be appreciated.


Thank you,

Nithya



 

Tags edited by: Jitendra Kansal (Moderator)


Posting data in Json format in OData services

$
0
0

Hi All,

 

 

I am aware with SAP Gateway service we can send and receive data in XML format.. Just curious to know if we can receive request with data in Json format and process it in ECC...

 

Our front end application is using Json format and we are checking if can process request in same format in ECC or we need to transform it to XML before sending request to ECC. .

 

Please advice

 

Regards,

Rajesh

System expected the element '{http://www.w3.org/2005/Atom}entry'

$
0
0

Hi Experts,

I am trying to update t=data through SAP NW gateway using the /IWBEP/IF_MGW_APPL_SRV_RUNTIME~UPDATE_ENTITY method.

I am using REST Client in firefox browser to test the update service.

Steps Followed .

 

1.     used GET method to get the x-csrf-token (and that was successfull)

2.     Using the obtained x-csrf-token, i am updating the data (PUT)

3.     Updated the body XML with some data .

 

Here  i m getting the return error - System expected the element '{http://www.w3.org/2005/Atom}entry'

How ever the request which i made is reaching G/W .

capt1.JPG

capt2.JPG

Please help me on this. I am really stuck. Whether to change something in gateway side, or in the XML side.

Thanks in Advance..

Transporting user content from ECC to Gateway system ?

$
0
0

Hi Experts,

 

We have a scenario where OData services are created on a Gateway system from the RFC's residing on the Backend ECC. (Different system)

These services are consumed from the SMP layer.

 

There are thousands of users present in the backend ECC with specific roles that are allowed to access the functionalities.

These same users should be present on the gateway system with assigned roles/authorizations so that the application is accessible, secure and correctly monitored on the service layer.

 

Question:

1. What is the right way of getting all this user data from ECC to Gateway system. Is there an automated procedure that migrates all the user content to the gateway system ?

2. If the users are now present in the gateway system, is there an easy way to assign common roles to the users collectively ?

3. Is it possible to go ahead with a service user on the gateway system to avoid getting all the user data on the gateway system. How secure would this be especially for POST/Update/critical scenarios. Also in this case, would generating tokens to authenticate be feasible ?

 

Thanks, Vivek

In Create: CSRF token validation failed

$
0
0

Hi

I have created a query where I got a list of entry sheets.

Actually I want to creat a new entry sheet, but I am not allowed to do that, as I got the error "CSRF token validation failed".

I did find this thread, where I am told to call a query first, and then do my post. But it still gives me the CSRF token error.

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

 

My query GET url looks like this:

 

http://xxxx.xxx.xxx:yyyy/sap/opu/odata/sap/ZGW_TEST_SES_SRV/EssList/?$filter=PO_NO eq 'FSP0235016'

I got a list - and it works fine.

 

My CREATE url looks like this:

 

http://xxxx.xxx.xxx:yyyy/sap/opu/odata/sap/ZGW_TEST_SES_SRV/EssList('123')

and here I got the error.

 

We are using Odata in our ICF Node.

Anyone who can give me some hints?

 

 

Thanks

Aikon

Input Parameters for Odata Service

$
0
0

Hello Experts ,

 

    I would like to generate an Odata Service based on Remote Enabled Function Module . But the Issue here is where we need to Provide/Mark the fields as Input and Output Parameters . And Do we have to write Anycode in the Get_entity_set method .Even I tried with the Mapping to Data source for the fields as Input and Output Parameters.But coming to service , I'm not able to get the output.

 

Can Anyone help me in getting this solved .Also please share any documents related to Odata .

 

 

 

Appreciate your help.

 

 

 

 

 

 

 

Thanks,

Uday.

Viewing all 1195 articles
Browse latest View live


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