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

Why SMP Server automatically stopped for a Sometime.

$
0
0

We have SMP 2.3.5 cluster environment with one data tier and two application nodes. In last two days server stopped two times for sometime and automatically started.we are not able to find out the root cause of it , can somebody suggest why it is happening.

Any help would be greatly appreciated.

 

Please find the Error which we found in the server logs:-

 

Thread-59 [com.sybase.djc.server.PartitionLock:default] [] [] Lease was not retained. Server will restart since loss of the lease is a non-recoverable condition.      

Thread-39686 [com.sybase.sup.server.Console] [] [] Stopping server...

 

 

Thread-11 [com.sybase.sup.server.Console] [] [] HTTP Listeners: http://MCCMRKSMPP02:8000,https://MCCMRKSMPP02:8001,http://MCCMRKSMPP02:5001

Thread-11 [com.sybase.sup.server.Console] [] [] IIOP Listeners: iiop://MCCMRKSMPP02:2000,iiops://MCCMRKSMPP02:2001906

Thread-11 [com.sybase.sup.server.Console] [] [] Starting services...


com.sybase.sup.server.Console] [] [] HTTP Listeners: http://MCCMRKSMPP02:8000,https://MCCMRKSMPP02:8001,http://MCCMRKSMPP02:5001

2015-07-09 03:35:01.894 CONSOLE MMS 

Thread-11 [com.sybase.sup.server.Console] [] [] IIOP Listeners: iiop://MCCMRKSMPP02:2000, iiops://MCCMRKSMPP02:2001

 

 

Thread-11 [com.sybase.djc.server.ApplicationServer:mccmrksmpp02] [] [] Cluster ID: 10.239.38.149:1

Thread-11 [com.sybase.djc.server.ApplicationServer:mccmrksmpp02] [] [] Java Startup Options:

Thread-11 [com.sybase.djc.server.ServiceComponent:ConnectorWorkManager] [] [] Starting

Thread-11 [com.sybase.djc.server.ServiceComponent:ConnectorWorkManager] [] [] Started

Thread-11 [com.sybase.djc.server.ServiceComponent:JaguarServer] [] [] Component com.sybase.jaguar.server.JaguarServer

Thread-11 [com.sybase.djc.server.ServiceComponent:JaguarServer] [] [] Starting

Thread-11 [com.sybase.djc.server.ServiceComponent:JaguarServer] [] [] Started

Thread-11 [com.sybase.djc.server.ServiceComponent:StartHandler] [] [] Component com.sybase.djc.mobilink.StartHandler

Thread-11 [com.sybase.sup.server.Console] [] [] Server Started

 

 

Thanks & Regards,

Jyoti Sahu


Parse filter string

$
0
0

Hi guys,

 

What is the recommended way to manually parse the odata filter string?

 

I want to be able to use 'and' operator, for example: ..AbcCollection?$filter=Param1 eq '60002273' and Param1 eq '60002274'

 

Code attach below...

 

since 'and' is not supported by default, lt_filter_select_options will be empty, and lv_filter_str will have the value of  '( ( PARAM1 = '50002273' ) and ( PARAM1 = '50002274' ) )'

 

So is there any standard util class that i can use to parse it easily ? NOTE: my gateway is on a different instance so I do not have class '/iwcor/cl_odata_expr_utils'

 

 

*  process filter

     lr_filter = io_tech_request_context->get_filter( ).

     lt_filter_select_options = lr_filter->get_filter_select_options( ).

     lv_filter_str = lr_filter->get_filter_string( ).

 

     IF  lv_filter_str IS NOT INITIAL AND lt_filter_select_options IS INITIAL.

 

       me->/iwbep/if_sb_dpc_comm_services~log_message(

         EXPORTING

           iv_msg_type   = 'E'

           iv_msg_id     = '/IWBEP/MC_SB_DPC_ADM'

           iv_msg_number = 025 ).

How to implement GET_ENTITYSET for Media Stream

$
0
0

Hi Experts,

 

 

I have implemented GET_STREAM method to download the media entity. When I execute the service as /zservice/photo/$value media steam is getting downloaded.

 

 

I need to implement the GET_ENTITYSET method as well because this will be used in SMP Mobile and from mobile it will need to register the service by calling /zservice/photo. If this method is implemented its throwing "Invalid or no mapping to system data types found" error.

 

Please advise how to implement GET_ENTITYSET. Method doesn't need to return any results.


 

Regards,

