Quantcast
Channel: SCN : Unanswered Discussions - SAP Gateway
Viewing all 1745 articles
Browse latest View live

need to enhance entity type properties from data model

$
0
0

Hello,



i work on "My Shopping Cart" SRM Fiori application.

I need to add a customer field among an entity type's properties. The ABAP structure type name is /SRMNXP/S_SC_HEADER:i added my CUF in its include  /SRMNXP/INCL_CUS_MINISC_HDR.

 

In SEGW, i created a Z project and i redefined the SAP GW OData technical service name /SRMNXP/SHOPPING_CART.

Then, i imported the properties from data source in order to add my CUF.

Finally, i generated the runtime objects (artifacts).


Nevertheless, data provider base and extension classes failed due to syntax error (The final class "/SRMNXP/CL_DATA_ACCESS_BASE" cannot have any subclasses).

What am i missing?


Moreover, after solving this point, is there any other steps to realize?


One final question: where can i look at standard entity types for a technical service (as the way displayed in SEGW after OData service redefinition?)


Thank you for you help.

 

Regards.

 

 

Laurent.


Cache Issue

$
0
0

Hi ,

 

I have a scenario where we need to read data from cache without hitting the Backend. in the first call the Query will be called and in second call the data should read from Cache. How can we achieve this at gateway ?

Media/MIME config in Vocabulary-based SEGW project

$
0
0

Dear Gurus,

 

 

I successfully implemented an SEGW  project with SAP Annotations already, which is working properly and managing attachments. Now I want to do the same within a project of Vocabulary-based annotations.

I got the error: 415 (Unsupported Media Type). This is due I do not know, how-to configure the entity and its properties in SEGW to set this entity as Media Type, I feel myself a bit lost.

What I already did, is that redefined the DEFINE method of Model Provider to set up the Property holding the Content Type:

 

  METHOD define.    super->define( ).    DATA(lo_entity_type) = model->get_entity_type( iv_entity_name = gc_attachment ).    IF lo_entity_type IS BOUND.      lo_entity_type->get_property( iv_property_name = 'MimeType' )->set_as_content_type( ).    ENDIF.  ENDMETHOD.

set MediaType for the MimeType property

05_entity_prop.png

set allowed file extensions

10_entity_allowe_types.png

 

and set MediaResource configuration, but unsuccessfully:

15_media_rsrc.png

 

 

I wiped the cache and got the same issue time to time in the standard, when processing a newly created entities. The processing in the gateway is dependent of  the following statement: lo_entity_type->has_stream( ), which is always false, and therefore the entity is evaluated not as a Media, and the exception 415 (Unsupported Media Type) is raised by the GateWay. Our release is GW 740sp11.

 

Any advise is welcome

 

Thank you

Deserialization of xml failed via transformation GetEntitySet

$
0
0

Hi experts

 

i'm implementing a SAPUI5 app, which should get some imformations from ECC side.

To do this, i've implemented a service which is working fine only for GetWEntity method:

/sap/opu/odata/sap/zfiori_read_orders_srv_02/EtOrdersSet('40504*')

 

I've set the service also for the GetEntitySet method, but the transformation which should deserialize the XML is failing.

calling the service in this way:

/sap/opu/odata/sap/zfiori_read_orders_srv_02/EtOrdersSet?$filter=Vbeln eq '4050344*', transformation get only the 5th char of the string, and in parameters i found VBELN = 0000040503.

 

The transformation is perfomed in this method:

/IWBEP/CL_MGW_REMOTE_HANDLER==CP   method DESERIALIZE_REQUEST.

 

 

DATA: lo_xml_reader  TYPE REF TO if_sxml_reader.

 

 

   IF iv_request_data IS NOT INITIAL.

 

     lo_xml_reader = create_xml_reader( iv_request_data ).

 

     CALL TRANSFORMATION id

        SOURCE XML lo_xml_reader

        RESULT     context        = es_request_context

                   entity         = ev_entity_data

                   model_id       = ev_model_id

                   language       = ev_language

                   text_keys      = et_text_keys

                   technical_name = ev_vocab_id

                   version        = ev_version.

 

   ENDIF.



