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

Library sapscc20jni could not be loaded

$
0
0

Hi Team,

 

I am trying to start the SAP Hana Cloud connector via the go.bat command. I dont get any error when i start the application i get the osgi prompt on my command window, but after i give the first Administrator login credentials on https://localhost:8443 i get the below error

 

HTTP Status 500 - java.lang.IllegalStateException: Cannot load the Cloud Connector native library. (exception java.lang.UnsatisfiedLinkError: com.sap.scc.jni.SecStoreAccess.getRecord(Ljava/lang/String;)[C)

 

type Exception report

messagejava.lang.IllegalStateException: Cannot load the Cloud Connector native library. (exception java.lang.UnsatisfiedLinkError: com.sap.scc.jni.SecStoreAccess.getRecord(Ljava/lang/String;)[C)

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.lang.IllegalStateException: Cannot load the Cloud Connector native library. (exception java.lang.UnsatisfiedLinkError: com.sap.scc.jni.SecStoreAccess.getRecord(Ljava/lang/String;)[C) Check if you have installed the Visual Studio 2010 runtime libraries in the correct version. (vcredist.msi) The 64bit msi can be downloaded from http://www.microsoft.com/download/en/details.aspx?id=14632  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:465) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) com.sap.scc.ui.rt.UTF8Filter.doFilter(UTF8Filter.java:23) 

 

root cause

java.lang.IllegalStateException: Cannot load the Cloud Connector native library. (exception java.lang.UnsatisfiedLinkError: com.sap.scc.jni.SecStoreAccess.getRecord(Ljava/lang/String;)[C) Check if you have installed the Visual Studio 2010 runtime libraries in the correct version. (vcredist.msi) The 64bit msi can be downloaded from http://www.microsoft.com/download/en/details.aspx?id=14632  com.sap.scc.jni.SecStoreAccess.getRec(SecStoreAccess.java:133) com.sap.scc.jni.SecStoreAccess.getRecAsString(SecStoreAccess.java:176) com.sap.scc.config.HttpsProxyValue.loadFromStorage(HttpsProxyValue.java:68) com.sap.scc.config.SccConfig.<init>(SccConfig.java:74) com.sap.scc.config.SccConfig.getInstance(SccConfig.java:56) org.apache.jsp.TunnelServices_jsp._jspService(TunnelServices_jsp.java:609) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:848) com.sap.scc.ui.rt.UTF8Filter.doFilter(UTF8Filter.java:23) 

 

root cause

 

 

I checked the log file under the log directory ljs_trace.log and i found the following entries before the native x64 libraries error.

 

2013 12 06 12:06:54#+0100#DEBUG#com.sap.scc.jni##anonymous#Start Level Event Dispatcher###Load library sapscc20jni|

2013 12 06 12:06:54#+0100#ERROR#com.sap.scc.jni##anonymous#Start Level Event Dispatcher###Library sapscc20jni could not be loaded

java.lang.UnsatisfiedLinkError: no sapscc20jni in java.library.path

  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)

  at java.lang.Runtime.loadLibrary0(Runtime.java:849)

  at java.lang.System.loadLibrary(System.java:1088)

  at com.sap.scc.jni.SecStoreAccess.initialize(SecStoreAccess.java:31)

  at com.sap.scc.jni.Activator.start(Activator.java:11)

  at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)

  at java.security.AccessController.doPrivileged(Native Method)

  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)

  at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)

  at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)

  at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)

  at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)

  at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)

  at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)

  at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)

  at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)

  at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)

  at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)

  at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

  at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)|

 

I have tried searching on the forums but there is no place where i find any information about this. Can anyone help me.

 

BTW i have already tried downloading the x64 libraries, installed the same and tried but the error does not change.

 

I have using the latest SAP HANA Cloud Connector -> sapcc-2.1.1-windows-x64

 

rgds

aditya


Validate password passed from Fiori APP

$
0
0