Murthy

Dynamic column in Gateway

$
0
0

Created a gateway entity type with properties using the individual field, i.e. I have 10 fields in my gateway project and exposed the URL to send or receive the data from the external system using CRUD method. Works perfectly well with 10 fields, but when other system try to add more fields on the existing then sap Gateway or JSON FORMAT then SAP system is not handling the scenarios. Raising an error in the gateway with additional fields are not  available in the gateway. how to handle this dynamic column in the SAP Gateway.

Failed to generate the backend operation proxy for RFC

$
0
0

Hi,

 

some times when the Gateway project is activated, i am getting the below error, when i asking ABAPer to delete RFC and re create it might work ,

 

Failed to generate the backend operation proxy for RFC <name of the RFC>

&ZIF_Z_360_PAYER_INFO6& is locked in request/task &K2DK900046&

 

not able to understand where the issue is.. can some one tell me the root cause of this issue?

 

-Madhav

How to update a field to blank using Update BAPI?

$
0
0

I need to provide a way to update a text field to blank, overwriting a previously-entered value.  Our plan was that the UI would send XML pairs for only the updated values.  In this case, the UI would send an empty string for FieldA as shown below.

 

<d:FieldA></d:FieldA>

 

Does io_data_provider->read_entry_data allow me to distinguish between what XML pairs were input in the request body versus fields that are coming in because they are part of the entity structure?

 

What is the typical way for NetWeaver Gateway to accomplish this update-to-blank scenario?

 

Thank you for any advice you could provide.

ECC-RFC and HANA-DB connection conflicts

$
0
0

Hi Experts,

 

I am facing some strange issue when trying to build OData service from ECC and HANA views.

 

I could successfully configure the service which will fetch data from ECC in Gateway and when tried in the browser, it will show the metadata, if filter is applied, specific data is available in the browser both in json or xml format.

 

Couple of weeks later, we had a requirement to connect HANA box as trusted relation with GW.

I have configured the model classes and DB connection as described in the following docs.

 

Get Your HANA Data From Everywhere With Netweaver Gateway

 

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0b5be6f-afb7-2f10-e68c-dad80774a223?overridelayout=true

 

Now the catch:

As per the document we need to do BAdi enhancement to update DB connection method.

Once the steps are completed, I am getting HTTP 500 error in the HANA DB service which says something like "syntax error in sql"

This means, Gateway is able to connect HANA as DB and trying to hit the views.

 

At the same time when you try to access the previously successful ECC service, it is now throwing with error "RFC call ended with "Communication Failure" exception"

 

As soon as when you try to remove the newly created BAdi enhancement spot, the ECC OData service wil resume and fetch the data via RFC connection through Gateway.

 

I would like to know, how the connections to ECC and HANA can be resolved.

Any other settings involved in Gateway to handle ECC-RFC  and HANA-DB connection separately in gateway.

 

Thanks!

Praveen.

Cache Clear Z Scenario

$
0
0

   Hi All,

 

In SPRO Settings of Gateway, Can we create a " Z" scenario in cache and persistency clear. IF possible how ?


Is it possible in CREATE_DEEP_ENTITY to have a separate Request structure and a separate Response structure?

$
0
0

Hi Everyone,

 

I have redefined method '/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_DEEP_ENTITY' for my service.

 

I have a deep Request Structure with 3 internal tables, I don't want to pass this request structure as a response for my service.

 

I want to send a different response structure for my service.

 

Request Structure:

 

DATA: BEGIN OF lw_posttimedum.

             INCLUDE TYPE zcl_tm_mytime_mpc=>ts_posttimedum.

 

     DATA posttime     TYPE STANDARD TABLE OF

                                     zcl_tm_mytime_mpc=>ts_posttime WITH DEFAULT KEY,

 

                 posttimesc   TYPE STANDARD TABLE OF

                                      zcl_tm_mytime_mpc=>ts_posttimescWITH DEFAULT KEY,

 

                 posttimetc   TYPE STANDARD TABLE OF

                                    zcl_tm_mytime_mpc=>ts_posttimetcWITH DEFAULT KEY,

 

             END OF lw_posttimedum.



Response structure:


DATA: BEGIN OF lw_resphdr.

             INCLUDE TYPE zcl_tm_mytime_mpc=>ts_posttimedum.


     DATA : responseitem TYPE STANDARD TABLE OF

                            zcl_tm_mytime_mpc=>ts_responseitem

                            WITH DEFAULT KEY,


             END OF lw_resphdr.

 

 

