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

SAP Gateway client not working

$
0
0

We have setup a new system embedded deployment and installed gateway sp13. During configuration , i realised that the gateway client is nt working to test OData services as in below screenshot. Rather its working well when opening in browser.

 

gatewayclient error.png

 

Is there any additional configuration to be done to get Gateway client up and running.


Linebreak with sap.m.TextArea and ABAP oData Service

$
0
0

Hello,

 

if you want to output a string from an abap backend with an oData service into a sap.m.TextArea and you require a linebreak in the textarea, user this attribute

cl_abap_char_utilities=>cr_lf in the abap backend oData service.

 

As seen often \r\n, \n, or html chars won't work in the sap.m.TextArea

 

Have a nice day & kind regards,

Michael

Multi-origin error with JSON

$
0
0

Dears,

  I'm facing the following error "Inline component is not defined or not allowed (HTTP PUT)" at the time of executing a Request-URI with multi-origin.

 

/sap/opu/odata/zget_materials_SRV;mo/MaterialSet


{

"SAP__Origin":"My_001",
"Material":"0065",
"Werks":"0025",

"NavArti": [],

"NavValu": []

}

 

  The HTTP method is a POST one and it is redefined in method CREATE_DEEP_ENTITY

 

 

  Do you know if there are any kind of restrictions while using JSON format and method POST within CREATE_DEEP_ENTITY?

 

Thanks in advanced!

Cost Center

$
0
0

Hi Experts,

 

Urgently require Help for the below case...

 

