how to configure sap com 0200 communication scenario step

31
How to Configure SAP_COM_0200 Communication Scenario Step-by-Step www.sap.com How to Configure SAP_COM_0200 Communication Scenario Step-by-Step Guide in S/4HANA CLOUD PLATFORM Ali Chalhoub

Upload: others

Post on 06-Apr-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Configure SAP COM 0200 Communication Scenario Step

How to Configure SAP_COM_0200 Communication Scenario Step-by-Step

www.sap.com

How to Configure SAP_COM_0200 Communication Scenario Step-by-Step Guide in S/4HANA CLOUD PLATFORM

Ali Chalhoub

Page 2: How to Configure SAP COM 0200 Communication Scenario Step

2

Document History

Document Version Authored By Description Date Created

1.0 Ali Chalhoub

First release of this whitepaper Dec 20, 2018

TABLE OF CONTENTS

Document History ...................................................................................................................................................... 2

ABSTRACT .....................................................................................................................................................4

Chapter 1 – Introduction ........................................................................................................................................... 4

Chapter 2 – Configuration SAP_COM_0200 Scenario ............................................................................................... 4

Chapter 3 – Configuring SAP Cloud Connector .......................................................................................................... 4

Chapter 4 – Creating And Testing The Connection .................................................................................................... 4

Chapter 5 – Troubleshooting ..................................................................................................................................... 4

CHAPTER 1 INTRODUCTION ...........................................................................................................................5

Overview of the Architecture .................................................................................................................................... 5

Detailed Sequence of Connectivity from S/4 Cloud to On-Premise system with RFC ............................................... 9

Overview of the detail sequence of the connectivity during runtime ....................................................................... 9

Outbound S/4HANA Cloud to On-Premise SAP (ERP) System ................................................................................ 10

Inbound Connection From SAP (ERP) on Premise System to S/4HANA Cloud Edition ............................................ 11

CHAPTER 2 CONFIGURATION COM-0200 SCENARIO .................................................................................... 13

Configuring COM-0200 Scenario step-by-step ........................................................................................................ 13

CHAPTER 3 CONFIGURING SAP CLOUD CONNECTOR ..................................................................................... 18

Installing and Configuring SAP Cloud Connector ..................................................................................................... 18

CHAPTER 4 CREATING AND TESTING THE CONNECTION ................................................................................ 27

Creation of the RFC connection to the Cloud through the SAP Cloud Connector ................................................... 27

S/4HANA Cloud connection to the SAP Cloud Platform Neo .................................................................................. 29

CHAPTER 5 TROUBLESHOOTING .................................................................................................................. 30

Invalid or missing input ............................................................................................................................................ 30

HANA Database instance with the same configuration is already available ........................................................... 31

Page 3: How to Configure SAP COM 0200 Communication Scenario Step

3

Page 4: How to Configure SAP COM 0200 Communication Scenario Step

4

Abstract

Chapter 1 – Introduction 1.1. Overview of the Architecture

1.2. Detailed Sequence of Connectivity from S/4 Cloud to On-Premise System with RFC

1.3. Overview of the detail sequence of the connectivity during runtime

1.4. Outbound S/4HANA Cloud to On-Premise SAP (ERP) System

1.5. Inbound Connection from SAP (ERP) on Premise System to S/4HANA Cloud Edition

Chapter 2 – Configuration SAP_COM_0200 Communication Scenario 2.1. Configuration SAP_COM_0200 Communication Scenario Step-by-Step

Chapter 3 – Configuring SAP Cloud Connector

3.1. Installing and Configuring SAP Cloud Connector

Chapter 4 – Creating and Testing The Connection 4.1. Creation of the RFC connection to the Cloud through the SAP Cloud Connector

4.2. S/4HANA Cloud connection to the SAP Cloud Platform Neo

Chapter 5 – Troubleshooting 5.1. Invalid or missing Input

5.2. How to Access App Variant from the SAP Gateway frontend system?

5.3. HANA Database instance with the same configuration is already available

Page 5: How to Configure SAP COM 0200 Communication Scenario Step

5

Chapter 1 Introduction