Hi all.

 

I'm working in a Fiori project. One of the requests we have is that to approve or reject a sales order, we need to pass user and password to the backend (ECC 6.0). Once received it will be validated. My problem is that i'm receiving an encoded password (it seems that this encoding is standard in Fiori APPs) and before approving the SO I need to check that the password (sap user password) is correct.

 

Is there any class/method of Function Module to just check if the encrypted password for a specific user is correct or not? I don't want to decrypt it, just check if is correct or not.

 

Thanks in advance.

Iñigo.

Need advise on SAP Netweaver gateway/Odata/Eclipse

$
0
0

Hi All,

 

I am bit confused with all these terminology. Could you please advise me how do I make app for mobile using SAP netweaver gateway/Odata/Eclipse ..?I think that Eclipse is the way forward .....

 

I have SAP netweaver gateway system 2.0 installed and have Eclipse Kepler. Recently I have seen GWPA ..how and where can I get that ? and I am not able to install SAP Netweaver Gateway Plugin for Eclipse..can you please advise..

 

Kind Regards

Rama

Error in Create operations Services in Gateway.

$
0
0

Hi All,

 

We are facing one issue 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'.

 

I tried to create the same service in another server, there it works fine. But in this server I am having the problem with all the post operations and the same error I am geeting.

As far as I am concerned issue is from Configuration part but I don't have any clue for this, however get data services are working fine in the same server.

 

Any lead would be really appreciable.

 

Thanks,

 

Deepak Kalouni

Testing a Deep Insert - XML: OData Create Sales Order BAPI for POST

$
0
0

Hi Experts,

I have created a OData service for Create Sales Order with deep entity set with the help of following link OData Service with multiple entity set for Create SO: using standard BAPI in OData, but I am facing a problem during testing of service using XML code as Input. I have not implemented the Query and Read operations for the same, because this "Create SO" it is based on standard BAPI - BAPI_SALESORDER_CREATEFROMDAT2. I have created a XML code based on understanding of the following link http://scn.sap.com/docs/DOC-47626#comment-575158 but its not working. But I guess still something missing... please see below XML:

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

<atom:entry

xmlns:atom="http://www.w3.org/2005/Atom"

xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"

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

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

<m:properties>

<d:Vbeln></d:Vbeln>

</m:properties>

</atom:content>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Salesorder_Header"

type="application/atom+xml;type=feed"

title="ZSALES_WRAPPER_SRV.Salesorder_Header">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:DocType>ZOR</d:DocType>

<d:SalesOrg>VKS1</d:SalesOrg>

<d:DistrChan>V4</d:DistrChan>

<d:Division>21</d:Division>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:DocType>ZOR</d:DocType>

<d:SalesOrg>VKS1</d:SalesOrg>

<d:DistrChan>V4</d:DistrChan>

<d:Division>21</d:Division>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Salesorder_Items"

type="application/atom+xml;type=feed"

title="ZSALES_WRAPPER_SRV.Salesorder_Items">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:PoItmNo>AAFFAF</d:PoItmNo>

<d:Material>32</d:Material>

<d:Plant>VKM1</d:Plant>

<d:TargetQu>PAL</d:TargetQu>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:PoItmNo>AAFFAF</d:PoItmNo>

<d:Material>32</d:Material>

<d:Plant>VKM1</d:Plant>

<d:TargetQu>PAL</d:TargetQu>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Salesorder_Partners"

type="application/atom+xml;type=feed"

title="ZSALES_WRAPPER_SRV.Salesorder_Partners">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:PartnRole>AG</d:PartnRole>

<d:PartnNumb>17</d:PartnNumb>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:PartnRole>AG</d:PartnRole>

<d:PartnNumb>17</d:PartnNumb>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Salesorder_PartnerAddress"

type="application/atom+xml;type=feed"

title="ZSALES_WRAPPER_SRV.Salesorder_PartnerAddress">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:Name>ABC</d:Name>

