Business Client Configuring Remote Systems in SM59

  • Upload
    kalyan

  • View
    277

  • Download
    1

Embed Size (px)

Citation preview

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    1/18

    Generated by Jive on 2016-05-10+02:00

    1

    SAP Business Client: Configuring RemoteSystems in SM59

    Posted by Alexey Arseniev  Jun 1, 2015 

    Introduction 

    There are business scenarios in which the application needs to jump from one system to another, or the

    application requires information from a remote system.

     

    For example:

    • application wants to call a transaction from a remote system• application wants to navigate to a Web Dynpro application that is located on a remote system

    • application wants to execute an Object-Based Navigation (OBN) or intent-based navigation (IBN)targeting a remote system

    • application needs to read data from a remote system• application wants to generate a URL that would be available outside the corporate network and

    needs to point to a Web dispatcher

    • application wants to call an OData service from a remote system

     

    In most cases, when there is a need to communicate or navigate to a remote system, the application can use

    RFC destination names, defined in SM59 as ABAP Connection (Connection type 3). However, in some cases

    the information provided in the RFC destination is not enough to resolve a request (for example, the application

    wants to navigate to a Web Dynpro application using HTTPS), and runtime additionally requires the HTTPdestination for the remote system.

     

    The following article covers only ABAP-based use-cases and is targeted at application developers and system

    administrators working with NetWeaver Business Client (NWBC) and Fiori Launchpad.

     

    Supported Shells

     The resolution of the remote system configuration and the processing of cross-app (cross-system) navigation is

    handled by the shell that hosts the application.

    The following shells need remote system configurations and must be able to handle cross-system navigation:

     

    NWBC for Desktop NWBC for HTML Fiori Launchpad

    http://scn.sap.com/people/alexey.arseniev

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    2/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    2

    Remote targets used in:

    • Index page and navigationmenu links, exposing

    application to remote systems• OBN targets• Quick launch, collecting links

    from navigation menu

    Same as for NWBC for Desktop Remote targets used:

    • When navigating with tilesthat point to Web GUI/ WebDynpro applications defined

    in ABAP Report Launchpad(LPD_CUST)

    • When passing Data Origin forSAP Fiori applications via sap- 

    system parameter

     

    Use-Cases

     

    To refer to remote systems, you can use the SM59 name (RFC Destination Name ) or System Alias - the

    normalized/base form of the SM59 Destination Name (see below).

     

    There are several places and services in which the System Alias can be used, as described in the following list:

     • Transaction PFCG. The attribute, Target System, of the navigation menu entry. This indicates that

    the application shall be called by the remote system that is specified by the System Alias .

    http://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677198/flp.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677194/nwbc_html.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677185/nwbc.png

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    3/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    3

     

    • Transaction LPD_CUST. The mandatory parameter, System Alias , in the Change Launchpad Role screen. The application shall call the remote system that is specified by the System Alias . The

    System Alias can be resolved by the ABAP runtime (NWBC) or by Portal runtime.

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    4/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    4

     

    • Fiori Launchpad Designer. System alias can be used in configuration of the Target Mappings  inFiori Launchpad Designer, for such application types as: Transaction , URL or WebDynpro , todefine application and data origin (SAP Fiori App using LPD_CUST  allows definition of system aliasin LPD_CUST, see case above). The system alias can be entered in dedicated field System Alias 

    or as default parameter sap-system  in Parameters  section (passing of the alias using sap-system parameter has priority over definition in dedicated field).

     

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    5/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    5

    • As a dynamic parameter, SYSTEM, when navigating by OBN (PFCG-based) or resolving the Report Launchpad (LPD_CUST) link. Passed as a URL parameter that overwrites customized values defined

    in LPD_CUST or in PFCG ( ...?sap-client=001&sap-language=EN&SYSTEM=ERP1 ).

     

    • As a dynamic parameter, sap-system , passed within intent (intent-based navigation in FioriLaunchpad -> ... #SalesOrder-display? sap-system =ERP1). The parameter overwrites the System Alias parameter defined in LPD_CUST.

     

    • As a parameter for System Alias Repository API web service implemented for NWBC 5.0.

     

    Naming Convention

     

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    6/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    6

    SM59 does not allow you to create several destinations with the same name even if the connection types are

    different. The trick for referencing several destinations by the same name is to have multiple SM59 entries

    with the same base name and an extension (_RFC, _HTTP, _HTTPS) attached to it to distinguish between the

    different types of connections.

     

    For example, if the system name is XYZ , the different destination names should be the following:• SM59 name-resolving sequence for SAP GUI aliases: XYZ_RFC,XYZ • SM59 name-resolving sequence for HTTP aliases: XYZ_HTTPS, XYZ_HTTP, XYZ 

     

    Using this approach, it is possible to reference multiple connections by passing the base name only. Using the

    example above, it would be XYZ . The following name extensions (suffixes) can be used:

    •  _HTTP (XYZ_HTTP) - to define HTTP connection settings. Can be applied for connection types G and H .

    •  _HTTPS (XYZ_HTTPS) - to define HTTPS connection settings. Can be applied for connection typesG and H .

    •  _RFC (XYZ_RFC) - to define RFC / SAP GUI connections. Can be used for connection type 3 .

    •  _BOE (XYZ_BOE) - to define additional HTTP connection when used ABAP Launchpad CrystalReports links. Can be define with connection of types G and H .

     

    For connection types RFC (3) and HTTP (H,G), the name extension can be omitted (base name equal to SM59

    destination name) and the runtime will still resolve the connection data properly. This fallback allows you to

    reuse existing definitions without extra configuration.

     

    NOTE

    Destination names in SM59, and in tools using SM59 aliases, are case-sensitive. The recommended way isto use UPPER case names, and to type suffixes in all consumption points.

    The technical destination names NONE , LOCAL, etc. are resolved as the local system, that is, the application

    is located on the same system as the runtime.

     

    Referencing by System ID and Client

     

    From UI Add-On SP09 onwards, it is also possible to reference a system not only by logical aliasing but also

    by system ID and client. The use-case could be the generation of the callback location by the service called

    remotely: the remote service does not know the name of his system used by the caller, and can only provide its

    own system ID and client.

     

    If referencing by system ID is required, the following syntax must be used:

    sid(SYSTEMID[.CLIENT]) for example : sid(U00.111) or sid(U00)

    https://help.sap.com/saphelp_nw74/helpdata/en/50/296419acd54155adf5dc78f3ec3c66/frameset.htmhttps://help.sap.com/saphelp_nw74/helpdata/en/50/296419acd54155adf5dc78f3ec3c66/frameset.htm

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    7/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    7

    The syntax is case-sensitive. sid definitions may be used in the following cases:

    • PFCG -> Target System field• LPD_CUST -> System Alias field• SYSTEM -> URL parameter for OBN/LPD_CUST link resolving (... ?SYSTEM=sid(U00.111)...)• sap-system -> intent parameter in Fiori Launchpad ( ...#SalesOrder-display?sap- 

    system=sid(U00.111)...)

     

    The system-resolving logic is as follows:

    1. Look up SM59 destinations with explicit match, that is, with the system alias equal to stringsid(SYSID.CLIENT).

    2. If this is not found, parse sid string into System ID and Client 

    3. Search in SM59 for RFC destination associated with given SYSID with specified client (or without, if notprovided)

    4. Detect base name of system alias from RFC destination name (use as is, or remove _RFC nameextension)

    5. Collect system data using system alias

     To enable the SM59 destination to be searchable by SID + client notation, the Load Balancing setting of

    the corresponding RFC destination must be set to Yes , and the target system settings must be properly

    maintained.

     

    Because the repository (SM59) can have more than one destination pointing to the same SYSID + client, the

    first matching value is returned.

     

    Which Connection Types to Maintain? 

    Different SM59 destination types are used for supporting different application technologies. It is recommended

    to always maintain all connection types even if you do not need them currently. This ensures stable resolution

    even if your application technology should change in the future.

     

    Destination Type Remarks

    RFC (3) Necessary for supporting navigation using RFCprotocol or native application embedding. If you wouldlike to use native SAP GUI, _RFC connection must be

    maintained.

    HTTP (H) Necessary for supporting HTTP-basedcommunication, e.g. all Web-browser-based

    application technologies such as Web Dynpro, SAPUI5, BSP, Portal, etc. If you want to use one of the

    mentioned app technologies, _HTTP connection mustbe defined.

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    8/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    8

    HTTPS (H) Necessary for supporting secure HTTPcommunication. The requirements are as for HTTP.

     

    RFC Connection Definition 

    When maintaining the RFC connection, you can either select Load Balancing or provide direct settings (= Load 

    Balancing OFF + Target Host address). Having Load Balancing switched off in the RFC connection definition

    ensures that your connection can be used for all versions of NWBC for Desktop and all versions of the NWBC

    server runtime. If you want to implement load balancing using the RFC connection setting, you need to run

    NWBC 5.0 together with the server runtime for SAP NetWeaver User Interface Services on User Interface Add- 

    On 1.0 for SAP NetWeaver SPS 09 or SAP NetWeaver 7.4 with software component SAP_UI SPS08.

     

    Referencing by System ID and Client is only supported if RFC Load B alancing is enabled.

     

    Technical Settings (Load Balancing) Technical Settings (Direct)

    • Settings for load balancing can be taken fromcorresponding SAP Logon system connection.See below for more details.

    • Target Host can be taken from SM51 host• Instance No. can be taken from SAP Logon

    connection definition. See below for more details.

    Logon & Security Logon & Security (SNC)

    http://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677214/sm59_rdf_technical_settings_no_lb.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677214/sm59_rdf_technical_settings_no_lb.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677214/sm59_rdf_technical_settings_no_lb.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-677213/sm59_rdf_technical_settings_lb.png

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    9/18

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    10/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    10

    • HTTP host and port can be found in transactionSICF of corresponding system

    • You can use Path Prefix to define a fixed prefixpath for ALL your web addresses. For example, ifyou work only with UI5 : /sap/bc/ui5_ui5/ 

    • Leave Language empty if you want to use thelanguage of the calling application

    • Generic user is not yet supported, so you cannothard code a user and password here

    • Ensure that the Client that you have defined inall connection types is the same. If Client is notspecified, Client of calling application will be added

    • For HTTP connection, SSL must be set to Inactive 

     

    HTTPS Connection Definition

     

    Technical Settings Logon & Security

    http://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701199/sm59_http_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701199/sm59_http_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701199/sm59_http_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701198/sm59_http_techical_settings.png

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    11/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    11

    • HTTPS host and port can be found in transactionSICF of corresponding system

    • You can use Path Prefix to define a fixed prefixpath for ALL your web addresses. For example, if

    you work only

    with UI5 : /sap/bc/ui5_ui5/ • Leave Language empty if you want to use the

    language from the calling application

    • Generic user is not yet supported, so you cannothard code a user and password here

    • Ensure that the Client that you have defined inall connection types is the same. If Client is notspecified, Client of calling application will be added

    • For HTTPS connection, SSL must be set to Active.Ensure that you have entered HTTPS Port in the

    Service No. field on the Technical Settings tab.

     

    How to Find System Settings

     

    HTTP Hosts and Ports

     

    • In the remote system, call transaction SICF -> F8• On the application toolbar, press the button Host and Port Information 

    http://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701201/sm59_https_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701201/sm59_https_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701201/sm59_https_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701201/sm59_https_logon_security.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701200/sm59_https_technical_settings.png

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    12/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    12

    SICF transaction Host and Port information

     

    RFC Load-Balancing Data

     

    Data for configuring the RFC destination can be found in the properties of the corresponding connection

    defined in SAP Logon (or in NWBC 5.0 System Selector ):

    • Load-balancing settings can be found on the Connection tab of the SAP Logon connection• SSO settings can be found on the Network tab.

     

    SAP Logon System Settings (Connection) SAP Logon System Settings (Network)

    NWBC 5.0 System Selector SM51 Server List

    http://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701211/sm59_rfc_snc.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701210/sm59_rfc_load_balancing.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701208/sicf_host_port_list.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701203/sicf_host_port.png

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    13/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    13

     

    System Alias not Resolved?

     

    If runtime is unable to determine the system configuration provided by the system alias, it will use the local

    system (relative path to the application), and will pass the unresolved system alias parameter (SYSTEM or

    sap-system ) for further processing by the application. If a system alias that is dynamically passed (as a URL

    or Intent hash parameter) is resolved, the URL/Intent parameter is deleted from the parameter list and is not

    forwarded to the application.

     

    If the application refers to a remote target using System Alias,it normally tries to point to the origin of the target.

    There are two types of origin:

     

    • Data Origin : Points to the location of data used/consumed by the target application, and indicatesthe location from where the data shall be loaded. For SAP UI5 applications, this will be a backend

    system implementing OData services.

     

    • Application Origin : Points to the location of the application sources, and indicates the location fromwhere the application itself shall be loaded. For SAP UI5 applications, it is the front-end server.

     The Application Origin may be the same as the Data Origin; examples of this are SAP GUI and Web Dynpro

    applications. For SAP UI5 applications, the SAP GUI, Web Dynpro, or URL system alias that is passed for

    resolution with the sap-system parameter is treated as Data Origin in all cases. It should not be used for

    any other purpose. It is not yet possible to explicitly pass the application origin. Instead, the Fiori Launchpad

    resolves the Application Origin based on the most likely default:

    • SAP UI5 application: FLP origin (front-end server) is assumed to also be the application origin.

    http://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701213/sm51.pnghttp://scn.sap.com/servlet/JiveServlet/showImage/38-123364-701212/NWBC50SAPGUIconnection.png

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    14/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    14

    • SAP GUI, Web Dynpro, and URL: System Alias (data origin) is assumed to also be the applicationorigin.

     

    System Alias MappingIn some cases, it makes sense to use indirection in system alias assignments and be able to redirect several

    system aliases to another one. There are several ways how such system alias mapping can be done:

     

    • PFCG If you assign system aliases to applications in PFCG, you can use database table SSM_RFC 

    (can be called using dedicated maintenance view transaction SM30_SSM_RFC ).

    SSM_RFC  is client independent and you cannot configure any client dependent system

    alias mappings.

    Recursive mappings are not supported.

    SSM_RFC  table is available from “stone age”, so can be used mostly on any SAP_BASIS

    release.

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    15/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    15

    • ABAP Report Launchpad (LPD_CUST).From SAP_BASIS 730 you can configure system alias

    mapping in ABAP Report Launchpad . The mapping is Launchpad role/instance and client dependent.

    There is no way to globally remap system aliases for all Launchpad instances and you can only map

    system aliases used in selected Launchpad.

    • Fiori and NWBC.With UI Add-on V2 there is new functionality available, that allows you to configure

    system alias mapping for all use cases running within UI2  NWBC  (NetWeaver Business Client for

    UI Add-on) and Fiori Launchpad (PFCG, LPD_CUST, Fiori Launchpad Designer ). The mapping

    can be defined in DB table /UI2/SYSALIASMAP  (or using maintenance view /UI2/V_ALIASMAP  in

    transaction SM30).

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    16/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016-05-10+02:00

    16

    The mapping allows you to define global or client dependent mapping (for global, client field shall be

    left empty). Client dependent definition has priority over global definition.

     

    NOTE

    Please note, that not all system alias mappings are easy trackable by all frameworks and it may happen,

    that some settings are cached and not invalidated after changing of mappings. So it is recommended to run

    invalidation reports, after changes (transaction SE38):

     

    • NWBC_DELETE_MENU_CACHE  (when using any of SAP_BASIS delivered NetWeaver Business Client)•  /UI2/NWBC_DELETE_MENU_CACHE  (when using UI Add-on delivered NetWeaver Business Client)•  /UI2/INVALIDATE_CLIENT_CACHES  (when using Fiori Launchpad)

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    17/18

  • 8/17/2019 Business Client Configuring Remote Systems in SM59

    18/18

    SAP Business Client: Configuring Remote Systems in SM59

    Generated by Jive on 2016 05 10+02:00

    Sathish Kumar

    Apr 20, 2016 9:21 PM

    This is a very detailed and informative blog. One of our RFC destinations was named _HTTP and it never

    worked. I debugged to figure out that something interesting was happening. And googled it, came across your

    blog to understand the same.

     

    Thanks.

    http://scn.sap.com/people/sathish.kumar82http://scn.sap.com/people/sathish.kumar82