Welcome to How to configure SAP COM 200 scenario for SAP S/4HANA Cloud Platform environment

communicating with SAP System On-Premise Step-by-Step Guide in. In this white paper we will introduce you to

all the requirement needed in order to configure the scenario.

In this whitepaper we will discuss and show the user how to create and configure:

• SAP COM 200 Scenario

• Configure HANA Cloud Connector

Note

To access the documentation, please go to the following URL

https://help.sap.com/viewer/f544846954f24b9183eddadcc41bdc3b/1811.500/en-

US/82c9f05663594e5db8f923f6f88ae9bd.html

Overview of the Architecture

Before we can start our configuration, we need to look at the Architecture that this whitepaper will address. This

whitepaper will cover the following scenario:

Figure 1 COM-200 Scenario Architect

Page 6: How to Configure SAP COM 0200 Communication Scenario Step

6

1. The picture above is the general architecture implementation for a COM 0200 scenario that we have

and tested.

a) We want to enable S/4HANA Cloud to communicate with On-Premise systems through the

cloud connector which establishes a tunnel connection and through the tunnel connection we

can have bi-directional RFC and HTTP connections. HTTP only in the direction from the cloud to

on premise because the other direction just it can open it directly from the on-premise to the

cloud. No need for a tunnel.

b) User can do RFC and HTTP

2. What we have done is we have reuse infrastructure from SAP Neo. The user must have an account in

Neo:

a) A user Cloud Connector Admin Authorization in Neo:

Figure 2 Adding a user to Neo with Cloud Connector Admin Role

Page 7: How to Configure SAP COM 0200 Communication Scenario Step

7

b) Under Members, the user can be located and adding the Cloud Connector Admin Role

Figure 3 Assigning Cloud Connector Admin Role

Note

• User does not need Administrator Role. All the user needs is

Cloud Connector Admin Role to configure and connect to the

On-Premise system.

• If the user has Administrator Role, then there is no need for

Cloud Connector Admin Role.

Page 8: How to Configure SAP COM 0200 Communication Scenario Step

8

c) At configuration time, we need to establish a connection between S/4HANA Cloud to SAP Cloud

Platform Neo as shown below:

Figure 4 Connection from S/4HANA Cloud to SAP Cloud Platform Landscape.

d) It is just two settings in the S/4HANA Cloud system. It is two settings with the Landscape Host of

the Neo account and account name which is located in a configuration file in the S/4 HANA

Tenant

e) To establish this connection, therefore we need COM 0200 scenario. This is the only thing it

does is to establish this connection. It sets two parameters in the systems. It does not

establish a real connection

▪ In order to do that, it authenticate the user you are using in SAP Cloud Platform

Account

Page 9: How to Configure SAP COM 0200 Communication Scenario Step

9

Detailed Sequence of Connectivity from S/4 Cloud to On-Premise system with RFC

In this section we will describe in details how the sequence of the connections occurred between S/4HANA

Cloud, SAP Cloud Platform Neo and HANA Cloud Connector.

Overview of the detail sequence of the connectivity during runtime

Figure 5 Detail sequence connectivity

Page 10: How to Configure SAP COM 0200 Communication Scenario Step

10

Outbound S/4HANA Cloud to On-Premise SAP (ERP) System

1. SAP Cloud Connector to connect to SAP Cloud Platform Account as shown below in green

“Connected”. This a prerequisite

Figure 6 HCC establishing a connection to SCP Neo

Page 11: How to Configure SAP COM 0200 Communication Scenario Step

11

2. From S/4HANA Cloud Edition into the SAP (ERP) System on Premise as shown in Figure-5.

a) We open an RFC

b) Instead of Opening the RFC directly to the SAP System which of course will not work, the

system instead the system opens the RFC connection to the connectivity Agent which lives

on the same machine as the ABAP (S4) System

3. The connectivity Agent notifies the Cloud Platform by opening a connection to the Connectivity

Notification Service (CNS) in the SAP Cloud Platform and this is the one the Cloud Connector

connects to

4. The Connectivity Notification Service tells the SAP Cloud Connector to open a tunnel connection and

