Sunteți pe pagina 1din 43
Gateway Setup for Enterprise Procurement Model A Tutorial for Admins
Gateway Setup for Enterprise Procurement Model A Tutorial for Admins

Gateway Setup for Enterprise Procurement Model

A Tutorial for Admins

Gateway Setup for Enterprise Procurement Model A Tutorial for Admins

Gateway Setup for Enterprise Procurement Model

TABLE OF CONTENTS

IMPORTANT

3

Disclaimer

3

Precondition

3

GET A SYSTEM

4

Clone a System in Amazon cloud

4

Setup SAP Logon

4

System is already there

4

USER CREATION

5

Logon and create User

5

Copy user

5

User request

5

You have already sap_all authorization

6

PREPARE EPM

7

Check if correct EPM Components are there

8

Check for EPM base NW 7.40 SP2

8

Create Data

9

Activate EPM pictures

10

CREATE DEMO USER

11

Upload Role

11

Create User

13

SETUP GATEWAY EPM PART

15

Check for Objects

15

Check for Developer scenario service

16

Register OData Service

17

Register System Alias

17

Register Service

19

Get the URL of the service

23

Connect Gateway with EPM

24

Connect GWaaS with Gateway Backend

24

Connect Gateway Backend with EPM Backend

24

Create an RFC Connection

24

Create the EPM BADI

29

SETUP GATEWAY GATEWAY PART

36

TESTING

37

Test with Gateway tool

37

Unit Tests

38

Check system type

38

Switch unit tests on

40

Include ABAP Unit Browser in SE80

41

Run unit Tests

41

Manual Tests

42

Gateway Setup for Enterprise Procurement Model

The tutorial shows how to get a running EPM Gateway service in a cloud environment or an on premise system. It shows also how to setup the EPM part of a Gateway service for developer scenario part 1. Goal is to set up this service that it can be used from outside on the OData interface of Netweaver. This tutorial also shows setting up required user authorities by using EPM role.

IMPORTANT

Disclaimer The NetWeaver Enterprise Procurement Model (EPM) is an application intended to be used for demonstration and testing purposes. While the scope of EPM is complex enough to be used as basis for testing and demonstration of NetWeaver technologies it is not a full-fledged application for a productive system environment. Product support is not offered. The following is only meant to be an example for demonstration purposes and not intended to be used in a productive environment. Any use by the customer is therefore at its own risk.

Precondition All settings have to be done with your development user. Please check if you have All settings have to be done with your development user. Please check if you have the authority for all steps of this document.

All server names / URLs / SAP system names etc. are examples and are not valid on customer side. / SAP system names etc. are examples and are not valid on customer side.

Gateway Setup for Enterprise Procurement Model

GET A SYSTEM How do you want to start?

Clone a System in Amazon cloud

System is already there

Clone a System in Amazon cloud Please look at http://scn.sap.com/docs/DOC-41566 for more information.

Setup SAP Logon Create a logon to an SAP system with parameters similar like:

All data is sample data and may not be used in your environment
All data is sample data and
may not be used in your
environment

IP address of an application server (alternatively system name), system ID and instance number is given by Admin. Done continue with User creation

System is already there Done continue with User creation

Gateway Setup for Enterprise Procurement Model

USER CREATION How to go on now?

Did you do a system copy in a cloud and want to create your own user?

Do you need a user with SAP_ALL authorization?

Do you already have a user with SAP_ALL authorization?

Logon and create User

If the ABAP instance started this may take some hours after VM is copied a user may log on with e.g. credentials user/pw: dev4clone/Initial1 or any other user/pw given by admin.

dev4clone/Initial1 or any other user/pw given by admin. Copy user Please do the next step and

Copy user

Please do the next step and work in the future with your own user. Use SU01 to copy the user dev4clone. I assume that it is well known how to do this. Done continue with Prepare EPM

User request

Request or create a user with the maximum set of authorizations for the system where you want to set up the EPM Gateway service. If you are not the admin, your admin has to accept this. If your request is declined by the admin, send this document to her/him with the request to process this document beginning with step Prepare EPM

Gateway Setup for Enterprise Procurement Model

You have already sap_all authorization Done continue with Prepare EPM

Gateway Setup for Enterprise Procurement Model

PREPARE EPM EPM can run in different set ups:

Gateway and EPM on one system:

Gateway Hub Gateway Backend System EPM
Gateway Hub
Gateway Backend
System
EPM

Gateway and EPM on different systems

Gateway Hub System Gateway Backend EPM System
Gateway Hub
System
Gateway Backend
EPM
System