Any help?


Best regards

Marco

Fiori Launchpad custom application open error

$
0
0

Hello,

 

We have developed several custom Fiori applications via WEBIDE and deployed to the Netweaver Gateway. After all the customizing steps and creation of tiles in the Fiori Launchpad Designer, we are facing a strange error when opening the application in the launchpad. We have tried using LPD_CUST and putting directly the app url in the tile definition, both ways don't work however. There isn't any error log in /IWFND/ERROR_LOG. (event with trace level to 3). The error in the browser (IE11, not possible with Chrome due to VPN limitation) inspector says "Error in OData response for POST "/sap/opu/odata/UI2/INTEROP/$batch": HTTP request failed" and "Failed to resolve navigation target: #ZOT-modify - Error in OData response for POST "/sap/opu/odata/UI2/INTEROP/$batch": HTTP request failed sap.ushell.renderers.fiori2.Shell.controller".

 

By comparing with another gateway configuration, we are pretty sure the customizing of LPD_CUST, system alias and launchpad designer should be correct. We have also tried to clear the cache with different reports and transactions in gateway and ecc.

 

Anyone could please give us some hints? Thanks in advance.

 

Here is an example:

lpdcust.JPG

targetmapping.JPGtile.JPG

Upload Images into SAP DMS using Gateway/UI5

$
0
0

Dear SAP Gurus,

 

We have a requirement to upload images into SAP DMS using UI5 application. I've checked on UI5 and we can pass a File object as shown below to Gateway. I'm using

 

UI5.png

There are many threads on passing images to Gateway but I'm unable to figure out how can we use the Image object in Gateway to create a SAP DMS document. I checked this thread that talks about uploading PDF in DMS but does not explain on how to create the document in DMS.

 

 

Is there any way to create documents into SAP DMS using Image as BINARY/BASE64 OR XSTRING/STRING. Please note I cannot pass image file location as C:\Image\sap.jpg

 

Regards,

Umesh

Multiple single values to a parameter in ODATA bex query

$
0
0

Hi All,

 

we have a requirement to a bex variable with several single values.

once meta data is generated,how to pass multiple single values in URI.

 

please provide syntax.

 

Your help is much appreciated.

CSRF token validation failed in Odata4j

$
0
0

Hi all,

 

I'm trying to post the entry to Odata service Url which is created in ABAP backend. When i'm trying to send the data from java code to ABAP system via Odata service, I'm getting CSRF Token validation error. Below is the code snippet for Odata Post service

 

 

// TESTCASEXML_ODATA = URL of the Odata service

ODataJerseyConsumer consumer = ODataJerseyConsumer.create(TESTCASEXML_ODATA);

  ODataJerseyConsumer.Builder builder = ODataJerseyConsumer.newBuilder(TESTCASEXML_ODATA);

              

                 // Authentication

                 builder.setClientBehaviors(new OClientBehavior(){          

                          @Override

                          public ODataClientRequest transform(ODataClientRequest request) {

                             String userPassword = USERNAME + ":" + PASSWORD;

                             String encoded = Base64.encodeBase64String(userPassword.getBytes());

                             encoded = encoded.replaceAll("\r\n?", "");

                                   

                              // Necessary headers to do PUT and POST operations

                             request = request.header("X-Requested-With", "XMLHttpRequest")

                                              .header("Authorization", "Basic " + encoded);     

                                           

                             return request;

                       }});

                 consumer = builder.build();

              

            

 

 

  OCreateRequest<OEntity> createRequest = consumer.createEntity("LogSet").properties(OProperties.string("TestplanId", "111")).properties(OProperties.string("ProcessId", "222")).properties(OProperties.string("Seqno", "33"));

       

 

 

  // Execute the OData post

  createRequest.execute();

 

 

 

 

 

Please suggest me the solution to avoid this issue

 

Thanks and Regards,

Naveen


Unable to open SAP gateway client.

$
0
0

I  have written a odata service in recently installed gateway system which is SAP NETWEAVER VERSION 7.4 SP8. After registering the service when I tried to open the SAP Gateway client I couldnt find any session opened. When tried to click SAP Gateway client couple of times , I see a popup saying that the maximum GUI sessions have exceeded.But I dont find those many sessions opened.What could be the issue ? Could anybody please help me out here!!