Could you please let me know if this is possible in ODATA.

 

Thanks,

Faraz Khan


Step by Step Gateway Odata Service Creation Using SEGW - method 1. importing DDIC structure

$
0
0

Here I am exposing a sap table as odata using gateway service builder.TCODE is segw.

 

Steps

1.Go to TCODE SEGW.Then click on create icon
Fill Details Project name ,Description and choose package click tick button.A new project will be created.

 

2.Expand the Node Select Data Model node and right click select import-->DDIC structure

 

3.Enter name of the entity(give any reasonable name) and select abap structure.Here i have selected a custom table created by me

 

4.Select which all fields to be exposed.Tick mark needed fields and click next button

 

5.Select the Key fields in the table and Click finish button

 

6.Now click on Generate button to generate model provider classes and data provider class.This will be generated automatically by the system.

 

7.Click tick button.

 

8.Expand Service Maintenance node and click register button.

 

9.Select system alias.Here iam selecting LOCAL.Click tick mark button.

 

10.If you want to change service name you can do it here.Iam not gonna change it.Select local object and press OK button.Now press maintain button

 

11.Already Now you can view your service in the browser or gateway client.

 

12.Wow See the result in gateway client.Note that http status is 200 ok.If you get other than 200 You have done something wrong.         

Unable to open SAP gateway client.

$
0
0

I have created a odata service in the recently installed gateway. SAP Netweaver version is 7.4 SP8. After registering the service when i tried to open gateway client to test the service, I do not find any session opening up.When trying to open the gateway client by clicking the gateway client multiple times, I see a popup saying the maximum GUI sessions has been exceeded.But i dont see any sessions opened. What could be the issue here?Could anybody please help me out here!!

Guid Property Malformed URI

$
0
0

Hello Everyone,

 

I have a guid property as key in my Entity.

I am trying to do a Read operation on Entity, I have set breakpoints  however after doing Get call the break-point hit didn't happened and Error came.

<message xml:lang="en">Invalid key predicate type for 'Guid'. Expected type is 'Edm.Guid'</message>

Issue in Filter on Property

$
0
0

Hello Everyone, 

 

I am trying to filter on Guid property.

I tried passing /sap/opu/odata/sap/ZMASH_PROJ_SRV/MashSet?$filter=MashGuid eq '1F2C6850-ACA-F14F-E100-00000B340C63'.

 

this url is not working for me.

 

Could you please let me know correct way to work with Guid Property.

Is it possible to get Multi level entities in the Response body using GET_EXPANDED_ENTITYSET?

$
0
0

Hi Everyone,

 

I have a requirement where I have to get the Response payload in the following way:

 

<E1>

<RefreshOnDate>2016-04-08</RefreshOnDate>

               <E2>

                           <LabelName>VACATION</LabelName>

                                  <E3>

                                             <Code>B001</Code>

                                             <Group>ABSENCE</Group>

                                             <Description>VACATION</Description>

                                             <OrderOfDisplay>1</OrderOfDisplay>

                                             <IsLeaveIdNeeded>N</IsLeaveIdNeeded>

                                             </TimeCode></TimeLabel><TimeLabel>

                                        </E3>

                  </E2>

   </E1>

 

 

As we can see in the above response body, we have 3 levels of hierarchy.

 

E1 has E2(Table Type) as one of its fields,  and E2 has E3(Table Type) as one of its fields.

 

I have created three separate entities in Gateway builder and have joined then through associations and Navigation.

 

Asso.JPG

Nav1.JPG

Nav2.JPG

How in my DPC_EXT method should I pass the Response structure as mentioned above?

 

Currently, I have used the below structure but the problem is, each entity appears separately in the Response; whereas I want the above mentioned format with nested entities like E1->E2->E3.

 

DATA : BEGIN OF lw_detl.

 

             INCLUDE TYPE zcl_timecod_mpc=>ts_e1.

 

     DATA : e2 TYPE STANDARD TABLE OF  zcl_timecod_mpc=>ts_e2 WITH DEFAULT KEY,

                 e3 TYPE STANDARD TABLE OF zcl_timecod_mpc=>ts_e3 WITH DEFAULT KEY,


            END OF lw_detl.

 

URI used : /sap/opu/odata/sap/ZTMSRV/E1SET?$filter=RefreshOnDate eq '2016-04-08'&$expand=E2,E3

 

Please suggest.

 