Between Gateway backend and EPM a separate connection is necessary.

Gateway Setup for Enterprise Procurement Model

Gateway on a cloud

Cloud Gateway as a Service (GWaaS) Gateway Backend System EPM System
Cloud
Gateway as a Service (GWaaS)
Gateway Backend
System
EPM
System

Between GWaaS and Gateway Backend it is necessary to connect via cloud connector and between Gateway backend and EPM a separate connection is necessary.

Gateway backend and EPM a separate connection is necessary. The next steps have to be done

The next steps have to be done in the system where EPM should run.

Check if correct EPM Components are there

Check for EPM base NW 7.40 SP2 Start report SEPM_SHOW_INFO. There must be a section:

SP2 Start report SEPM_SHOW_INFO. There must be a section: There may be some additional lines under

There may be some additional lines under section “Transports for NW 7.41”. Relevant is SP2.

Gateway Setup for Enterprise Procurement Model

Create Data Run data generator: TA SEPM_DG Set “Recreate” and press the execute button:

Run data generator: TA SEPM_DG Set “Recreate” and press the execute button: Done – now EPM

Done now EPM is ready to use.

Gateway Setup for Enterprise Procurement Model

Activate EPM pictures There may be the case that the pictures are not available on the system. Make sure that the corresponding ICF node is activated:

Enter transaction SICF:

corresponding ICF node is activated: Enter transaction SICF: Navigate to node NWDEMO_MODEL, right click this item

Navigate to node NWDEMO_MODEL, right click this item (context menu opens) and select “Activate Service”.

Gateway Setup for Enterprise Procurement Model

CREATE DEMO USER

Setup for Enterprise Procurement Model CREATE DEMO USER These steps have to be done in all

These steps have to be done in all ABAP systems of the chain

Upload Role

Take the role attached on CSN note 1942520 and upload it:

Call transaction PFCG

 Upload Role in menu: Role => Upload and select role  Change mode
Upload Role in menu:
Role => Upload and select role
Change mode

Tab Authorizations: Button “Change Authorization Data” and confirm dialog

Gateway Setup for Enterprise Procurement Model

Gateway Setup for Enterprise Procurement Model  Press “Generate”  Popup comes up: Press “Execute” button

Press “Generate”

Popup comes up: Press “Execute” button

Leave dialogs

The role “SAP_BC_EPM_BASE” is now created

Gateway Setup for Enterprise Procurement Model

Create User

Call transaction SU01

User EPM_TEST and press “Create” Button

Enter address data like shown:

Create User Call transaction SU01  User EPM_TEST and press “Create” Button  Enter address data

Gateway Setup for Enterprise Procurement Model

Enter logon data like shown:

Procurement Model  Enter logon data like shown:  Use password Initial123 – this is the

Use password Initial123 this is the initial password and only needed once

In Tab “Roles”: enter role SAP_BC_EPM_BASE

Save

Logon with user/PW “EPM_TEST”/”Initial123” and change password to “Epm12345”

Gateway Setup for Enterprise Procurement Model

SETUP GATEWAY EPM PART

Check for Objects

Model SETUP GATEWAY – EPM PART Check for Objects This step has to be done in

This step has to be done in the system where EPM should run.

Check if following program object is in the system:

ABAP Package

Object

S_EPM_GATEWAY

Function module SEPM_GWS_PRODUCT_CATEGS_GET

Run function module SEPM_GWS_PRODUCT_CATEGS_GET without input parameters:

MAIN_CATEGORY and MAIN_CATEGORY_NAME must be filled:

MAIN_CATEGORY and MAIN_CATEGORY_NAME must be filled: … List is longer in the system – but these

… List is longer in the system – but these both columns must be filled.

Gateway Setup for Enterprise Procurement Model

Check for Developer scenario service

Procurement Model Check for Developer scenario service This step has to be done in the system

This step has to be done in the system where the Gateway backend should run.

Start SE80 and look for objects Check if following Objects are in the system:

ABAP Package

Object

/IWFND/LOCAL_EPM_TEST

Class /IWFND/CL_EPM_GW_DEVL_TESTS

/IWBEP/EPM_DEVELOPER_SCENARIO

Several

/IWBEP/EPM_COMMON

Gateway Setup for Enterprise Procurement Model

Register OData Service

for Enterprise Procurement Model Register OData Service This step has to be done in the system

This step has to be done in the system where the Gateway backend should run.

Prerequisite 1: RFC destination “NONE” must exist Prerequisite 2: System Alias must exist see also following chapter