Connection of API to API

$
0
0

Dear Expert,

                       I have a req that i need to update the status of my online payment transaction in back end, i don't have any idea of how to connect API and get my transaction details so that i can update my status. Please reply ASAP its very urgent.

 

 

Thanks & Regards

Syed

Setup OAuth 2.0 on SAP Gateway

$
0
0

Hello,

 

Does anyone know where we can find the information regarding set up oAuth 2.0 on sap gateway ?

We have our Fiori and UI5 application running on SAP NW Gateway, our idea is using Azure AD SSOserver to server oauth authentication scenario , following the Authorization Code flow  scenario, not SAML2.0 bearer assertion, we found some information from this URL -

OAuth 2.0 Flows with OAuth 2.0 Client - User Authentication and Single Sign-On - SAP Library

 

We don't have SAP Gateway for Microsoft and have no WAS or SAP Portal in our landscape.

 

Thank you.

 

Benj.

No response from Server

$
0
0

Dear experts,

                    I trying to get status from sandbox server but getting 404 - Not Found error in status code below is my code please check and help me ASAP.

 

data: lo_http_client     type ref to if_http_client,

         lv_service         type        string,

**        lv_service         TYPE rfcdest VALUE 'CITRUS',

         lv_result          type        string,

         lo_ixml            type ref to if_ixml,

         lo_streamfactory   type ref to if_ixml_stream_factory,

         lo_istream         type ref to if_ixml_istream,

         lo_document        type ref to if_ixml_document,

         lo_parser          type ref to if_ixml_parser,

         lo_weather_element type ref to if_ixml_element,

         lo_weather_nodes   type ref to if_ixml_node_list,

         lo_curr_node       type ref to if_ixml_node,

         lv_value           type        string,

         lv_node_length     type        i,

         lv_node_index      type        i,

         ls_weather         type        zweather,

         lv_node_name       type        string,

         lv_node_value      type        string.

 

 

   data lv_message type string.

   data tran_id type zms_trans.

 

   data: http_status_code type i.

   data: status_text type string.

   data w_result type xstring.

 

 

   lv_service = 'http://sandXXXXadmin.pay.com/api/v2/txn/enquiry'.

 

 

   cl_http_client=>create_by_url(

     exporting

       url                = lv_service

**      proxy_host         = 'sandXXX.pay.com' "

**       proxy_service     = '1api6ek84h'

     importing

       client             = lo_http_client

     exceptions

       argument_not_found = 1

       plugin_not_active  = 2

       internal_error     = 3

       others             = 4 ).

 

 

 

   data soap_action type string.

 

**  CONCATENATE lv_service '#' 'b79tjdmuw9.MSETCL30000021' INTO soap_action.

   concatenate lv_service '?' '/MSETCL30000021' into soap_action.

 

 

   call method lo_http_client->request->set_header_field

     exporting

       name  = '~host'

       value = 'b79tjdmuw9'"sandbox.citruspay.com'.

 

 

   call method lo_http_client->authenticate

     exporting

       proxy_authentication = abap_true

       username             = 'tejastikale@gmail.com'

       password             = 'Msetcl@2015'.

 

   call method lo_http_client->request->set_header_field

     exporting

       name  = '~server_protocol'

       value = 'HTTP/1.1'.

 

 

   call method lo_http_client->request->set_header_field

     exporting

       name  = '~request_method'

       value = 'POST'"'GET'.

 

   call method lo_http_client->request->set_header_field

     exporting

       name  = 'Accept'

       value = 'application/json'.

 

   call method lo_http_client->request->set_header_field

     exporting

       name  = 'Content-Type'

       value = 'application/json; charset=utf-8'.

 

   call method lo_http_client->request->set_method

     exporting

       method = 'POST'. "co_request_method_get.

 

**--Set Url to request

   cl_http_utility=>set_request_uri( request = lo_http_client->request uri = soap_action ).

 

 

 

**  CALL METHOD lo_http_client->request->set_header_field