<d:COName>ABC COMPANY</d:COName>

<d:City>NOIDA</d:City>

<d:District>GAUTAM BUDH NAGAR</d:District>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:Name>ABC</d:Name>

<d:COName>ABC COMPANY</d:COName>

<d:City>NOIDA</d:City>

<d:District>GAUTAM BUDH NAGAR</d:District>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Salesorder_ScheduleIn"

type="application/atom+xml;type=feed"

title="ZSALES_WRAPPER_SRV.Salesorder_ScheduleIn">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:ReqQty>3</d:ReqQty>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:ReqQty>3</d:ReqQty>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

</atom:entry>

 

It is returning success (201)

Thanks,

Saurabh

Testing a Deep Insert - Json: OData Create Sales Order BAPI for POST

$
0
0

Hi Experts,

I have created a OData service for Create Sales Order with deep entity set with the help of following link OData Service with multiple entity set for Create SO: using standard BAPI in OData, but I am facing a problem during testing of service using json code as Input. I have not implemented the Query and Read operations for the same, because this "Create SO" it is based on standard BAPI - BAPI_SALESORDER_CREATEFROMDAT2. I need a json code to test my service. Please suggest.

 

Thanks

Saurabh

Short Dump CX_SADL_ENTITY

$
0
0

Hi Experts,

 

while implementing an OData service in transaction SEGW, I am constantly getting a short dump in the following situation:

In Service Implementation I tried to map my entity set to a CDS View. After selecting my (active, correct, working) CDS View, the short dump occurs.

dump.PNG

When looking at the exception class CX_SADL_ENTITY, there is a missing text for exception ID "CX_SADL_ENTITY".

CX_SADL_ENTITY.PNG

 

Has anyone of you ever come across this?

Any suggestions on how to cope with this?

 

Best,

Dominik

Difference between External service name and Technical service name

$
0
0

Hi All,

 

When we try registering an OData service, we are prompted to enter Technical service name and External service name. Could you please clarify the difference between them. In many of the cases, I have seen that both the Technical Service name and External Service name are always same.

 

Also, I am not sure what an external mapping ID would be. Could any one please explain the same?

 

Thanks,

Best Regards,

Manvitha


Problem with $filter operation

$
0
0

Hi,

 

 

I am New to SAP NETWEAVER GATEWAY SERVICES,

I have created a project in SEGW by importing a DDIC structure, i can handle CRUD operations but the problem i am facing is to filter data in the appearing in the browser.

Filteration is not happening if i apply the $filter URI i am getting all the data.

 

I am struggling from past 2 weeks,

Please Please Help me with this problem.

URI im trying to use is...

 

URI: ..........SRV/NewSet?$filter=Slno eq '001' & Plant eq 'DEMO'

 

 

 

 

Thank You,

Karthik Sridhar.

SAP NetWeaver Gateway violates IETF RFC 3986 => How to fix parsing of correctly encoded OData system query option '!deltatoken'

$
0
0

What happened?


Today I tried to make a request to one of my SAP NetWeaver Gateway services that looked like this:

 

http://<gateway-url>:<gateway-port>/sap/opu/odata/<my-service>/<my-entityset>?%21deltatoken=%27token%27

 

But when I saw the response I wondered why the delta mechanism of my service wasn't working. So I started to debug the request and I noticed that in the method `/iwbep/if_mgw_appl_srv_runtime~get_entityset` of my data provider class `io_tech_request_context->get_deltatoken( )` returned an empty deltatoken (`rv_deltatoken` was initial).


First I thought I made a mistake and it's not allowed to escape URL query parameter names, but when I started research I came across an useful answer on a github issue which pointed me to IETF's RFC (Request for Comments) 3986 named "Uniform Resource Identifier (URI): Generic Syntax). Section 2.2 of this RFC points out:

2.2. Reserved Characters

 

