Sei sulla pagina 1di 43

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

2
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 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.

3
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

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

4
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.

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

5
Gateway Setup for Enterprise Procurement Model

You have already sap_all authorization


Done – continue with Prepare EPM

6
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 and EPM on different systems

Gateway Hub

System

Gateway Backend

EPM System

Between Gateway backend and EPM a separate connection is necessary.

7
Gateway Setup for Enterprise Procurement Model

 Gateway on a cloud

Gateway as a Service (GWaaS) Cloud

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.

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:

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

8
Gateway Setup for Enterprise Procurement Model

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

Done – now EPM is ready to use.

9
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:

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

10
Gateway Setup for Enterprise Procurement Model

CREATE DEMO USER


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
 Tab Authorizations: Button “Change Authorization Data” and confirm dialog

11
Gateway Setup for Enterprise Procurement Model

 Press “Generate”
 Popup comes up: Press “Execute” button
 Leave dialogs
The role “SAP_BC_EPM_BASE” is now created

12
Gateway Setup for Enterprise Procurement Model

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

13
Gateway Setup for Enterprise Procurement Model

 Enter logon data like shown:

 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”

14
Gateway Setup for Enterprise Procurement Model

SETUP GATEWAY – EPM PART

Check for Objects

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:

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

15
Gateway Setup for Enterprise Procurement Model

Check for Developer scenario service

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

16
Gateway Setup for Enterprise Procurement Model

Register OData Service

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.

 Choose “New Entries”


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

 Press “Save” button

17
Gateway Setup for Enterprise Procurement Model

 Create a transport request

 Press Save button


 Accept the request

18
Gateway Setup for Enterprise Procurement Model

Register Service
 Start transaction /IWFND/MAINT_SERVICE
 Ignore system message regarding user and logon

 Press button “Add Service”

19
Gateway Setup for Enterprise Procurement Model

 New screen “Add Service”


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

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


technical service name

20
Gateway Setup for Enterprise Procurement Model

 Press button “local object”

 Press o.k. button

21
Gateway Setup for Enterprise Procurement Model

 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
Service” but 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.

22
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”

A browser window opens:

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:

Look for that at Setup Gateway – Gateway Part.

23
Gateway Setup for Enterprise Procurement Model

Connect Gateway with EPM

Connect GWaaS with Gateway Backend

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:

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

24
Gateway Setup for Enterprise Procurement Model

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

25
Gateway Setup for Enterprise Procurement Model

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

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:

Press Create
button.

26
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:

27
Gateway Setup for Enterprise Procurement Model

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

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

28
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:

29
Gateway Setup for Enterprise Procurement Model

 Press display button and select tab “Enhancment Implementations”.

30
Gateway Setup for Enterprise Procurement Model

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

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

31
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.

 Press Button ‘Create Impl.’

32
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.

 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”.

 Choose
 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.

33
Gateway Setup for Enterprise Procurement Model

 Implement the method /IWBEP/IF_DESTIN_FINDER_BADI~GET_RFC_DESTINATION with the


following code:

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

 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 =.

34
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.

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.

36
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.

 Start transaction /IWFND/MAINT_SERVICE


 Ignore system message regarding user and logon
 Select service “ZEPM_DEVELOPER_SCENARIO_SRV”
 Press button “Gateway Client”

 The Gateway test client tool opens


 For details look at Gateway documentation:

Congratulations you are done.

37
Gateway Setup for Enterprise Procurement Model

Unit Tests

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

38
Gateway Setup for Enterprise Procurement Model

 Press Display

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

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

39
Gateway Setup for Enterprise Procurement Model

Switch unit tests on

Process this step only if system type = SAP

Use TA SAUNIT_CLIENT_SETUP

Apply the shown settings.

40
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

2
Start tests for class /IWFND/CL_EPM_GW_DEVL_TESTS
 All tests must be green

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

41
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')

Congratulations you are done.

42
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.

Potrebbero piacerti anche