**    EXPORTING

**      name  = 'SOAPAction'

**      value = soap_action.

 

 

**  lo_http_client->request->set_header_field(

**    EXPORTING

**      name  = '~request_uri' " Name of the header field

**      value = soap_action " HTTP header field value

**  ).

 

 

   lo_http_client->get_last_error( importing message = lv_message ).

 

   "STEP-3 :  SEND HTTP REQUEST

   call method lo_http_client->send

     exceptions

       http_communication_failure = 1

       http_invalid_state         = 2.

 

*-----------------------------------------------------------------

 

   "STEP-4 :  GET HTTP RESPONSE

   call method lo_http_client->receive

     exceptions

       http_communication_failure = 1

       http_invalid_state         = 2

       http_processing_failed     = 3.

 

   "STEP-5 : Read HTTP RETURN CODE

 

   call method lo_http_client->response->get_status

     importing

       code   = http_status_code

       reason = status_text.

 

   "STEP-6 :  READ RESPONSE DATA

   call method lo_http_client->response->get_cdata

     receiving

       data = w_result.

 

   call method lo_http_client->response->get_data

     receiving

       data = w_result.   " Binary data

 

   data lt_data type srt_xml_data_tab.

 

   call function 'SRTUTIL_CONVERT_XML_TO_TABLE'

     exporting

       xdoc = w_result

     importing

       data = lt_data.

 

 

   call method lo_http_client->close

     exceptions

       http_invalid_state = 1

       others             = 2.

 

 

 

 

 

Error Screen in Get_data IT_DATA.

issue.PNG

Best Practice for Associations

Note:2241188 for SP13 But I need Same Process Note for SP08 :Fiori runtime error $filter value is cut off on SAP_GWFND SP08

$
0
0

Dear Experts,

 

When i am doing Expandset i am passing filter . i am reading table IT FILTER SELECT OPTIONS but my string gets cut off. like

 

Actucal Value ABCD but i am getting ABC only.

 

I am facing same issue Empty Sales Order in Fiori Track Sales Order . We have SP08. the note 2241188 for SP13 . So i need same kind of note for SP08. .

 

I need note for SP08 for odata IT_FILTER_SELECT_OPTIONS values is cutting off.

 

Thanks in Advance

 

Best Regards,

Sathish Mani

Issue in configuring the Service URL in Salesforce

$
0
0

I have configured the service URL in the URL section. But the Validate and Sync is not showing the Status as Success. Instead of that, its showing the Service URL in the Status section.

 

The service URL is working fine in the browser.

 

Please give your suggestion to fix this issue.


Batch processing request error

$
0
0

Hi Experts,

 

I am trying to understand $Batch operation by executing standard service GWSAMPLE_BASIC to check Batch processing by following below link

 

  $batch Processing - SAP Gateway Foundation (SAP_GWFND) - SAP Library

 

I am getting below error, can any one please help me with the solution.

 

HTTP Request :-

 

https://<host>:<port>/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/$batch

--batch_005056A5-09B1-1ED1-BF82-409B26A80300

Content-Type: multipart/mixed; boundary=changeset_005056A5-09B1-1ED1-BF82-409B26A80301

 

--changeset_005056A5-09B1-1ED1-BF82-409B26A80301

Content-Type: application/http

Content-Transfer-Encoding: binary

Content-ID: 100

 

POST SalesOrderSet HTTP/1.1

Content-Type: application/atom+xml

Content-Length: 1021

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

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

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

<d:SalesOrderID></d:SalesOrderID>

<d:Note>Deliver as fast as possible</d:Note>

<d:NoteLanguage>EN</d:NoteLanguage>

<d:CustomerID>0100000000</d:CustomerID>

<d:CustomerName>SAP</d:CustomerName>

<d:CurrencyCode>EUR</d:CurrencyCode>

<d:GrossAmount>25867.03</d:GrossAmount>

<d:NetAmount>21737.00</d:NetAmount>

<d:TaxAmount>4130.03</d:TaxAmount>

<d:LifecycleStatus>N</d:LifecycleStatus>

<d:LifecycleStatusDescription>New</d:LifecycleStatusDescription>