I have created the Service PO ( PO # 4500017383; Account Assignment Category : U;Item Category : D)  in SAP IDES Demo System..

 

While creating SES, its automatically taken GL account and i need to mention the COST CENTER ...

 

If mention the cost center, its displaying Error Like " Version 0 is not defined in the fiscal year"

 

Since its IDES - DEMO system, i don't have access to resolve the above Error...

 

Can anyone  help me to resolve the case....

 

 

Regards

Selvi

How can I get the response body of CREATE_DEEP_ENTITY in JSON?

$
0
0

Hi Everyone,

 

I am using Create_Deep_Entity, and In TCODE '/IWFND/MAINT_SERVICE' I am passing the request body in JSON format but the response body is in XML format.

 

Request Body:

 

{

"START_DATE":"2016-03-13",

"END_DATE":"2016-03-20",

"VERSION":"1.4.3"

}

 

Response Body:

 

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

 

-<entry xml:base="http://sapgw/sap/opu/odata/sap/ZTM_SRV/" xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">

 

 

 

<title type="text">DELETESCHSet(START_DATE='2018-03-13',END_DATE='2018-03-20')</title>

 

 

<updated>2016-05-11T14:27:08Z</updated>

 

 

<categoryterm="ZTM_SRV.DELETESCH" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />

 

 

<linkhref="DELETESCHSet(START_DATE='2018-03-13',END_DATE='2018-03-20')" rel="self" title="DELETESCH" />

 

 

-<content type="application/xml">

 

 

-<m:properties>

 

 

<d:START_DATE>2018-03-13</d:START_DATE>

 

 

<d:END_DATE>2018-03-20</d:END_DATE>

 

 

<d:VERSION>1.4.3</d:VERSION>

 

 

<d:STATUS_CODE>Schedule does not exist - not deleted</d:STATUS_CODE>

 

 

<d:LAST_UPDATED>2016-05-11 10:27:08 +0000</d:LAST_UPDATED>

 

 

<d:EMPLOYEE_TYPE>Hourly</d:EMPLOYEE_TYPE>

 

 

<d:MESSAGE>Schedule does not exist - not deleted</d:MESSAGE>

 

</m:properties>

</content>

</entry>


  How can I get the response in JSON?

 

   Thanks,

   Faraz Khan

Is it possible to send only one entity,out of three, to the response body of CREATE_DEEP_ENTITY?

$
0
0

Hi Everyone,

 

I have to pass three input entities in the request body for CREATE_DEEP_ENTITY.

In method DPC_EXT, I have to utilize this input and then have to send another output entity to the Response Body.

 

Now I know that Request Body and Response Body can't be different.

 

So I have designed the Request Body in the following way:

 

I have included Input entities (TIME, TIMESC, and TIMETC) and Output entity(RESPONSE) in single Request Body.

 

JSON REQUEST:

 

{

"VERSION":"1.3.2",

"RESPONSE":[{

}],

"TIME":[{

"DATE":"20160412",

"SUBMIT_TIME_STAMP":"2016-04-14 19:08:34 +0000",

"TIMESC":[{

"DATE":"20160412",

"START_TIME":"080000",

"END_TIME":"160000",

"WORK_HOURS":"8"}],

"TIMETC":[{

"CODE":"A007",

"START_TIME":"055500",

"END_TIME":"064500",

"PREVIOUS_DAY_INDICATOR":"",

"NUMBER_OF_HOURS":"0.8333333333333334",

"USER_COMMENT":"MTE",

"LEAVE_ID":""}],

}


I only want RESPONSE in the output body.

Is it possible to suppress input entities in the Response Body and only have output entity?


Thanks,

Faraz Khan

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!!

How to Pass slash(/) in Odata service

$
0
0

Hi Everyone

 

i want to  pass data to GET_ENTITY set  method in odata service ,

but data contain the slash (/) EX: /ASU/CREATED_AT.

but service is giving error as Invalid URI segment ,

EX URL : /sap/opu/odata/Z/SALES_SRV_0/GetDDICElements('/ASU/CREATED_AT') .

than how to pass that data in url .

 

 

thanks

Regard

Harish


Additional fields on Existing Json-/IWCOR/CX_DS_EP_PROPERTY_ERROR/ error

$
0
0

Hi

 

Consuming the JSON filed by the external system and push into the SAP, If external system sends the same field as in the sap gateway structure then no problem, but when external field sends additional fields to the existing json then sap will raise an error  "/IWCOR/CX_DS_EP_PROPERTY_ERROR/" with message "Property 'XXXX' is invalid. Please let me how to handle it , if the other external system sends an additional fields then sap should not through an error

Licensing of NW Gateway based Application

$
0
0

Hi,

 

  One of our Customers is planning to build a system where over thousands of users (all are employees of the organisation) would like to access data from the ERP by using a UI5 portal. They would access the portal hosted on NW Gateway through a generic user (whose credentials are cached in the browser based application) - and from Gateway extract data from ERP using RFCs through a SERVICE User. These thousands of users are not Business Suite users. In this case, what kind of licence should they go for? Or do they require any licences at all?

 

Does the concept of anonymous licencing work for this to-be design?

 

Regards,

  Tim

An approach to automate oData services in NetWeaver Gateway

$
0
0

I am sharing the approach we took in automating oData services in our custom development project for our customer.


Problem statement / Why we need to automate ?

 

  1. We are developing 40+ GW Services in large insurance project in a landscape comprising of multiple systems : ERP Core, FS-PM, CRM, BI and other third-party products.
  2. As GW Data providers are wrappers of underlying functionalities, there is always a constant change in the backend systems which requires enormous amount of time in troubleshooting the issues

 

Solution / What and how we automated GW Services

  1. Developed a simple program to execute the test cases defined in Gateway client tool.
    1.       A configuration table to maintain which test group / test cases to be executed.
    2.       Logs table to maintain the test execution
    3.       Program which reads data from configuration table and execute the tests using Gateway client APIs and logs the test execution.
  2. Executed this program on a daily basis to test the following
    1.       Functional Regression : Does all the functionalities works as with yesterday
    2.       Performance testing : Captures the response time and content length for each test
    3.        Security testing : Is there any “Forbidden” response

 

Benefits we got

  1. Reduced the manual testing efforts of 5 hours per day resulting in 500 hours of saving for the project in next 6 months (for UAT till go-live)
    1.        200+ GW service operations automated
  2. Proactively monitoring the issues and solving it before the test team report the issues

How to merge data from multiple services running in multiple systems (multiple origin)

$
0
0

This blog will analyze how to achieve data merging of different two back end systems, we can assume the following scenario.

 

data_composition_from_multiple_systems.PNG

 

 

1. Step 1 : Create a Gateway builder project in SEGW in both CRM and BW with same EDM model.

blog_1_segw_project.png

 

2. Step 2 : Implement the data providers in CRM and BW systems.

blog_1_implement_1.png

 

blog_1_implement_2.png

3. Step 3: Register the service in GW Hub (from one system at-least)

blog_1_register.png

 

4. Step 4: Assign the system alias of both CRM and BW in GW Hub.

blog_1_sys_alias.png

5. Step 5 : Test and consume the services.

blog_1_test.png

Error while doing PUT Opeartion

$
0
0

Hi all...

 

Here I am trying to change purchase order then i am getting error after clicking SAVE PO button ...........


I am getting Error  PUT  http://......sap/opu/odata/sap/ZPO_LGWZ_CHG_SRV/PO_HEADER_SET/ 405 (Method Not Allowed).

 

i tried to update one of the parameters in the available oData service for my work,


Kindly help me in this and guide me so that I can update the contents in the back end.

 

specially look the code those i have marked in bold char  PUT method...

 

Here is my code:

 

Please help me in this...........




var btnPrevPO = new sap.ui.commons.Button('btnPrevPO',{

      text : "Edit PO",

      style: sap.ui.commons.ButtonStyle.Emph,

      press : function(){PreviousPo();}

    });

 

 

    var btnSavePO = new sap.ui.commons.Button('btnSavePO',{

      text : "Save PO",

      style: sap.ui.commons.ButtonStyle.Emph,

      press : function(){PostDoc2();}

    });

    //------------------------------------------------------------------------

    function PostDoc2(){

      hdpage.setBusy(true);

      itmpage.setBusy(true);

      matnrpage.setBusy(true);

      vendpage.setBusy(true);

  

  var serviceURI = url+"/sap/opu/odata/sap/ZPO_LGWZ_CHG_SRV/PO_HEADER_SET('"+txt_PrevPO.getValue()+"')?$expand=PO_Navigation/POCOND_NAVI";

OData.request({ requestUri: serviceURI,

                   headers:{"X-Requested-With": "XMLHttpRequest",

                                "Content-Type": "application/atom+xml",

                                "DataServiceVersion": "2.0",

                                "X-CSRF-Token":"Fetch"   },

                   method : "GET",

                user: "**********",

                password: "************" ,

                recognizeDates: true,

 

 

                         },

                         function (data, response){

                           stat = 0;

                           check_fields ();

                           if (stat == 1) {

                    hdpage.setBusy(false);

                    itmpage.setBusy(false);

                    matnrpage.setBusy(false);

                    vendpage.setBusy(false);

              } else {

 

 

                           header_xcsrf_token = response.headers['x-csrf-token'];

 

 

var PostReq = url+"/sap/opu/odata/sap/ZPO_LGWZ_CHG_SRV/PO_HEADER_SET/";               

 

 

                  var PostData = new sap.ui.model.json.JSONModel();

                  var LineItmArr = [] , POCOND_NAVI = [], results = [];

                  var LinesLength = oModel.oData.modelData.length;

                  var PricLength = aCondData2.length;

                  for (i = 0; i < LinesLength; i++){

                    results = [];

                    for (j = 0; j < aCondData2.length; j++){

                      var innerdata = aCondData2[j];

                      for (k = 0; k < innerdata.length ; k++){

                        if (oModel.oData.modelData[i]['LineItem'] == innerdata[k]['LineItem']) {

                          if (innerdata[k]['condtype'] !== '' && innerdata[k]['condval'] !== '') {

                            results.push({

                              ChangeId : '',

                              CondPUnt : '1',

                              CondStNo : '001',

                              CondType: innerdata[k]['condtype'],

                              CondValue: innerdata[k]['condval'],

                              ConditionNo : '',

                              Currency: currency.getValue(),

                              Exppurchaseorder : '',

                              ItmNumber : innerdata[k]['LineItem'],

                              PoItem : innerdata[k]['LineItem']

                            });

                          }

                          else{

                            results.push({

                              ChangeId : '',

                              CondPUnt : "0",

                              CondStNo : '',

                              CondType: innerdata[k]['condtype'],

                              CondValue: "0.000000000",

                              ConditionNo : '',

                              Currency: currency.getValue(),

                              Exppurchaseorder : '',

                              ItmNumber : innerdata[k]['LineItem'],

                              PoItem : innerdata[k]['LineItem']

                            });

                          }

 

 

                        }

                      }

                    }

 

 

 

 

 

 

                    checkMandatory();

 

 

                    if (stat == 1) {

                        hdpage.setBusy(false);

                        itmpage.setBusy(false);

                        matnrpage.setBusy(false);

                        vendpage.setBusy(false);

                    } else {

                      var delvformat = '';

                      if (oModel.oData.modelData[i]['delvdate'] !== '') {

                        jQuery.sap.require("sap.ui.core.format.DateFormat");

                        var oDateFormat = sap.ui.core.format.DateFormat.getDateTimeInstance({pattern: "yyyy/MM/dd"});

                        var dateTemp = oModel.oData.modelData[i]['delvdate'];

                        delvformat = oDateFormat.format(new Date(dateTemp));

                      }

 

 

 

 

                      oModel.oData.modelData[i]['AccAss'] = oModel.oData.modelData[i]['AccAss'].replace(/\s/g,'');  // Remove spaces

                      oModel.oData.modelData[i]['matgroup'] = oModel.oData.modelData[i]['matgroup'].replace(/\s/g,'');  // Remove spaces

                      oModel.oData.modelData[i]['gl'] =

                      oModel.oData.modelData[i]['material'] = oModel.oData.modelData[i]['material'].replace(/\s/g,''); // Remove Space

                      oModel.oData.modelData[i]['netprice'] = oModel.oData.modelData[i]['netprice'].replace(/\s/g,''); // Remove Space

.

.

.

.

.

oModel.oData.modelData[i]['copaSalDoc'].replace(/\s/g,''); // Remove Space

 

 

DelDatcatExt : '',

                        DeleteInd : '',

                        DeliveryDate : delvformat,

                        Exppurchaseorder : '',

                        GlAccount : oModel.oData.modelData[i]['gl'],

                        .

                        .

           .

                        Quantity : oModel.oData.modelData[i]['POQty'],

                        SalesDoc : oModel.oData.modelData[i]['copaSalDoc'],

                        ShortText : oModel.oData.modelData[i]['shorttext'],

 

                      });

 

 

                      PostData = {

 

 

                          "CompCode" : ComCode.getValue(),    "CompCodeX" : "",

"CreatedBy" : createdby.getValue(),   "CreatedByX" : "",

                          "Currency" : currency.getValue() ,  "CurrencyX" : "",

                          "DeleteInd" : "",   "DeleteIndX" : "",

.

.

.

.

.

"Vendor" : txt_vendor.getValue()  ,   "VendorX" : "" ,

                          "hTextNote" : hTextNote.getValue(),

                          "CondNbtval" : CONDNBT.getValue(),

 

 

                          "PO_Navigation":

                            LineItmArr

                        };

                    }

 

 

                  }

                  if (stat == 1) {

 

 

                  } else {

                 var chk_lngth, chk_cond ;

                    chk_lngth = '';

                    chk_lngth = PostData.PO_Navigation.length;

                    for (k = 0; k < PostData.PO_Navigation.length ; k++){

                      chk_cond = '';

                      chk_cond = PostData.PO_Navigation[k].POCOND_NAVI.length;

                      if (chk_cond == 0) {

                        PostData.PO_Navigation[k].POCOND_NAVI.push({

                          ChangeId : '',

                          CondPUnt : "0",

                          CondStNo : '',

                          CondType: '',

                          CondValue: "0.000000000",

                          ConditionNo : '',

                          Currency: currency.getValue(),

                          Exppurchaseorder : '',

                          ItmNumber : '',

                          PoItem : ''

                        });

                      }

                    }

 

 

                    OData.request({

 

 

                        requestUri: PostReq,

                        method: "PUT",

                              headers: {    "X-Requested-With": "XMLHttpRequest",

                                             "Content-Type": "application/atom+xml",

                                             "DataServiceVersion": "2.0",

                                             "Accept": "application/atom+xml,application/atomsvc+xml,application/xml",

                                             "X-CSRF-Token": header_xcsrf_token

                                             },

                            user: "**********",

                          password: "***********" ,

 

 

                          data : PostData,

                         // data : temp,

                      },

                      function (data, response){

                        hdpage.setBusy(false);

                        itmpage.setBusy(false);

                        matnrpage.setBusy(false);

                        vendpage.setBusy(false);

                        if(data['Msg'] == 'E'){

                            tptext.setText(data['Return_Msg']);

                            tptext.setDesign("Bold");

                            tp1.addStyleClass("colorRedText");

                            tp1.setTitle("Error in Posting Document ");

                            tp1.open(sap.ui.core.Popup.Dock.BeginCenter, sap.ui.core.Popup.Dock.RightTop);

 

 

                        }else{

                            tptext.setText(data['Return_Msg']);

                            tptext.setDesign("Bold");

                            tp1.setTitle("PO Doc # : " + data['Exppurchaseorder']);

                            tp1.open(sap.ui.core.Popup.Dock.BeginCenter, sap.ui.core.Popup.Dock.RightTop);

                            tp1.addStyleClass(".colorRedText");

 

 

                            clearLineitm();

                            clearPricing();

                        }

                      },

 

 

                                 function (err) {

                                   hdpage.setBusy(false);

                                   itmpage.setBusy(false);

                                   matnrpage.setBusy(false);

                                   vendpage.setBusy(false);

                                    sap.ui.commons.MessageBox.alert("Error Ocurred: " + ' ' + err.message, "", "Error", "");

 

 

                                    }

 

 

                      );

                  }

 

 

 

 

                }

 

 

                         },

                         function (err) {

                           hdpage.setBusy(false);

                           itmpage.setBusy(false);

                           matnrpage.setBusy(false);

                           vendpage.setBusy(false);

                            sap.ui.commons.MessageBox.alert("Error Ocurred: " + ' ' + err.message, "", "Error", "");

 

 

                            });

 

 

    }

Additional tabs in .xlsx file being generated through Gateway

$
0
0

Hello Experts,

 

I am facing an issue while creating a .xlsx file through Gateway Service using Media entity.

 

We are getting additional tabs 'Input help', 'Column details', 'Column Alias Mapping' apart from 'Sheet 1' which contains the relevant data as per the attached screenshot. Also the name of excel file getting created is coming as $value even though the name is being passed in the class.

 

Below code is being used in DPC_EXT class.

 

"create excel file

   GET REFERENCE OF lt_excel_ex INTO lr_data_ref.

   TRY.

       cl_fdt_xl_spreadsheet=>if_fdt_doc_spreadsheet~create_document(

         EXPORTING

           itab               = lr_data_ref

           iv_call_type       = 2

           name               = lv_file_name

           iv_sheet_name      = lv_file_name

         RECEIVING

           xdocument          = cv_xstring ).

     CATCH cx_fdt_excel_core .

   ENDTRY.


This code is being executed via the URL /sap/opu/odata/sap/..MEDIA_ENTITY_SET/$value. The name of file is being taken from the URL. Is there any way of passing the file name and removing additional tabs in .xlsx file.


Regards,

Nishant Arora

SAP HR to LDAP document

$
0
0

Hi there,

 

Is there an updated version of the document referenced in this link http://scn.sap.com/docs/DOC-3431?

 

I just want to ensure I have most current information as this document references SAP 4.6C and AD2003.

 

Many thanks, H.


Getting 500Connection timed out Error

$
0
0

Hi All,

 

In gateway system while i am executing the service ,getting 500 connection timed out error.

However the entries in the table are only 750..

Please find the screenshot in the attachment.

 

 

Kindly help me out to overcome this issue.

Thanks in advance...

SAP Netweaver gateway ODATA service - Split data

$
0
0

Hi Friends,

 

I have a requirement for fetching records from SAP to another system via Netweaver gateway service.  The service has been created to pull data from the respective tables. But now, I am stuck up with the huge volume of data . Is there any way to handle the volume of data by splitting that are fetched through gateway service ?

 

Appreciate your inputs.

 

Siva

HTTP Receive failed: ICM_HTTP_CONNECTION_FAILED

$
0
0

I am following this guide to develop a simple odata service with a Bapi but unable to proceed with following error


"HTTP Receive failed: ICM_HTTP_CONNECTION_FAILED"

Was successful upto seventh step ,but trying with URI "/sap/opu/odata/sap/ZGW100_XX_SO_SRV/$metadata" with a transaction /IWFND/GW_CLIENT throws this error

 

Step-by-step guide to build an OData Service based on RFCs – Part 1

 

Please suggest how to fix this ?

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

Android, Apple device connection to SAP Netweaver gateway OData

$
0
0

Hi ,

 

I have a requirement for sending SAP data via Netweaver gateway as Odata to Apple and Android device.

Just wanted to know connection procedure the step by step without SMP server that handles single sign for accessing services. Do I need to have Cordova to achieve this ?  Any info appreciated.

 

 

Regards,

Sivaprasad.

Viewing all 750 articles
Browse latest View live


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