Register System Alias

In transaction SPRO open the SAP Reference IMG and navigate to:

SAP NetWeaver => Gateway => OData Channel => Configuration => Connection Settings => SAP NetWeaver Gateway to SAP System => Manage SAP System Aliases and click on the Activity icon.

Manage SAP System Aliases and click on the Activity icon.  Choose “ New Entries ”

Choose “New Entries

Enter:

System Alias ‘LOCAL’, Any description Check “Local Gateway” RFC destination = “NONE” Software Version = “DEFAULT”

Check “Local Gateway” RFC destination = “NONE” Software Version = “DEFAULT”  Press “Save” button 17

Press “Save” button

Gateway Setup for Enterprise Procurement Model

Gateway Setup for Enterprise Procurement Model  Create a transport request  Press Save button 

Create a transport request

Setup for Enterprise Procurement Model  Create a transport request  Press Save button  Accept

Press Save button

Accept the request

Gateway Setup for Enterprise Procurement Model

Register Service

Start transaction /IWFND/MAINT_SERVICE

Ignore system message regarding user and logon

/IWFND/MAINT_SERVICE  Ignore system message regarding user and logon  Press button “Add Service” 19

Press button “Add Service”

Gateway Setup for Enterprise Procurement Model

New screen “Add Service”

Select system alias “Local” and press “Get Services”

Select system alias “Local” and press “Get Services”  Select there the service

Select there the service “/IWBEP/EPM_DEVELOPER_SCENARIO_SRV” simply by clicking onto the technical service name

Gateway Setup for Enterprise Procurement Model

Press button “local object”

Gateway Setup for Enterprise Procurement Model  Press button “local object”  Press o.k. button 21

Press o.k. button

Gateway Setup for Enterprise Procurement Model

 Select the service and activate ICF node
 Select the service and activate ICF node

Available EPM services:

Service

Remark

/IWBEP/EPM_RETAIL_SCENARIO

Simple retail service contains push notification

/IWBEP/EPM_DEVELOPER_SCENARIO

Developer scenario like Simple retail Servicebut available in cloud systems based on NW 7.4x

/IWBEP/EPM_DEV_SCENARIO_2

Part 2 of developer scenario contains creation of purchase orders and modification of min stock value

Details on services see according meta data document.

Gateway Setup for Enterprise Procurement Model

Get the URL of the service

For later steps it is required to use the URL of the service.

Press button “Call Browser”

use the URL of the service. Press button “Call Browser” A browser window opens: This is

A browser window opens:

Press button “Call Browser” A browser window opens: This is an example of the main URL

This is an example of the main URL of the service when it’s called from outside of the system.

If the system is a cloned cloud system, then you must replace the URL by the IP address of the cloud system, because a DNS resolution may be not done so far. Use the same port.

If Gateway is not activated you will see the following:

same port. If Gateway is not activated you will see the following: Look for that at

Look for that at Setup Gateway Gateway Part.

Gateway Setup for Enterprise Procurement Model

Connect Gateway with EPM

Connect GWaaS with Gateway Backend

Connect Gateway with EPM Connect GWaaS with Gateway Backend Tbd. later If a Gateway backend should

Tbd. later

If a Gateway backend should be connected with the Gateway as a Service (GWaaS) you need to setup a cloud connector (see Prepare EPM).

Connect Gateway Backend with EPM Backend

If Gateway backend and EPM is on different systems (see Prepare EPM), then the connection between both has to be established. This is done by implementing a BADI that uses an RFC connection. You should be aware about the names of your systems. Because the naming of RFC connection is completely under responsibility of the user, we call it <RFC-Destination to EPM Backend> in this capture. You must replace it by a meaningful name.

Create an RFC Connection Check if the RFC Destination does already exist:

Use TA SM59 and open ABAP Connections:

does already exist: Use TA SM59 and open ABAP Connections: Search a connection that meets your

Search a connection that meets your expectations and double click it. Select Tab “Logon & Security”.

Gateway Setup for Enterprise Procurement Model

Gateway Setup for Enterprise Procurement Model User must be EPM_TEST. If that is the case use

User must be EPM_TEST. If that is the case use that RFC destination later and continue with Create the EPM BADI.

Gateway Setup for Enterprise Procurement Model

If you did not find any acceptable RFC connection, create one.

you did not find any acceptable RFC connection, create one. Prerequisite: on both systems (the system

Prerequisite: on both systems (the system with EPM and the system you create this RFC connection) the EPM_TEST user have to be created before. See Create Demo User

SM59:

this RFC connection) the EPM_TEST user have to be created before. See Create Demo User SM59:

button.

Press Create

Gateway Setup for Enterprise Procurement Model

Use a meaningful name and select connection type 3 (ABAP Connection). Fill Description and move to tab “Technical Settings” and fill target host similar to:

type 3 (ABAP Connection). Fill Description and move to tab “Technical Settings” and fill target host

Gateway Setup for Enterprise Procurement Model

Move to tab “Logon & Security” and fill fields. Use User/PW EPM_TEST/EPM12345

Security” and fill fields. Use User/PW EPM_TEST/EPM12345 Save it and make a “connection test” or a

Save it and make a “connection test” or a “remote login”. Check in the status line if the system is the correct one.

Gateway Setup for Enterprise Procurement Model

Create the EPM BADI

If Gateway System and EPM Backend-System reside on different systems then the RFC-destination needs to be determined by providing a BAdI implementation.

Check if the connection already exists:

Use TA SE18 and select for Enhancment spot /IWBEP/ES_DESTIN_FINDER:

Check if the connection already exists:  Use TA SE18 and select for Enhancment spot /IWBEP/ES_DESTIN_FINDER:

Gateway Setup for Enterprise Procurement Model

Press display button and select tab “Enhancment Implementations”.

Setup for Enterprise Procurement Model  Press display button and select tab “Enhancment Implementations”. 30

Gateway Setup for Enterprise Procurement Model

If ZEPM_DESTINATION_FINDER 1 is in the list and marked with color green then double click the entry.

and marked with color green then double click the entry. If Badi implementation is “EPM_DESTINATION_FINDER” then

If Badi implementation is “EPM_DESTINATION_FINDER” then the connection is done.

1 It must not necessarily be named as ZEPM_DESTINATION_FINDER but if the Badi implementation behind is “EPM_DESTINATION_FINDER”, then this step is done

Gateway Setup for Enterprise Procurement Model

Otherwise do following steps

Use TX SE19 to create the BAdI implementation for Enhancement spot

/IWBEP/ES_DESTIN_FINDER.

to create the BAdI implementation for Enhancement spot /IWBEP/ES_DESTIN_FINDER.  Press Button ‘Create Impl.’ 32

Press Button ‘Create Impl.’

Gateway Setup for Enterprise Procurement Model

In the next step of the creation process enter a name for the Enhancement Implementation and a short text.

a name for the Enhancement Implementation and a short text.  Confirm to create in customer

Confirm to create in customer namespace (package $TMP).

Confirm to create enhancement implementation not switch-dependent (choose Yes).

Enter a name of your choice for BAdI Implementation. Enter a name of your choice for Implementation Class. Select for BAdI Definition “ZCL_EPM_GWS_DEST_FINDER”.

Select for BAdI Definition “ZCL_EPM_GWS_DEST_FINDER”.  Choose  Confirm to create in customer namespace

Choose

BAdI Definition “ZCL_EPM_GWS_DEST_FINDER”.  Choose  Confirm to create in customer namespace (package $TMP).

Confirm to create in customer namespace (package $TMP). If you are working in a cloud environment, a popup occurs with a hint that there is no connection to global GTADIR server. You can ignore this.

Gateway Setup for Enterprise Procurement Model

Implement the method /IWBEP/IF_DESTIN_FINDER_BADI~GET_RFC_DESTINATION with the following code:

with the following code: method /iwbep/if_destin_finder_badi ~ get_rfc_destination .

method /iwbep/if_destin_finder_badi~get_rfc_destination.

" return RFC destination of EPM backend system

ev_rfc_destination = '<RFC-Destination to EPM Backend>'.

endmethod.

Save and activate code.

To ensure that the BAdi is called during the processing of operations of EPM GW-Service ‘Developer Scenario’ you need to supply the following filter definition for the BAdI:

Filter Value:

Value 1: /IWBEP/EPM_DEVELOPER_SCENARIO_SRV Comparator 1: = Filter: SERVICE_TECHNICAL_NAME

Comparator 1: = Filter: SERVICE_TECHNICAL_NAME  Select the button Combination.  Select

Select the button Combination.

Select “SERVICE_TECHNICAL_NAME”.

Doubleclick the line below “Combination 1” to get the following window where you enter the service name as Value 1 and the Comparator 1 sign =.

Gateway Setup for Enterprise Procurement Model

Gateway Setup for Enterprise Procurement Model Don’t forget to activate the BADI – press button 35

Don’t forget to activate the BADI – press button