...

 

  If data for a URI component would conflict with a reserved character's purpose as a delimiter, then the conflicting data must be percent-encoded before the URI is formed.

 

...

 

reserved = gen-delims / sub-delims

 

gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"

 

sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="

 

 

quotation from IETF RFC 3986

 

What does that mean?

 

As SAP Gateway officially uses/supports the OData Version 2.0 protocol and OData Version 2.0 is based on HTTP, SAP NetWeaver Gateway also has to respect and implement the IETF RFCs according HTTP. Instead today it's not possible to use e.g. correctly encoded OData system query options (which are URL query parameters) like %24top ($top) or %24skip ($skip).%21deltatoken (!deltatoken).

 

How to fix this NOW?

 

The best way I can think of now to fix this (until SAP hopefully will fix this!) is to make the following enhancement at the end of the private method `INIT_REQUEST` in class `/IWFND/CL_SODATA_PROCESSOR`:

 

ENHANCEMENT 1  /Z_ENH_FIX_PARSING.    "active version  DATA: lt_uri_parameter TYPE TIHTTPNVP.   FIELD-SYMBOLS: <fs_ls_uri_parameter> LIKE LINE OF lt_uri_parameter.   CALL METHOD mo_context->get_parameter   EXPORTING     iv_name = /iwfnd/if_sodata_types=>gcs_iwf_context_parameters-query_parameters   IMPORTING     ev_value = lt_uri_parameter.
 * ENHANCEMENT for url query parameter unencoding bug (fixing only for deltatoken parameter by now):
 * =================================================================================================
 * The problem is that all parameter names (and values) in `mo_context->get_parameter(
 * /iwfnd/if_sodata_types=>gcs_iwf_context_parameters-query_parameters` are
 * still encoded and therefore parameters with correctly encoded parameter names don't
 * get used by SAP Gateway. Example of SAP Gateway's URL query parameter parsing code
 * from above:
 *
 * | READ TABLE lt_uri_query_parameters INTO ls_dollar_parameter
 * |   WITH KEY name = /iwfnd/if_sodata_types=>gcs_uri_parameters-delta_token_tmp.
 *
 * Problem in code above:
 * ----------------------
 * `/iwfnd/if_sodata_types=>gcs_uri_parameters-delta_token_tmp` is '!deltatoken'
 * and the parameter name in `lt_uri_query_parameter` is '%21deltatoken' (still encoded).   READ TABLE lt_uri_parameter ASSIGNING <fs_ls_uri_parameter> WITH TABLE KEY name = '%21deltatoken'.   IF sy-subrc = 0.     FIELD-SYMBOLS: <fs_ls_export_parameter> LIKE LINE OF et_parameter.     APPEND INITIAL LINE TO et_parameter ASSIGNING <fs_ls_export_parameter>.     <fs_ls_export_parameter>-name = /iwfnd/if_sodata_types=>gcs_uri_parameters-delta_token.     <fs_ls_export_parameter>-value = cl_http_utility=>unescape_url(         escaped = <fs_ls_uri_parameter>-value       ).     SHIFT <fs_ls_export_parameter>-value RIGHT DELETING TRAILING `'`.     SHIFT <fs_ls_export_parameter>-value LEFT DELETING LEADING ` '`.   ENDIF
ENDENHANCEMENT..

Now you just need to add all the other the parameter names you need to be parsed or come up with a generic implementation for this. No generic approach is needed as only `!deltatoken` is affected by now. Take a closer look at my first update to this post if you want to know why only `!deltatoken` is affected.

Looking forward to your thoughts on this in the comments. Bye!

 

 

Update 1 on 15.04.2015:

 

As Andre pointed out in his comment, not all system query options are affected. I just debugged some requests and found out that this is because not all system query options are treated equally:

 

The first time during the processing of an request by SAP NetWeaver Gateway the url query parameters get extracted into the context object, is in method `DISPATCH` in class `/IWFND/CL_SODATA_ROOT_HANDLER` starting line 167:

 