Thanks,

Faraz Khan

Regarding SAP Fiori/UI5 Application Licence

$
0
0

@Masayuki Sekihara

 

I would to know to how SAP Fiori/UI5 Licencing works with Gateway System.

Is it Gateway Bandwidth considered for pricing or it's User based pricing

 

Thank you...


CSRF Token validation fails

$
0
0

Hi,

I am refactoring a Java based application from RFC calls to SAP Netweaver Gateway Rest service calls.

Currently I am facing a problem with a CREATE Operation.

 

The POST always fails with " CSRF token validation failed"

 

In my java frontend I am first fetching the token in a GET operation with the header attribute X-CSRF-Token with value fetch.

In the following POST operation I add the header attributes X-CSRF-Token with the token value, X-Requested-With with value "XMLHttpRequest" and Content-Type with value "application/json"

 

On debugging the request in the Gateway server I ended up in /IWCOR/CL_REST_HTTP_HANDLER method validate_csrf_token which then calls (debugged via system debugging) CL_HTTP_SERVER_NET Method VALIDATE_XSRF_TOKEN. In line 38ff the token from security context is compared to the one retrieved via fetch operation... Unfortunatly these 2 tokens are always different...

 

Any idea why this issue happens? Shouldn't the token retrieved via fetch than be saved in the security context?

 

KR
Habib

is it worth to use the auto generated code in DPC class

$
0
0

Hi Experts,

 

I have developed one ODATA service where I have created the Entity type and its Entity Set.

Entity type is created based on back end RFC parameters.

 

Here I have two options, first is binding the Get Entity and Get Entity Set operations with RFC using the 'Map to Data Source' option, which generates the code automatically in DPC class based on the fields mapping in wizard itself.

 

While in the second approach, I can redefine the respective method in DPC EXT class and internally I call the RFC and then finally map the RFC output structure with the respective Entity type fields.

 

for the better performance and in order to make the existing development extensible for further requirements which is the better option to adopt here.

 

in my opinion, second approach is better where we have a control to handle the input HTTP requests and then RFC access and finally building the Entity output parameters. and all these we can write in a single redefined method.

 

please suggest.

 

Thanks & Regards,

Jagesh

RFC call ended with \"Communication Failure\" exception

$
0
0

Hello All,

 

Could you please help me for the below error.

 

I have tried to call the odata service but i am getting the below error.

 

 

GET response: {"error":{"code":"SY/530","message":{"lang":"en","value":"RFC call ended with \"Communication Failure\" exception (Error when opening an RFC connection (CPIC-CALL: 'ThSAPOCMINIT', communication rc: CM_DEALLOCATED_ABEND (cmRc=17), ta).)"},"innererror":{"transactionid":":"20150525035922.4387520","Error_Resolution":{"SAP_Transaction":"Run transaction /IWFND/ERROR_LOG on SAP NW Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"},"errordetails":[{"code":"/IWBEP/CX_SD_GEN_DPC_TECH","message":"RFC call ended with \"Communication Failure\" exception (Error when opening an RFC connection (CPIC-CALL: 'ThSAPOCMINIT', communication rc: CM_DEALLOCATED_ABEND (cmRc=17), ta).)","propertyref":"","severity":"error"}]}}}

URI for GET_EXPANDED_ENTITYSET with multi level $EXPAND.

$
0
0

Hi Everyone,

 

I have the following Navigation properties in my service,between entities GPH,GPD,GPS, and GPT:

 

1) GPH to GPD

2) GPD to GPT

3) GPD to GPS

 

I am using the following URI and getting an error:

 

/sap/opu/odata/sap/ZTM_SRV/GPHSet?$filter=VERSION eq '1.4.3' and STARTDATE eq '20090101' and ENDDATE eq '20090120'&$expand=GPD/GPT,GPD/GPS&$format=json

 

Could you please let me know;where am I going wrong with this URI?

 

Thanks,

Faraz Khan

Prerequisites for SAP Netweaver Gateway

$
0
0

Hi Experts,

 

we are planing to implement SAP Fiori applications in my company. for this I need to prepare the prerequisites for sap netweaver gateway.

I read few forms but I am not get clear picture on this kindly clear my below queries..

1. which is the latest version in sap netweaver gateway.?

2. what are the hardware components required .?

3. do we have to buy separate license for this server. ?

4. if we buy how many user accounts we will get.?

 

thank you.

Viewing all 750 articles
Browse latest View live


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