Gateway Setup for Enterprise Procurement Model Don’t forget to activate the BADI – press button 35

Gateway Setup for Enterprise Procurement Model

SETUP GATEWAY GATEWAY PART In transaction SPRO open the SAP Reference IMG and navigate to:

SAP NetWeaver => Gateway => OData Channel => Configuration => Activate or Deactivate SAP NetWeaver Gateway and click on the Activity icon.

SAP NetWeaver Gateway and click on the Activity icon. A dialog pops up – if gateway

A dialog pops up if gateway is not active, you can press the according button for activation. If it is already active, leave the dialog.

Gateway Setup for Enterprise Procurement Model

TESTING Do you want to make low level tests? Is your Gateway hub in an ABAP system? Do you want to check the services manually?

Test with Gateway tool The test is a local test directly on gateway services.

This step has to be done in the system where the Gateway hub should run.tool The test is a local test directly on gateway services.  Start transaction /IWFND/MAINT_SERVICE 

Start transaction /IWFND/MAINT_SERVICE

Ignore system message regarding user and logon

Select service “ZEPM_DEVELOPER_SCENARIO_SRV”

Press button “Gateway Client”

 Press button “Gateway Client”  The Gateway test client tool opens  For details

The Gateway test client tool opens

For details look at Gateway documentation:

Congratulations you are done.button “Gateway Client”  The Gateway test client tool opens  For details look at Gateway

Gateway Setup for Enterprise Procurement Model

Unit Tests

Gateway Setup for Enterprise Procurement Model Unit Tests This step has to be done in the

This step has to be done in the system where the Gateway hub should run.

Unit tests are the base for the EPM tests that are used here.

Check system type

TA: RZ11

Look for parameter name: transport/systemtype

the EPM tests that are used here. Check system type  TA: RZ11  Look for

Gateway Setup for Enterprise Procurement Model

Press Display

Setup for Enterprise Procurement Model  Press Display If the value is not SAP, then unit

If the value is not SAP, then unit tests can’t be processed.

the value is not SAP, then unit tests can’t be processed. You can’t continue with unit

You can’t continue with unit tests if the system type is a customer system. So go on e.g. with Manual Tests.

Gateway Setup for Enterprise Procurement Model

Switch unit tests on

Setup for Enterprise Procurement Model Switch unit tests on Process this step only if system type

Process this step only if system type = SAP

Use TA SAUNIT_CLIENT_SETUP

Switch unit tests on Process this step only if system type = SAP Use TA SAUNIT_CLIENT_SETUP

Apply the shown settings.

Gateway Setup for Enterprise Procurement Model

Include ABAP Unit Browser in SE80 If this is not done already done

Start SE80

Enter Settings => Popup

Switch to first tab in Settings popup

Select ABAP Unit Test Browser

O.k.

Run unit Tests

Start SE80

ABAP Unit Browser for package /IWFND/LOCAL_EPM_TEST

Start tests for class /IWFND/CL_EPM_GW_DEVL_TESTS 2

All tests must be green

/IWFND/CL_EPM_GW_DEVL_TESTS 2  All tests must be green Congratulations you are done. 2 If execute is

Congratulations you are done.

2 If execute is not possible, the unit tests are switched off. Switch it on like shown in Switch unit tests on

Gateway Setup for Enterprise Procurement Model

Manual Tests Get the base URL of the GW service see Get the URL of the service Call following links by using this URL directly in your browser.

1. Service Document:

http://<url>/sap/opu/odata/IWBEP/EPM_DEVELOPER_SCENARIO_SRV

2. Service metadata http:// <url>/sap/opu/odata/IWBEP/EPM_DEVELOPER_SCENARIO_SRV/$metadata

3. Read product categories http://<url>/sap/opu/odata/IWBEP/EPM_DEVELOPER_SCENARIO_SRV/ProductCategories

4. Read products http:// <url>/sap/opu/odata/IWBEP/EPM_DEVELOPER_SCENARIO_SRV/Products

http:// <url>/sap/opu/odata/IWBEP/EPM_DEVELOPER_SCENARIO_SRV/Products ?$filter=Category eq 'Notebooks'

5. Read a customer http:// <url>/sap/opu/odata/IWBEP/EPM_DEVELOPER_SCENARIO_SRV /Customers('100000000')

/Customers('100000000') Congratulations you are done. 42

Congratulations you are done.

www.sap.com © 2013 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign,
www.sap.com © 2013 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign,

www.sap.com

© 2013 SAP AG. All rights reserved.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company.

Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.