it tells it which URL to connect to which is the URL of the S4 System in the S/4 Cloud Edition

5. The SAP Cloud Connector

a) Opens the tunnel connection within HTTPS connection and it goes through the Load

Balancer in the S/4HANA Cloud Platform which is optional. The latest configuration in the

converge cloud, there is no load balancer instead it connects to the Web Dispatcher then

b) The Web Dispatcher connects to the Connectivity Agent and then the tunnel connection is

established

c) The Connectivity Agent can forward the RFC connection to the SAP Cloud Connector

through the tunnel

d) This will open the RFC connection to the SAP (ERP) System

Inbound Connection From SAP (ERP) on Premise System to S/4HANA Cloud Edition

Figure 7 Inbound connection from SAP (ERP) On Premise to S4 Cloud Edition

Page 12: How to Configure SAP COM 0200 Communication Scenario Step

12

1. SAP Cloud Connector establishes an HTTPS connection to the Connectivity Notification Service in SAP

Cloud Platform already

2. The inbound connection is little simpler because the S4 does not need to notify the SAP Cloud

Connector to establish such a tunnel. So, the three-way handshake is not necessary because if the ERP

open an RFC connection to the Cloud Connector then the Cloud Connector knows by itself it has to open

the tunnel connection.

3. It can open the tunnel connection and then the tunnel is established

4. And it can send the data on to the Connectivity Agent and to the S4 System

Page 13: How to Configure SAP COM 0200 Communication Scenario Step

13

Chapter 2

Configuration COM-0200 Communication Scenario

Configuring COM-0200 Scenario step-by-step

In this section we will go through all the steps that are needed to configure COM-0200 Scenario.

Creating a Communication Arrangements

1. Login to your S/4HANA Cloud Fiori Launchpad landscape

2. Go to the Communication Management Group

3. Click on Communication Arrangements as shown below:

Figure 8 Communication Arrangements Fiori Tile

4. Click on New to create a New Communication Arrangements

Figure 9 Creating new communication arrangement

Page 14: How to Configure SAP COM 0200 Communication Scenario Step

14

5. Select the SAP_COM_0200 for the Scenario. Note: Arrangement Name can be anything the user prefers

Figure 10 Communication Arrangement SAP_COM_0200 creation

6. Click on Create

7. After creating the Communication Arrangement, the user will be show the screen of Communication

Arrangements. In that screen we need to define a Communication System. Click on New button as

shown below:

Figure 11 Configuring Communication Arrangement

Page 15: How to Configure SAP COM 0200 Communication Scenario Step

15

8. Enter a System ID name and a System Name. It can be anything you want as long as the first letter of the

name does not start with a letter “S”, so in our case I am using underscore as shown below:

Figure 12 Creating a Communication System

9. Click on Create

10. We need to provide the configuration of our Outbound system, in our case the SAP Cloud Platform as

shown below:

a. Host Name: This is the SAP Cloud Platform Neo landscape and making sure you have a cloud

connector connecting to this landscape. In my test I am using “hanatrial” landscape

b. HTTPS Port: 443

c. DO NOT CHECK “Use Cloud Connector”. We should not check this

Figure 13 Configuring Communication System

d. Next, we need to define an Outbound Communication user which is the SAP Cloud Platform

user, click on the “+” sign under the User for Outbound Communication section

Figure 14 Adding an Outbound Communication User

Page 16: How to Configure SAP COM 0200 Communication Scenario Step

16

e. Enter your SAP Cloud Platform user ID and password as shown below:

Figure 15 Providing Outbound communication user and password

f. Click on Create

Note: This is the user is used when the connection that is established from S4 to SAP Cloud

Platform Landscape

g. Now click Save

11. We redirected to the Communication Arrangements and our screen should look like this below:

Figure 16 Communication Arrangement configuration screen

Page 17: How to Configure SAP COM 0200 Communication Scenario Step

17

12. Now we need to add the property of the Account name as shown. In our example, this will be the

Account name of your SAP Cloud Platform Landscape below:

13. After adding the account name, scroll down and click on Save