<d:BillingStatus/>

<d:BillingStatusDescription>Initial</d:BillingStatusDescription>

<d:DeliveryStatus/>

<d:DeliveryStatusDescription>Initial</d:DeliveryStatusDescription>

<d:CreatedAt>2015-03-22T23:00:00.0000000</d:CreatedAt>

<d:ChangedAt>2015-03-22T23:00:00.0000000</d:ChangedAt>

</m:properties>

</atom:content>

</atom:entry>

 

--changeset_005056A5-09B1-1ED1-BF82-409B26A80301

Content-Type: application/http

Content-Transfer-Encoding: binary

 

POST $100/ToLineItems HTTP/1.1

Content-Type: application/atom+xml

Content-Length: 1021

 

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

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

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

<d:SalesOrderID></d:SalesOrderID>

<d:ItemPosition></d:ItemPosition>

<d:ProductID>HT-1001</d:ProductID>

<d:Note>EPM DG: SO ID 0500000000 Item 0000000020</d:Note>

<d:NoteLanguage>EN</d:NoteLanguage>

<d:CurrencyCode>EUR</d:CurrencyCode><d:GrossAmount>2972.62</d:GrossAmount>

<d:NetAmount>2498.00</d:NetAmount>

<d:TaxAmount>474.62</d:TaxAmount>

<d:DeliveryDate>2015-03-29T22:00:00.0000000</d:DeliveryDate>

<d:Quantity>2</d:Quantity>

<d:QuantityUnit>EA</d:QuantityUnit>

</m:properties>

</atom:content>

</atom:entry>

 

--changeset_005056A5-09B1-1ED1-BF82-409B26A80301--

 

--batch_005056A5-09B1-1ED1-BF82-409B26A80300--

 

-------------------------------------------------------------------------------------------------------------------------

Screenshot of Error :-

Batch.png

 

 

Thanks in  Advance.

Standalone SAP NW Gateway 2.0

$
0
0

Hello All,

 

i have few questions, as i was asked to instal standalone gateway 2.0

 

1. Is there any configuration guide for Standalone SAP Gateway 2.0 SP12 on Linux based on SAP NW 7.5 ?

2. How can i connect and configure gateway ? It doesn't have DB and I expect that it will be only service running on OS but how can I connect to this gateway ?


3. Will there be enough only to install standalone GW 2.0 and to backend systems implement SP IW_BEP ? or is there some other activity needed ?

on marketplace i've found only configuration if i use embedded gateway (go to SPRO ...) but nothing about hub solution.

 

Thank you

Query Options for SEGW/SADL ODATA Services not available

$
0
0

The document ( How to Fine-Tune the Execution of SADL-Based Gateway Services - Using the Query Options API, SAP NetWeaver 7.4 SP10 and higher Document Version: 7.4 SP10 V1 – 2015-03-09) states, that if one generates SADL based Odata services from a CDS View via SEGW,

the underlying and automatically generated model class (MPC) will implement the interface 'if_sadl_gw_query_options'.

 

Unfortunately this does not happen in our system (7.5 SP1) at all. The interface is missing in the generated MPC class.

 

Which steps have to be taken to enable that feature, or if that functionality is not available anymore under 7.5, what is best practice to customize query options in SADL based OData services?

 

HTTP Receive failed: Connect to :8000 failed: NIEHOST_UNKNOWN(-2)

$
0
0

Hi Expert,

 

I am getting error while clicking entity Sets.

screen shot attached for the same.b.PNG

 

pls help me for resolving this issue.

 

Regards,

 

SAM

how to pass multiple single entry for a variable in odata

$
0
0

/sap/opu/odata/sap/TESTQUERY_SRV/TESTQUERY(ZTCOUNTRY_SSV='ZZ')/Results

 

Hi Gurus,

 

I want to pass multiple values single values for my variable on bw query

eg: ZTCOUNTRY_SSV='ZZ'  and ZTCOUNTRY_SSV='AA'

 

 

Is this possible? What should be the syntax in URL?

 

Kindly help

 

Regards,

Preeti

Viewing all 1745 articles
Browse latest View live


Latest Images

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