Connector Gateway service

Hi,
I am trying to use the Connector Gateway Service in order to connect to a Sap System.
I am using this code:
int res = 1;
String str = new String("");
com.sapportals.connector.connection.IConnection connection = null;
           try {
            Object connectorservice = PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
                 com.sapportals.portal.ivs.cg.IConnectorGatewayService cgService = (com.sapportals.portal.ivs.cg.IConnectorGatewayService) connectorservice;
                 if (cgService == null) {
                      res = 1;
                      str = str + "erro1";
                 try {
ConnectionProperties cp = new ConnectionProperties(loc, user);
connection = cgService.getConnection(pf_sap_system, cp);
IInteraction ix = connection.createInteractionEx();
IInteractionSpec ixspec = ix.getInteractionSpec();
String functionName = new String("BAPI_BANK_GETLIST");
ixspec.setPropertyValue("Name", functionName);
RecordFactory rf = ix.getRecordFactory();
MappedRecord input = rf.createMappedRecord("input");
input.put("MAX_ROWS", "20");
input.put("BANK_CTRY", "PT");
MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
Object rs = null;
     try {
IRecordSet v_banc = (IRecordSet) output.get("BANK_LIST");
this.htbanco.clear();
v_banc.beforeFirst();
while (v_banc.next()) {
String key  = v_banc.getString("BAN");
Vector vDados = new Vector();
String chave = v_banc.getString("BANK_KEY");
String nome = v_banc.getString("BANK_NAME");
String cidade = v_banc.getString("CITY");
vDados.add(0, chave);
vDados.add(1, nome);
vDados.add(2, cidade);
this.htbanco.put(key,vDados);
     } catch (Exception e) {
     res = 2;
     str = str + "erro2";
            response.write((e.getLocalizedMessage()).toString());
     ix.close();
     connection.close();
          } catch (Exception e) {
     res = 3;
     str = str + "erro3";
     if (connection == null) {
     res = 4;
     str = str + "erro4";
} catch (Exception e) {
     res = 5;
     str = str + "erro5";
     return res;                           
Unfortunaly i do not get the desired results. I debug the application and between the next two lines the application leaves the method without the IInteraction.
connection = cgService.getConnection(pf_sap_system, cp);
(at this point)
IInteraction ix = connection.createInteractionEx();
Can someone tell me the issues i have to check. I am novice in this matter and i am tryng to use a tutorial of the SAP Portals.
Thank you for your time
            Best Regards
                     João Fernandes

Hi,
Whats the exception you are gettin ?
Regards
Bharathwaj

Similar Messages

  • PO creation from EXCEL uploaded by a Gateway Service in UI5

    Hi,
    The business requirement is to create Purchase Order from Excel File, uploaded from the UI5 application and call Gateway Service to create PO in SAP ECC.
    I am trying to achieve this with CREATE_STREAM method of DPC.
    However, my concern here is that I get the STREAMed data in XSTRING format and I am having difficulty in converting the XSTRING back to the EXCEL format.   
    Am I following the right technique to achieve this or is there any better way to achieve this requirement in Net Weaver Gateway?

    Hello,
    I did a test for uploading .xlsx file to UI5 APP and save the XSTRING data in db table in DPC( CREATE_STREAM), then read the content of table in DPC (GET_STREAM) .
    In transaction code: '/n/iwfnd/gw_client' , click 'Response in Browser' button,  the content can be read correctly and displayed in Excel, therefore I think the XSTRING data saved in db table is correct and can be converted to Excel data.
    But when I using function 'HR_KR_XSTRING_TO_STRING' to convert XSTRING data to STRING data, the converted result could not be read correctly.
    So there maybe another function can be used to read the content of XSTRING correctly,but I not found it.
    Thanks!
    Daniel

  • Oracle 8i Gateway Service problem for MS SQL Server 7.0

    I am installing Oracle Gateway services of oracle 8.1.7 with MS SQL Server 7.0 and want to create gateway service to access SQL Server. At some point Oracle document says :
    AT the MS-DOS prompt, enter:
    SET GTW_EXE = TGMSQL80.EXETo create a new gateway service name, enter:
    GTWSRV80 sid -CREATEI have complete Oracle 8.1.7 Release 3 pack but could not find the GTWSRV80 executable, I also do not have TGMSQL80.EXE. From where I can have these executables.
    Would some one provide solution for this problem please.
    Thanks and regards,
    Ghulam

    I am installing Oracle Gateway services of oracle 8.1.7 with MS SQL Server 7.0 and want to create gateway service to access SQL Server. At some point Oracle document says :
    AT the MS-DOS prompt, enter:
    SET GTW_EXE = TGMSQL80.EXETo create a new gateway service name, enter:
    GTWSRV80 sid -CREATEI have complete Oracle 8.1.7 Release 3 pack but could not find the GTWSRV80 executable, I also do not have TGMSQL80.EXE. From where I can have these executables.
    Would some one provide solution for this problem please.
    Thanks and regards,
    Ghulam

  • Getting 'access is denied' error when access Flight Example sample gateway service

    Hi All, Greetings! I am new to SAPUI5. I am getting 'Access is denied' when trying to load data from the sample gateway service (Flight Example). Please help.
    Here's the entire code:
    view1.view.js
    sap.ui.jsview("ui5_proj09_flightdemo.view1", {
          getControllerName : function() {
             return "ui5_proj09_flightdemo.view1";
          createContent : function(oController) {
         var serviceURL = "https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/";
         var readRequestURL = "/FlightCollection(carrid='AA',connid='0017',fldate=datetime'2013-05-01T00:00:00')/?$format=xml";
           var loginoDataModel = new sap.ui.model.odata.ODataModel(serviceURL, true, "my_sapes1_userid", "my_sapes1_pwd");
           alert("Before Service Call");
           loginoDataModel.read(readRequestURL, null, null, false, 
                       function(oData, oResponse) {
                      alert("Success");
                             var result = oData.results;
                             alert(result.length);
                             if(result.length > 0){
                                 webmodel.setData({modelData: result});
                                 table.bindRows("/modelData");
                       function(oError){
                             alert("Error::"+oError.message); //getting 'access is denied' error message popup at this line
           alert("After Service Call");
              var oTable = new sap.ui.table.Table( {
      id : "oTableid", // sap.ui.core.ID
      width : "auto", // sap.ui.core.CSSSize
      rowHeight : undefined, // int
      columnHeaderHeight : undefined, // int
      columnHeaderVisible : true, // boolean
      visibleRowCount : 10, // int
      firstVisibleRow : 0, // int
      selectionMode : sap.ui.table.SelectionMode.Single // sap.ui.table.SelectionMode
      //Define the columns and the control templates to be used
      var oColumn = new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "City From"}),
      template: new sap.ui.commons.TextField().bindValue("cityFrom"),
      sortProperty: "lastName",
      filterProperty: "lastName",
      width: "200px"
      oTable.addColumn(oColumn);
      var oColumn2 = new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "City To"}),
      template: new sap.ui.commons.TextView().bindProperty("text", "cityTo"),
      sortProperty: "firstName",
      filterProperty: "firstName",
      width: "200px"
      oTable.addColumn(oColumn2);
    // oTable.bindRows("/modelData");
      oTable.placeAt("content");
    index.html
    <!DOCTYPE HTML>
    <html>
           <head>
                  <meta http-equiv="X-UA-Compatible" content="IE=edge">
         <script src="resources/sap-ui-core.js"
                          id="sap-ui-bootstrap"
                          data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.ui.core"
                          data-sap-ui-theme="sap_goldreflection" >
                  </script>
                  <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
         <script>
              sap.ui.localResources("ui5_proj09_flightdemo");
                         var view = sap.ui.view({id:"idview11", viewName:"ui5_proj09_flightdemo.view1", type:sap.ui.core.mvc.ViewType.JS});
                view.placeAt("content");
         </script>
           </head>
           <body class="sapUiBody" role="application">
                  <div id="content"></div>
           </body>
    </html>
    Regards,
    Sai

    Hi Sai,
    You can refer my blog How to create SAPUI5 application consuming Gateway service with the help of SAP NW Gateway Plug-in for Eclipse
    Please go though it and see if it helps you to resolve this issue.
    Regards,
    Chandra

  • SAP.m JS/XML and Gateway service

    Hello
    I've been trying to consume a gateway service with the sap.m classes.
    it turned out quite difficult for me as im new in this whole web thing, and most of the examples for sap.m are in XML.
    i've tried to convert some of the examples in sap.common to sap.m but couldnt really figure it out.
    my XML project returns the error:FlightsSet' refers to an entity set and not to a single entity
    flightset is an entity in my gateway service.
    my oninit function looks like this:
    onInit: function() {
      var oModel = new sap.ui.model.odata.ODataModel("proxy/http/serveradress:8000/sap/opu/odata/sap/ZS_ELI_FLIGHT_PROJECT_SRV", false, 'user', 'pass', null);
        this.getView().setModel(oModel);
    the xml:
    <mvc:View
      controllerName="flightproject.TableView"
      xmlns:l="sap.ui.layout"
      xmlns:mvc="sap.ui.core.mvc"
      xmlns="sap.m">
      <Table id="idProductsTable"
        inset="false"
        items="{
          path: '/FlightsSet'
        }">
        <headerToolbar>
          <Toolbar>
            <Label text="Products"></Label>
          </Toolbar>
        </headerToolbar>
        <columns>
          <Column
            width="12em">
            <Label text="Flight company" />
          </Column>
          <Column
            minScreenWidth="Tablet"
            demandPopin="true">
            <Label text="Flight ID" />
          </Column>
        </columns>
        <items>
          <ColumnListItem>
            <cells>
              <ObjectIdentifier
                title="{Connid}"
                text="{Carrid}" />
              <Text
                text="{CITYFROM}" />
            </cells>
          </ColumnListItem>
        </items>
      </Table>
    </mvc:View>
    am i doing something wrong? thanks

    Hi Lavanya,
    If you are planning to use the TCP/IP destination on the SAP system in Register mode, then a siebel application has to register at the sap gateway using the <b>Program ID</b> given in the TCP/IP destination on the SAP system.
    In the TCP/IP destination the gateway options should contain the gateway host of the sap system and the gateway service. usually the gateway host is the message server itself and the gateway service is "sapgwXX", where XX is the <system_number>.
    Thanks,
    Renjith.

  • Easy Query not appearing in Gateway Service Builder

    Hi,
    I am working on SAP HCM MSS Analytics lane which gets data from Easy Queries via Gateway Service. We are using ODP framework and required ODP configuration mentioned in SAP documents is maintained. I have installed Bex Query Designer ( based on 7.3 Sp 06 Revision 724 ) .
    I am trying to create easy query and build gateway Service for that in ECC. I am able to open ODP query and change it property in Extended tab to "By Easy Query" but when I redefine service for BW Query in SEGW I do not see any easy query showing for RFC of ECC . In query designer message says successfully created , I even created simple query from info area of ODP , even then no success .
    All configuration mentioned in documentation for Easy Query is maintained. Any suggestions would be of great help!

    Hi,
    I have the same problem, Please Could you solve it?,
    Regards,
    Johnny

  • How to create a working  Gateway service utilizing an Existing ECC Function Module?

    Hello All,
    Our ECC (Back end) has a Function module which is to be used by creating a Gateway service .Can you suggest the step by step procedure with which i can continue to expose the service?
    Any help on this is much appreciated!
    Thanks,
    Usha

    Hi Usha,
    the flag 'Local app' indicates where the implementation of the service is done because it can be done on the Hub or on the backend. (see my blog about deployment options SAP Gateway deployment options in a nutshell).
    If you choose 'Local App' the BEP API will be called on your hub while otherwise it will be called on the backend system to which the RFC destination points to which has been maintained in your system alias definition.
    Best Regards,
    Andre
    This is explanation offered by SAP Help:
    Indicates that the System Alias is to be used by BEP
    SAP NetWeaver Gateway applications can be developed either on a SAP Business
    Suite backend system or on a SAP NetWeaver Gateway hub system. To access the
    business logic from an SAP Business Suite backend system the software component
    IW_BEP (Backend Enablement and Event Provisioning) has to be deployed in your
    system landscape. IW_BEP can be deployed on the backend system or locally on the
    SAP NetWeaver Gateway hub system. Communication is handled via system aliases
    (RFC destinations).
    Use
    Set this flag if you use this system alias for an OData Channel application
    that has been developed on the BEP add-on which is deployed on the SAP NetWeaver
    Gateway hub system.
    In this case the system alias information (such as RFC destiation, Web
    service group, software version) is not used by SAP NetWeaver Gateway to
    call the BEP API (it is called locally). Instead the system alias information is
    passed through to the OData Channel application, so that it could then itself
    make a call to the corresponding backend system.

  • Gateway Service Create with Multiple Line Items

    Hello,
    I observed that you can create an entity in gateway with only a Flat structure, no nested structure or a structure with an internal table is not supported. As i have a requirement of creating a purchase order with multiple items through a create call in gateway service.how do i achieve this.Can any one provide me some direction.
    regards
    Kaushik

    Kaushik,
    In your case Purchase Order header will be an Entity and Purchase Order Line item another entity. You define relationship between them using Associations and Referential Constraints.
    For fetching both at a time, you need to use a '$expand'. For creating both at a time, you use 'Deep Insert'.
    I would suggest you to go through odata.org and search these concepts.
    Also you can read more here.
    Similar Discussion.
    Data model design, Do I need a complex entity?
    About deep Insert
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0d92637-3d0d-2f10-ebb2-efc1f40a85e8?QuickLink=index&…
    About $expand
    Basic and Generic Expand - SAP NetWeaver Gateway - SAP Library

  • Gateway Host and Gateway Service

    Hi,
       How do I find the gateway host and gateway service when I am creating a RFC Destination. I am new R3 so please be as detailed as possible

    Hi, well i have a similar problem. I am trying to run the Template Installer after installing NetWeaver2004s.
    During the PIPostInstallProcess i am receiving following error while trying to import Execute SWF_XI_BPM_AUTO_CUSTOMIZE:
    Element 'SWF_XI_BPM_AUTO_CUSTOMIZE':Connect to SAP gateway failed
    Connect_PM  TYPE=A ASHOST=sapru02 SYSNR=00 GWHOST=sapru02 GWSERV=sapgw00 PCS=1
    LOCATION    CPIC (TCP/IP) on local host with Unicode
    ERROR       max no of 100 conversations exceeded
    TIME        Mon May 14 14:54:27 2007
    RELEASE     700
    COMPONENT   CPIC (TCP/IP) with Unicode
    VERSION     3
    RC          466
    MODULE      r3cpic_mt.c
    LINE        10713
    COUNTER     1
    Element 'SAPDEMO.DX1.Backend.Unclassified':!AbapConfigurationWriter.FM_CALL!SWF_XI_BPM_AUTO_CUSTOMIZE!AbapConfigurationWriter.FAILED!
    Well the Host and the Gateway is right, i checked in SMGW. So what might be my problem?!
    thx in advance, Jens

  • Gateway service with multiple entity sets

    Hi,
    I have designed a Gateway service with 3 entities, and 3 entity sets.Entity sets are not related one to another. This entity sets correspond to static data stored in 3 different custom table in SAP. The aim of this service is to provide static data (but customizable on the backend) for drop down lists on a SAP UI5 application consuming Gateway services.
    I am wondering if it is possible through a single read operation, to retrieve all entity sets. Since the service URL to get data related to one entity set is /sap/opu/odata/sap/ZTEST_SERVICE_SRV/EntitySet, how should I process if I want to retrieve all 3 entity sets ? Is it something possible or do we have to call each entity set at once ?
    Thanks in advance for your help.
    Thibault

    Hi Krishna,
    I'd try and avoid a construct like this because I don't think it's very compliant or discoverable - you have to know how to access it. That's maybe acceptable for "internal" services, but really, we should try and use the protocol instead of introducing so many workarounds.
    It seems that the simplicity of OData on some levels makes people think they have got the wrong answer. It can get complex but something like a value list is pretty basic and shouldn't be subject to loads of different interpretations.   
    Batching GET's on the entities or using a grouping entity as per Andre's suggestion is what I'd be thinking of doing. I know that the former is used by some Fiori applications.
    Regards
    Ron.

  • Active Directory Management Gateway Service installation error

    Hey,
    When I attempt to install the 32 bit Server 2008 package from http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=2852 I get an error saying that it's not the correct version. Just in case I tried the 3 other versions, but as
    expected they give the same error. Any ideas?
    Thanks In Advance,

    Hi,
    Based on the description, we can try to contact Microsoft Customer Support Services to obtain the hotfix to see if it helps.
    A hotfix rollup package for Active Directory Web Service is available for the .NET Framework 3.5 SP1
    http://support.microsoft.com/kb/969166
    Besides, the following thread focused on the similar issue with ours and can be referred to for more information.
    Active Directory Management Gateway Service - install problem
    http://answers.microsoft.com/en-us/windows/forum/windows_other-windows_install/active-directory-management-gateway-service/d02c3ee7-ee4d-e011-8dfc-68b599b31bf5?tab=question&status=AllReplies
    Best regards,
    Frank Shen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to Upload documents using Gateway Service in SAP UI5?

    Hi Team,
    How to upload documents using Gateway Service in UI5 app.
    This is Attachment Functionality.using Gateway Service in Controller.JS/View.JS.
    Thanks in Advance.
    Regards,
    Satya

    Hi,
    I suggest you use the search function on scn/google...
    Anyways, here are some usefull links:
    How To Upload and Download Files Using SAP NW Gateway SP06
    Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar
    Kind regards,
    RW

  • How to Create Gateway Service for Individual Account with create Operation?

    Hi All,
    I am new to the gateway service can you please guide me.
    Thanks,
    Prasaditha.

    Hello,
    Follow the below link for creation of gateway service. Prior to that, do check with the system setting like tRFC and system alias with the backend server(ECC),
    Detailed step by step procedure for Creating Gateway Service with all the CRUD Operations and testing them in Service Explorer Part1
    Thanks,
    SK

  • WWW Location of the Novell Client for XP supporting IP Gateway Services

    When connecting Windows XP workstations to the SBS 6.0 server through the
    Novell Client 4.9SP1a for Windows XP, there are no services within 4.9
    for IP Gateway included. As many of you know, by using BorderManager as
    the Firewall/NAT/IP/IPX Gateway to access the Internet, all workstations
    accessing the Internet need the IP Gateway service installed with the
    client. The Novell Client CD-ROM shipped with the Novell SBS 6.0 media
    has clients for Windows NT/2000 (outdated) but none are compatible for
    Windows XP (it appears that Novell had not updated their Novell SBS 6.0
    media since they started shipping it). In addition, the online
    documentation included with the media is outdated (e.g. BorderManager 3.6
    docs for BorderManager 3.7 being shipped) and do not mention anything
    about configuring Windows XP clients for Novell IP Gateway services.
    I have thoroughly looked within Novell's Support site the past few weeks
    for:
    + The original Novell Client 4.9 (prior to support packs) to see if that
    version of the client has IP Gateway services included (file not found or
    listed).
    + Previous Novell Clients for Windows XP to see if those versions support
    IP Gateway services. (Support Pack versions only are listed, but no
    original versions, and do not contain Novell IP Gateway services).
    + Any instructions or tips for configuring the Novell IP Gateway services
    within the Novell Client 4.9 or earlier versions for Windows XP(documents
    are non-existent).
    All of the above leads the following question:
    Can someone please direct me to the location to where the proper
    Novell Client for Windows XP supporting Novell IP Gateway services?
    Since Windows XP has been around for a few years now, one would think
    Novell would have developed a client for it that possesses Novell IP
    Gateway services by now to be used with BorderManager. Correct? If so,
    where is it? In addition, one would think Novell would include the media
    supporting the current software they are shipping, not outdated ones.
    (Or at least, ensure their outsourced sales services are doing so.) In
    addition, one would also think Novell would at least provide the
    necessary tools/files necessary to at least to have the ability to
    install their products out of the box - instead of forcing their
    consumers to purchase unnecessary additional support services for
    something they should have included within their media package or website
    at the start.
    Nevertheless, I appreciate any input where to find the appropriate Novell
    Client for Windows XP supporting Novell IP Gateway services.
    Thanks,
    EricV

    In article <cb60c.5596$[email protected]>, wrote:
    > As many of you know, by using BorderManager as
    > the Firewall/NAT/IP/IPX Gateway to access the Internet, all workstations
    > accessing the Internet need the IP Gateway service installed with the
    > client.
    >
    This is simply not correct. Novell has not been providing IP gateway
    functionality within Client32 for a long time, because it is not needed,
    and it had serious limitations.
    I haven't had a client using IP Gateway for many years now, and I have a
    *lot* of BorderManager clients.
    The alternative to IP Gateways is a combination of proxies and NAT w/filter
    exceptions.
    Craig Johnson
    Novell Support Connection SysOp
    *** For a current patch list, tips, handy files and books on
    BorderManager, go to http://www.craigjconsulting.com ***

  • Installing Gateway service on the BO Server

    Hi,
    We have an existing setup of BO XI 3.1 with the Integration Kit.
    Now, we are moving the production content to a new server. For the integration kit to communicate with the SAP system, I need to install the SAP Gateway service on the BO server.
    Can anyone point out where and how can i find the installables for the SAP Gateway?
    Can I use the files from the old server and re-register on the new server?
    Thanks for all your help.
    -Purav.

    Thanks Ingo....
    We have a SAP implementation as well, so can I download it from the service marketplace? If possible can you guide me to the exact name or location of the download? I am completely on the BO side, so not much familiar with the SAP stuff.
    Thanks,
    -Purav.

Maybe you are looking for