Note

If the Path under Uservalidation in HCP is not displayed, then all you have

todo is click on Display button under the Communication System and click

back in Fiori Launchpad, the Path will get populated.

Page 18: How to Configure SAP COM 0200 Communication Scenario Step

18

Chapter 3 Configuring SAP Cloud Connector

In this chapter we will focus on how to configure SAP HANA Cloud Connector and how we can configure the

Cloud to On-Premise connection and the On-Premise to Cloud connection.

Installing and Configuring SAP Cloud Connector

To install SAP HANA Cloud Connector, please go to the following WIKI and follow the steps.

URL: https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=462031824

Our objective is to call an RFC functional module from Cloud to On-Premise. So to create this we need to define

two connections, one from Cloud to On Premise and One from On-Premise to the Cloud.

Cloud to On-Premise

1. Login to SAP Cloud Connector Administration page

2. Click on Cloud to On-Premise under the Connection Definition as shown below:

Figure 17 Cloud to On-Premise

Page 19: How to Configure SAP COM 0200 Communication Scenario Step

19

3. Click on the + sign to add a Virtual Connection

Figure 18 Adding a Virtual Mapping to Internal System

4. Select ABAP System

Figure 19 Selecting an ABAP System

5. We want to use RFC

Figure 20 Selecting RFC for the type of Protocol

Page 20: How to Configure SAP COM 0200 Communication Scenario Step

20

6. Selecting if load balancing Option is available. In our test it is not important for us, so we are selecting

Without load balancing…

Figure 21 Selecting without load balancing

7. Provide the Application Server name of the On-Premise system as well the instance number of this

system. The instance number here is the real instance number of the On-Premise host machine where

the SAP System is installed. In our example, it is 24

Figure 22 Providing Hostname and real instance number of the SAP System

Page 21: How to Configure SAP COM 0200 Communication Scenario Step

21

8. We now need to provide a Virtual Application Server and a Virtual Instance Number. In here the virtual

name and instance number can be anything you want.

Figure 23 Adding Virtual Application Server name

9. Click Next

10. Select Check Internal Host and click Finish

Figure 24 Finishing the configuration

11. Now we need to add some resources. In our example, we need to add a Functional Module that we

need to call from the Cloud into the On-Premise system. To do that, select the Virtual To Internal System

Page 22: How to Configure SAP COM 0200 Communication Scenario Step

22

that we have created from the previous steps, and click on the Plus Sign that is highlighted below:

Figure 25 Adding a resource

12. Enter the Function Module Name and in our example, we selected RFC_SYSTEM_INFO and click Save

Figure 26 Adding Functional Module Name

13. This will finish the configuration section of the Cloud To On-Premise connection

Page 23: How to Configure SAP COM 0200 Communication Scenario Step

23

Second step that we need to outline here is the configuration of the Access Control in the SAP HANA CLOUD

Connector “On-Premise to Cloud”

Configuring SAP HANA Cloud Connector

1. Login to the Admin site of the SAP HANA Cloud Connector

2. Click on On-Premise To Cloud under the Account you have Defined. In our Example when we created

the connection, we called it ConAgent, but this can be called anything the user like.

Figure 27 Defining On-Premise To Cloud Connection

Page 24: How to Configure SAP COM 0200 Communication Scenario Step

24

3. We need now to create a connection from the On-Premise system to the Cloud System and to do that,

we need to explain the following information about how the RFC call works from On-Premise to the

Cloud S/4HANA System:

a. In one cloud connector you can have multiple cloud systems attached to it, therefore; we

need to have a way to differentiate the connections to these different cloud systems

b. In an RFC there is no way in this protocol itself to specify which system do I want to go to

c. In RFC the only thing that we know is the hostname and port number. The hostname must be

the hostname of the CLOUD CONNECTOR because otherwise, RFC would not connect to this

SAP Cloud Connector

d. The Cloud Connector behaves like an RFC Gateway of an ABAP System. It routes the traffic

through the tunnel. It is exactly like TCPIP forwarder

4. To add now a connection from Cloud Connector to the Cloud, click on the “+” Sign as shown below:

Figure 28 Adding connection from On-Premise to the Cloud System

5. Now you are asked what type of connection you want to create. In our test, we are going to use

S/4HANA Cloud and click Next

Figure 29 Selecting type of Service Channel (Connection)

Page 25: How to Configure SAP COM 0200 Communication Scenario Step

25

6. We need to provide the Cloud landscape instance and the port number

Figure 30 Service Channel configuration

a. Tenant Host Name: is the HOST name of the S/4HANA Cloud System, but we need to add “-api”

to the hostname. For example, if the hostname is myxxxxx.s4ahana.ondemand.com, we need

to change it to myxxxxx-api.ondemand.com

Note: Each S/4HANA Cloud System has two hostnames. One with -api and one without the -api

b. Local instance Number: This is the port number that you can pick between 0 and 99 and it has

to be free and not used. For example, if you provide 87 as a port number, the port will be

created as 3387. Port number always starts with 33XX. XX is the number that you choses

between 0 and 99

c. Our screen now looks like this:

Figure 31 Adding S/4HANA hostname with -api and port

d. Click on Finish

Page 26: How to Configure SAP COM 0200 Communication Scenario Step

26

e. We should see something like that below:

Figure 32 Creating connection to the Cloud from On-Premise system

Note

As we mentioned, we only enter the port number and once you click on

Finish, the system will add 33 to whatever the port number is.

7. Connection now is created

Page 27: How to Configure SAP COM 0200 Communication Scenario Step

27

Chapter 4 Creating and testing the connection

Now that we have the SAP Cloud Connector installed and configured, it is now time to test our Inbound

connection, which is the RFC connection from the On-Premise system to the Cloud. To do that, follow the

following steps:

Creation of the RFC connection to the Cloud through the SAP Cloud Connector

1. Login to the On-Premise SAP System. For example, ERP system

2. Create an RFC connection by executing tCode SM59

3. Create a new RFC connection of type 3 ABAP Connection

4. Under the Technical Settings tab, provide the hostname of the SAP Cloud Connector

5. For the Instance No. , provide the port number that we have created in the previous steps, in our case it

is 87 and NOT 3387

Figure 33 RFC connection to the Cloud Connector

Page 28: How to Configure SAP COM 0200 Communication Scenario Step

28

6. We do not need to provide any user ID and password under the Logon & Security tab configuration. It

will just tunnel the RFC connection through

7. Save your changes

8. Click on the Connection Test

Figure 34 RFC Connection test

9. We have successfully tested the Inbound connection

Page 29: How to Configure SAP COM 0200 Communication Scenario Step

29

S/4HANA Cloud connection to the SAP Cloud Platform Neo

We have tested so far, the Inbound connection which is the RFC SM59 connection as shown below in the

diagram. Next, we need to test the Outbound connection which is the SAP_COM_0200 as shown in the diagram

below:

Figure 35 Connection Diagram

Note

At the moment the service user does not have a way to test the Outbound

connection there is no test tools yet the same way we tested the Inbound

connection.

We will have in the future a communication scenario that allow the user

to test it this.

At the moment the only way to test the Outbound connection is for the

user to setting up a business scenario that uses this communication

scenario.

Page 30: How to Configure SAP COM 0200 Communication Scenario Step

30

Chapter 5 Troubleshooting

Invalid or missing input

When adding a Service Channel under (On-Premise to Cloud), the user is getting an error when entering the

following instance number 3387

Figure 36 Invalid instance number

Page 31: How to Configure SAP COM 0200 Communication Scenario Step

31

Resolution:

This is expected behavior because

1. We need to enter only two digits which exactly the port number that we need to use and making sure

this port number is not used

2. Later on, the system will add 33 to whatever two digits was added

3. So if the user wants port 3387, the user will enter 87

HANA Database instance with the same configuration is already available

Basically, the user here entered a configuration that conflicted with another that already exist as shown below:

Figure 37 Configuration already exists error

Resolution:

The user entered a Local Instance Number that already exists in the system and hence the user needs to provide

different Local Instance Number other than the one that is exists in the system