*-set parameters - not exposed in read_entry method therefore tunnel via context   lt_query_parameters = io_request->get_uri_query_parameters( ).   io_context->set_parameter(     EXPORTING       iv_name  = /iwfnd/if_sodata_types=>gcs_iwf_context_parameters-query_parameters       iv_value = lt_query_parameters   ).

Now the `io_context`'s attribute `mt_parameter` looks as follows:

 

NAMEVALUE
IWFND/QUERY_PARAMETERSall query parameters encoded in a standard table type TIHTTPNVP
<other parameters set to the context>

 

Some lines of code later in method `DISPATCH` in class `/IWCOR/CL_DS_HDLR_ROOT` starting line 43 :

 

lt_parameter = io_request->get_uri_query_parameters( iv_encoded = abap_false ).
lo_uri = /iwcor/cl_ds_uri_facade=>parse_uri(         io_edm = lo_edm         iv_resource_path = lv_resource_path         it_query_parameter = lt_parameter       ).

Now the `io_context`'s attribute `mt_parameter` looks as follows:

 

NAMEVALUE
IWFND/QUERY_PARAMETERSall query parameters encoded in a standard table type TIHTTPNVP
~uri

all query parameters decoded in a structure containing only one component:

It's named `INSTANCE` and is a `REF TO /IWCOR/CL_DS_URI`.

<other parameters set to the context>

 

The processing is going on and then in method `/IWCOR/IF_DS_PROC_ENTITY_SET~READ` in class `/IWFND/CL_SODATA_PROCESSOR` starting line 63 the method `INIT_REQUEST` mentioned in my orginal post yesterday gets called:

 

* Initialization       me->init_request(         EXPORTING           iv_operation         = mcs_operations-read           iv_operation_type    = mcs_operation_types-feed           io_entity_set        = io_entity_set           it_key               = it_key           it_navigation_path   = it_navigation_path           it_expand            = it_expand           it_select            = it_select           io_filter            = io_filter           io_orderby           = io_orderby           iv_skip              = iv_skip           iv_top               = iv_top           iv_format            = iv_format           iv_for_ds_operation  = iv_for           iv_skiptoken         = iv_skiptoken           iv_inlinecount       = iv_inlinecount         IMPORTING           es_request           = ls_odata_request           et_parameter         = lt_dolar_parameter           eo_target_entity_set = lo_target_entity_set       ).

Looking up the stacktrace the variables `iv_skip`, `iv_top`, ... get populated using the corresponding attributes from the instance of `/IWCOR/CL_DS_URI` stored in the `io_context`'c `mt_parameter` table. Because the parameters handed to the constructor of `/IWCOR/CL_DS_URI_FACADE` (the class actually referenced to in `mt_parameters`, subclass of `/IWCOR/CL_DS_URI`) were correctly decoded, the constructor could detect them as system query options and stored the values in it's corresponding attributes.

 

Now we take a look in method `INIT_REQUEST` in class `/IWFND/CL_SODATA_PROCESSOR` if there is any code accessing the still encoded parameters stored in `mt_parameters`'s `IWFND/QUERY_PARAMETERS` (Note: I added comments including the line numbers at which the code snippets can be found in the method):

 

* NOTE: line 455
* Get uri parameters     mo_context->get_parameter(       EXPORTING         iv_name  = /iwfnd/if_sodata_types=>gcs_iwf_context_parameters-query_parameters     " Name       IMPORTING         ev_value = lt_uri_query_parameters     ).
 * Search     CLEAR ls_dollar_parameter.     READ TABLE lt_uri_query_parameters INTO ls_dollar_parameter       WITH KEY name = /iwfnd/if_sodata_types=>gcs_uri_parameters-search.     IF sy-subrc EQ 0.
* NOTE: Setup search     ENDIF.
* NOTE: line 478
* startIndex for search     CLEAR ls_dollar_parameter.     READ TABLE lt_uri_query_parameters INTO ls_dollar_parameter       WITH KEY name = /iwfnd/if_sodata_types=>gcs_uri_parameters-startindex.     IF sy-subrc EQ 0.       INSERT ls_dollar_parameter INTO TABLE et_parameter.     ENDIF.
* delta token     CLEAR ls_dollar_parameter.     READ TABLE lt_uri_query_parameters INTO ls_dollar_parameter       WITH KEY name = /iwfnd/if_sodata_types=>gcs_uri_parameters-delta_token_tmp.     IF sy-subrc EQ 0.
* NOTE: Setup delta token     ENDIF.
* NOTE: line 512 
* totals     CLEAR: es_request-technical_request-totals.     READ TABLE lt_uri_query_parameters INTO ls_dollar_parameter         WITH KEY name = /iwfnd/if_sodata_types=>gcs_uri_parameters-totals.     IF sy-subrc = 0.
* NOTE: Setup totals     ENDIF.

So the following four parameters wouldn't be recognized if their encoded representation is different to the decoded one:

 

NAMEVALUE
/iwfnd/if_sodata_types=>gcs_uri_parameters-searchsearch

/iwfnd/if_sodata_types=>gcs_uri_parameters-startindex

startIndex
/iwfnd/if_sodata_types=>gcs_uri_parameters-totalstotals
/iwfnd/if_sodata_types=>gcs_uri_parameters-delta_token_tmp!deltatoken

 

Now we can clearly see why only the parameter `!deltatoken` is affected. It has nothing to do with the fact that it's using a '!' instead of the other system query options which are using a '$'. It's just a coincidence

 

 

How would I fix this, working at SAP?

 

I would add `deltatoken` as variable to `/IWCOR/CL_DS_URI` which gets extracted from the decoded parameters during object creation. Then add the import parameter `iv_deltatoken` to the method `INIT_REQUEST` in class `/IWFND/CL_SODATA_PROCESSOR` and use this variable in there instead of implement my own parsing using `READ TABLE`.

 

I would NOT change the value of `io_context`'s `mt_parameter`'s `IWFND/QUERY_PARAMETERS` from encoded parameters to decoded parameters as it can't be definitely said that this wouldn't cause side effects in other SAP coding or already existing customer coding!

 

 

Note: All line numbers were fetched on SAP_GWFND 740 SPS 09

Coming soon: SAP CodeJam in Bielefeld

How to enable SAP enterprise service for SAP Gateway Odata service?

$
0
0

Dear Gateway Experts,

 

Do you know how to convert an SAP enterprise service into a SAP Gateway Odata service?

in SEGW , i  didnot find anything related to enterprise service.

 

Could you possible help on this?

 

regards,

Yueqiang

How to replace server url to proxy url in OData Response

$
0
0

Hello experts,

 

 

i'm facing a problem with SAP gateway in combination with a proxy . We use a proxy to call SAP gateway from the Internet.

 

So we make a http call to the proxy like: http://proxyserver:8000/sap/opu/odata/sap/testservice.

 

But in the OData response in every href tag of the xml the url shows the internal server url like

 

atom:link rel="self" href="http://internalserver:8000/sap/opu/odata/sap/testservice/$metadata"/>

 

Especially in a senario when using a proxy we don't want to give the internet (external) user information about the inner infrastructure.

 

Is there a posibillity to change the urls in the OData document to the url of the proxy?

 

Many thanks

 

Xiang

Problem with Deep Entity Insert

$
0
0

Hello,

 

 

I have a problem in Deep Entity Insert.

I have added data from the request payload for the 3 custom structures created with a key parameter, how is it possible to check the data entered in the table structure?

 

Is it possible to check the data in the header and corresponding item table??

 

 

 

Please Help me with this...

 

 

 

 

Thank You.

Trouble understanding oDataModel.callFunction results

$
0
0

Hello,

 

I am attempting to write an Fiori POC which calls a function import of a gateway service to process a record.  The function import works fine when I test it in a browser.  I can call it okay from an event handler in my Fiori app, but I'm having trouble understanding how to get the resulting data back into my app.  I apologize ahead of time for the simplicity of my questions.  I'm a long time ABAP developer who is just getting a chance to branch out a bit...

 

Question 1: I found this thread, How to call Function Import from SAP UI5  and get the return object in table?, which was very helpful.  I have a created a function with two parameters; odata and response.  It is called correctly, but I don't understand how I go about collecting the results from the odata parameter.  The example thread above has this snippet for cardinality 0..n or 1..n values.  But what do I use for cadinality of 1, like say I'm returning an entity that is derived from the ADRC table?

 

  1.      "d"
  2.      { 
  3.           "__metadata"
  4.           { 
  5.                "type":"Collection(<<complex type name>>)" 
  6.           }, 
  7.           "results"
  8.           [  
  9.                /* an array of data records */ 
  10.           ] 
  11.      } 

 

Question 2.  I set an external breakpoint in the ABAP code for my service and tested my Fiori app in the WebIDE.  Both the error and success functions for my callFunction method are invoked before I hit my external breakpoint.  Is this expected.  I thought the error function would only be called if there was an error and the success function would be called after my service has returned, but that doesn't seem to be happening.

 

Thank you very much for any insight you can offer.

 

Best regards,

John


Extending My Timesheet V2 oData service

$
0
0

Hi experts,

 

I'm new to Fiori extensibility and I'm trying to figure out how to extend the service provided in My Timesheet V2.

As far as I understand the service I want to redefine should exist in service builder (SEGW).

 

But I'm getting an error mesage saying:

Project 'HCM_TIMESHEET_MAN_SRV' does not exist

 

HCM_TIMESHEET_MAN_SRV is the provided oData service according to SAP documentation.


What are the step then to extend a service? Is there any other tool to use in order to extend or redefine an oData service?

 

Any pointers will be highly appreciated.

 

Regards,

Laura

Implementing an Odata service for Elementary search help

$
0
0


SAP has  introduced support for search help as a data source since version SAP NetWeaver Gateway 2.0 SPS 08. This blog servers as a step by step guide to implemented an Odata service for elementary search help using service builder.

 

Before we being with the steps for creation, below are some of the limitations for this service as noted on the help.sap portal page for gateway development.

  • Only elementary search helps are supported. Collective search helps are not supported.
  • Search helps that call UI in their exit function are not supported, as this cannot be validated by the Service Builder.
  • At runtime, a query operation that is based on a search help data source can retrieve a maximum of 9,999 entries.

 

For this blog i am going to use a simple, custom search help with two input and out parameters. The hitlist upon execution displays the equipment type code and description. The search help interface is shown in the figure attached belowShlp_interface.png

 

  1. Create a new project and select Data Model>Import>Search Help to bring up the entity creation wizard. On step 1 of the wizard choose 'Search help' from the Data Source Attribute> Type dropdown and enter or select the search help for which you need to create oData service. Click Next when done.

 

Step1_1.png

Step1_2.png

 

2.     In step 2 of the wizard, select the structures from search help result table that you want to use for modeling your entity. On the next screen set the properties you want as keys and click finish. As a rule of thumb you should select all properties that have 'IMP' flag set in the search help definition as your keys of the entity type definition ( only properties marked as 'Key' can be used to import values from the consumer client ).

Step2_1.png

Step2_2.png


     Check your service for consistency.

Step2_3.png

3.     Create EntitySet for the entity type created in previous step.

Create_entity_set_1.png

4.     Map the datasource (Searchelp) to the Read and Query operations of the Entity Set created in previous step. All Entity type properties marked as Key in step2 have to be mapped ( in addition to proposed mapping ) as import parameters when mapping datasource for Read query.

          * Only the Query and Read operations can be mapped for entity sets derived from the search help data source

Step4_1.png

 

Step4_2a.png

Step4_3a.png

5.     Generate the runtime artifacts by clicking on the 'Generate Runtime Objects' button and check the project consistency by clicking the check button.

Step5_a.png


6.     Register your service on all systems which have the GW_CORE component installed. Remember that the External service name will be default to the technical service name.

Step6.png

7.     Using the netweaver gateway client ( on your gateway hub system or local - depending on architecture) you can test the service to ensure it works as expected.

 

successful gateway query.png

8. If you leave development at this stage  you will notice that filtering ( using $filter ) will not work. I think this is a bug, if someone notices differently please leave a comment and I will remove the portion hereon.

To enable filtering for Entity set data, the 'EnttitySetName_GET_ENTITYSET' method of the Data provider class extension class (ZCL_ZCA_TEST_EQUIP_TYP_DPC_EXT->EQUIPMENTTYPECOL_GET_ENTITYSET for this example) is redefined and the following code needs to be added in.

To redefine the method copy code from the data provider class and modify it with the following code snippets.

 

In the data declaration section :

Filter_enh1.png

 

 

****** Added to handle missing code for filter functionality *********

  DATA: ls_filter_select_options LIKE LINE OF lt_filter_select_options.

  DATA: ls_select_option_values  TYPE /iwbep/s_cod_select_option.

 

 

Just before the call for search help values is made using method 

me->/iwbep/if_sb_gendpc_shlp_data~get_search_help_values( )

Filter_enh2.png

 

 

**** Add missing code to allow for filtering of records **********

  IF NOT lt_filter_select_options[] IS INITIAL.

    LOOP AT lt_filter_select_options INTO ls_filter_select_options.

      ls_selopt-shlpname  = 'ZPMH_TAR_EQART'.

      ls_selopt-shlpfield = ls_filter_select_options-property.

      LOOP AT ls_filter_select_options-select_options INTO ls_select_option_values.

        ls_selopt-sign     = ls_select_option_values-sign.

        ls_selopt-option   = ls_select_option_values-option.

        ls_selopt-low      = ls_select_option_values-low.

        ls_selopt-high     = ls_select_option_values-high.

        APPEND ls_selopt TO lt_selopt.

      ENDLOOP.

      CLEAR ls_selopt.

    ENDLOOP.

  ENDIF.

 

 

Now if you try filtering the oData result set you will get only relevant response as shown in the figure below.

filter_enh_result.png

Sign up form - System is down

$
0
0

Hello,

 

I try to sign up for a SAP Netweaver Gateway Service Consumption System, but the web site (link) with the sign in form is not working well. I always get the information that the System is "down" ...

 

Any ideas ?

 

HJ

SAP CLM and SAP UI5 application using netweaver gateway

$
0
0

Hi All,

 

One of our customer is looking to enable SAP CLM workflow process on Mobile using SAP UI5.

But I am having doubt whether it is really possible to have Netweaver gateway over SAP CLM? Please reply.

 

If it is possible then my development approach would be as below.

 

1) Create Custom webservices or use standard webservices of SAP CLM workflow

2) Consume those web services from SAP UI5

3) Deploy this SAP UI5 application as BSP application in Netweaver gateway

4) Register this application in  SAP Fiori Launchpad

 

Kindly let me know my approach is really feasible or not?

If not please let me know alternate solution.

 

 

Regards,

Kaivan Shah

how to find the link between technical service name and project in netwever gateway

$
0
0

Hello,

 

   How to track the link between the technical service name and the project with which the service was created.

 

   From the Tcode /IWFND/MAINT_SERVICE, we could able to find the Techincal service name but from this i need to know the SEGW project name with which this service is created.

 

Thanks & Regards,

Sathish

Viewing all 750 articles
Browse latest View live


Latest Images

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