Customizing Tables for Transfer Types and · PDF fileCustomizing Tables for Transfer Types and...
Transcript of Customizing Tables for Transfer Types and · PDF fileCustomizing Tables for Transfer Types and...
Customizing Tables for Transfer Types and Enhancement Spot Container for EPC BADIs
SAP Enterprise Project Connection 2.0 SP02 Document Version: 1.0 – 2014-04-30
CUSTOMER
Customizing Tables for Transfer Types and Enhancement Spot Container for EPC BADIs
2 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Typographic Conventions
Type Style Description
Example Words or characters quoted from the screen. These include field names, screen titles,
pushbuttons labels, menu names, menu paths, and menu options.
Textual cross-references to other documents.
Example Emphasized words or expressions.
EXAMPLE Technical names of system objects. These include report names, program names,
transaction codes, table names, and key concepts of a programming language when they
are surrounded by body text, for example, SELECT and INCLUDE.
Example Output on the screen. This includes file and directory names and their paths, messages,
names of variables and parameters, source text, and names of installation, upgrade and
database tools.
Example Exact user entry. These are words or characters that you enter in the system exactly as they
appear in the documentation.
<Example> Variable user entry. Angle brackets indicate that you replace these words and characters
with appropriate entries to make entries in the system.
EXAMPLE Keys on the keyboard, for example, F2 or ENTER .
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 3
Document History
Version Date Change
1.0 2014-04-28 Original Document
4 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Table of Contents
1 Introduction ...................................................................................................................................................... 5 1.1 Intended Audience .................................................................................................................................................. 5 1.2 Additional Documentation...................................................................................................................................... 5 1.3 Overview of SAP Enterprise Project Connection.................................................................................................. 6
2 EPC Transfer Type Tables ................................................................................................................................ 7 2.1 Pre-requisite ............................................................................................................................................................ 7 2.2 Where do you see the Transfer Type dropdown lists........................................................................................... 9 2.3 How do the Transfer Type dropdown lists correspond to Workflows? ............................................................ 10
2.3.1 Project Transfers .................................................................................................................................. 10 2.3.2 Order Transfers .................................................................................................................................... 10
2.4 Populating the customizing tables for Transfer Types ....................................................................................... 11 2.4.1 Project Transfer Types .......................................................................................................................... 11 2.4.2 Order Transfer Types ............................................................................................................................ 12
3 Using custom Transfer Types WITHOUT BADI implementation ................................................................... 14
4 Using custom Transfer Types WITH BADI implementation .......................................................................... 18 4.1 Enhancement Spot Container objects ................................................................................................................. 19 4.2 /SEPC/BADI_PROJS_XFER_IF and /SEPC/BADI_ORDS_XFER_IF interfaces contain 4 methods: ............. 19
4.2.1 GET_RFC_DESTINATION ..................................................................................................................... 20 4.2.2 GET_WORKFLOW_PARAMS ............................................................................................................... 20 4.2.3 GET_WORKFLOW_NAME ..................................................................................................................... 21 4.2.4 AUTHORIZATION_CHECK .................................................................................................................... 21
4.3 Using a custom Transfer Type in your BADI implementation ............................................................................ 21
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 5
1 Introduction
SAP Enterprise Project Connection (EPC) 2.0 SP02 has enabled enhancement spots for customizing the transfer
workflows for Projects and Work Orders. In addition to the enhancement spots, the Transfer Type dropdown list has
been modified for customizing as well.
This document provides the details of how to use the Transfer Type customizing tables and how to implement the user
exit enhancement spots (BADIs).
You must review the SAP Enterprise Project Connection (EPC) Sample Integration Solution (SIS) Terms of Use and
Disclaimer. This disclaimer can be found either in SAP Note 1994073.
1.1 Intended Audience
This document’s target audience includes the following SAP EPC user roles:
o Implementation Expert
Responsible for EPC business use case implementation
o ABAP developer
Responsible for maintaining and customizing EPC Add-On ABAP code.
1.2 Additional Documentation
SAP EPC also includes the following documentation that is available at http://help.sap.com and then SAP Business
Suite → SAP Product Lifecycle Management → SAP Enterprise Project Connection 2.0.
o SAP Enterprise Project Connection Solution Operations Guide
For the product administrator, this document describes how to configure the application and the tasks
necessary to support SAP EPC users.
o SAP Enterprise Project Connection Installation Guide
For the network administrator, this document contains information about how to install and configure SAP
Enterprise Project Connection.
o SAP Enterprise Project Connection Application Help
For the network administrator or user, this document describes the basic functionality of SAP Enterprise
Project Connection.
o SAP Enterprise Project Connection Security Guide
For the network administrator, this document describes the security settings of SAP Enterprise Project
Connection.
6 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
1.3 Overview of SAP Enterprise Project Connection
From the SAP Easy Access menu, users can access SAP EPC transactions. These transactions are located in the
Enterprise Project Connection folder of the Cross-Application Components.
The following transactions are part of SAP Enterprise Project Connection and relevant to the Transfer Type
customizing tables and enhancement spots:
/SEPC/XFER_PROJECT – Transfer Projects
/SEPC/XFER_ORDERS – Transfer Orders
The Transfer Projects transaction transfers Project data between SAP ERP and EPPM and has similar modes in which
to transfer the data. However, these transactions have different selection criteria for SAP ERP data and the transfer
types.
The Transfer Orders transaction transfers Plant Maintenance Work Order data between SAP ERP and EPPM and has
similar modes in which to transfer the data. However, these transactions have different selection criteria for SAP ERP
data and the transfer types.
If you do not have access to one of these transactions, contact your SAP ERP administrator. You may need to have a
role or authorization added to your user profile.
Refer SAP Note 1910076 - EPC20SP02 Enhancement Spot required for transfer processing, knowing how to
customize transfer type for Microsoft Project Server.
The following sections provide more details about the transfer types customizing tables and their implementations.
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 7
2 EPC Transfer Type Tables
With the release of SAP Enterprise Project Connection (EPC) 2.0 SP02, the EPC ABAP Administrator can now modify
the Transfer Type dropdown selection list for transactions /SEPC/XFER_PROJECT and /SEPC/XFER_ORDERS. The
table structures behind the dropdown lists are located in the 2 customizing tables; /SEPC/XFER_PR_T and
/SEPC/XFER_OR_T.
2.1 Pre-requisite
The new customizing tables and data are installed into your ERP customizing client 100. The following steps describe
how to get the tables and data to your other clients. (Also see SAP Note 2857.)
1) Login to your ERP client
2) GO to transaction SCC1 (You will need to get the Transport Request from your BASIS Admin)
3) Type input text as shown below and click “Start Immediately
4) Click “Yes”
5) Click “Yes”
8 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
6) Click “Back” – Green back arrow in tool bar to see the transport request result.
7) Storage required (KB) values: a. If you see “2” in Storage Required Field value that means your transport of data for both “Transfer
Project” and Transfer Order” are successfully done. b. If you see “1” in Storage Required Field value that means your transport of data for either “Transfer
Project” or Transfer Order” is successfully done. i. Check custom values in tables for these two transaction – You’ll find that one of the
table has custom value defined by user. c. If you see “0” in Storage Required Field value that means your transport of data is NOT successfully
done. i. This is due to both the transactions have custom values in their respective tables for drop
down. d. NOTE: SCC1 transaction transport populates drop down values only if user has NO custom values
defined in their drop down custom table.
8) Done
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 9
2.2 Where do you see the Transfer Type dropdown lists
The transaction “Transfer Projects” /SEPC/XFER_PROJECT contains the dropdown list in the screenshot below.
The transaction “Transfer PM Orders” /SEPC/XFER_ORDERS contains the dropdown list in the screenshot below
10 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
2.3 How do the Transfer Type dropdown lists correspond to
Workflows?
When the user makes a selection from the “Transfer Type” options, there is an EPC Workflow Name associated with
that selection. An EPC Workflow Name is the name of the Operation that is to be executed when the user clicks on the
“Transfer” button on the subsequent dialog, or the operation that is automatically executed if “Automatic Transfer”
mode has been selected.
2.3.1 Project Transfers
For example; when the user selects “SAP ERP to Primavera P6” from the “Transfer Projects” transaction, the workflow
name “SapToP3eProjectSync” is executed. This workflow name can be found in the
config/datapath/operations/sapps_saptop6-operations.xml file.
Workflow Name: SapToP3eProjectSync (Case Sensitive)
Workflow File: sapps_saptop6-operations.xml
Unless a Workflow Name has been entered into the table or a BADI is implemented to use a different workflow for
transfer type, the following transfer types default to the following Workflow Names:
Index Description (Transfer Type Text) Operation (Workflow Name)
1 SAP ERP to Primavera P6 SapToP3eProjectSync
2 Primavera P6 to SAP ERP P3eToSapProjectSync
3 SAP Actuals to Primavera P6 SapToP3eProjectActualSync
2.3.2 Order Transfers
For example; when the user selects “SAP ERP to Primavera P6” from the “Transfer Orders” transaction, the workflow
name “SAPtoP6” is executed. This workflow name can be found in the
config/datapath/operations/sappm_saptop6-operations.xml file.
Workflow Name: SAPtoP6 (Case Sensitive)
Workflow File: sappm_saptop6-operations.xml
Unless a Workflow Name has been entered into the table or a BADI is implemented to use a different workflow for
transfer type, the following transfer types default to the following Workflow Names:
Index Description (Transfer Type Text) Operation (Workflow Name)
1 SAP ERP to Primavera P6 SAPtoP6
2 Primavera P6 to SAP ERP P6toSAP
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 11
2.4 Populating the customizing tables for Transfer Types
2.4.1 Project Transfer Types
1) Login to your ERP client
2) Go to t-code SM30, Enter table name /SEPC/XFER_PR_T for Project Transfer Types, and click on Maintain.
3) Editing an existing line will modify the text that appears in the UI for that current transfer type.
4) Clicking on “New Entries” will allow for additional rows in the table.
5) Add the German translations:
EN: SAP ERP to Primavera P6
DE: SAP ERP zu Primavera P6
EN: Primavera P6 to SAP ERP
DE: Primavera P6 zu SAP ERP
12 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
EN: SAP Actuals to Primavera P6
DE: SAP Actuals zu Primavera P6
6) The table schema of above table looks like:
2.4.2 Order Transfer Types
1) Login to your ERP client
2) Make sure to have created a Customizing Request for this client.
3) Go to t-code SM30, Enter table name /SEPC/XFER_OR_T for Order Transfer Types, and click on Maintain.
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 13
4) Editing an existing line will modify the text that appears in the UI for that current transfer type.
5) Clicking on “New Entries” will allow for additional rows in the table. (See section below regarding using new
Transfer Types and Workflows.)
6) Add the German Translations:
EN: SAP ERP to Primavera P6
DE: SAP ERP zu Primavera P6
EN: Primavera P6 to SAP ERP
DE: Primavera P6 zu SAP ERP
7) Table schema of above table looks like
14 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
3 Using custom Transfer Types WITHOUT BADI implementation
With the release of EPC2.0 SP02 SAP Note 2007441, custom transfer types can be added to the Transfer Type tables
along with the custom Workflow Name, Workflow Parameters and RFC Destination without implementing a BADI.
To utilize this customization, follow the steps below.
1) Login to your ERP client
2) Go to t-code SM30, Enter table name /SEPC/XFER_PR_T for Project Transfer Types, and click on Maintain.
3) Click on “New Entries”.
4) The window below appears with the list of fields for data entry.
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 15
Language – This will be the language key for displaying in the UI the logged in user language. + – This is the position in the dropdown list for displaying in the UI. Explanation – This is text that is displayed in the dropdown list of the UI. Workflow Name – This is the name of the workflow (operation) that will called for the this transfer
execution. Workflow Params (OPTIONAL) – This is the list of URL parameters that can be added to the default list of
parameters that are passed to the workflow. SM59 (OPTIONAL) – This is the RFC destination name that is used for creating the http client
destination. This name must be an entry in the t-code SM59 and contain a valid EPC NW Hostname and credentials.
UDF1 (OPTIONAL) – This is a user defined field that can be used in a custom BADI implementation. UDF2 (OPTIONAL) – This is a user defined field that can be used in a custom BADI implementation. UDF3 (OPTIONAL) – This is a user defined field that can be used in a custom BADI implementation.
5) Example of new entry.
16 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
6) The new entry will appear in the table data.
7) The new entry will be available for selection in the dropdown list.
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 17
8) When the user selects this Transfer Type, the corresponding Workflow Name will be used for the Transfer
execution; along with any optional Workflow Parameters using the optional SM59 entry for the RFC
Destination.
Definition:
http://<SM59 details>/datapath-web/restful/1.0/Operation/<Workflow Name>/Job
Parameters: <default parameters>&<Workflow Parameters>
Example using new entry from above steps 5-7:
http://hostname:50000/datapath-
web/restful/1.0/Operation/P6toSAPGenerateConfirmations/Job
Parameters: <default parameters>¶m1=test&status=InProgress
18 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
4 Using custom Transfer Types WITH BADI implementation
If you are adding new Transfer Types to the selection list, you will need to implement the BADI User Exit to process
that new type.
Index (Transfer Type
Numeric) Description (Transfer Type Text) Operation (Workflow Name)
1 SAP ERP to Primavera P6 SapToP3eProjectSync
2 Primavera P6 to SAP ERP P3eToSapProjectSync
3 SAP Actuals to Primavera P6 SapToP3eProjectActualSync
4 SAP to Microsoft Project Server SAPPS_to_MPS
EPC2.0 SP02 has implemented an enhancement framework using BADI’s to process the new Transfer Types for
custom workflow names, custom RFC destinations and custom workflow parameters
To learn more about this framework and how to use it, see the SAP Help Portal under “SAP NetWeaver | Platform |
Enhancement Framework”. Users must be familiar with this framework before attempting to implement the
customizations.
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 19
4.1 Enhancement Spot Container objects
/SEPC/BADI_PROJS_XFER – BADI Definition
/SEPC/BADI_PROJS_XFER_IF – BADI interface
This BADI (or Enhancement Spot) Definition has 2 parts; the Interface and the Implementation.
The Interface contains the methods that will be exposed for the user to customize.
The Implementation contains the code to be executed for the interface method.
4.2 /SEPC/BADI_PROJS_XFER_IF and /SEPC/BADI_ORDS_XFER_IF interfaces contain 4 methods:
GET_RFC_DESTINATION - This method will provide the custom RFC Destination to use GET_WORKFLOW_PARAMS - This method will provide the custom workflow parameters GET_WORKFLOW_NAME - This method will provide the custom workflow/operation name AUTHORIZATION_CHECK – This method will allow customers to add their customized authorization checks
for Project Selection filtering.
20 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
4.2.1 GET_RFC_DESTINATION
IMPORTING IM_PROJS Type /SEPC/T_PSPID “Table of Project Ids
IM_XFER_TYPE Type DYNFIELDVALUE
IM_LOG Type Ref To /SEPC/CL_LOG_HANDLER
IM_XFER_ROW Type /SEPC/XFER_PR_T
EXPORTING EX_RFC_DEST Type RFCDEST
This method will input the table of project ids, and the selected transfer_type which is currently ‘Transfer from SAP
ERP’ (1), ‘Transfer to SAP ERP’ (2), ‘Transfer from SAP ERP Actuals’ (3).
The thought is that the customer may want to modify the RFC destination based upon some attributes of a Project.
And secondly, if the customer has customized the ‘Transfer Type’ dropdown list (currently in development),
depending upon the selection made, they may want to modify the RFC destination.
This will assume that the same destination is used for all data transfers.
4.2.2 GET_WORKFLOW_PARAMS
IMPORTING IM_PROJID Type CLIKE “Project Id
IM_XFER_TYPE Type DYNFIELDVALUE
IM_LOG Type Ref To /SEPC/CL_LOG_HANDLER
IM_XFER_ROW Type /SEPC/XFER_PR_T
EXPORTING EX_WORKFLOW_PARAMS Type String
This method will input current project id, and the selected transfer_type which is currently ‘Transfer from SAP ERP’
(1), ‘Transfer to SAP ERP’ (2), ‘Transfer from SAP ERP Actuals’ (3).
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 21
The thought here is that if the customer has customized the ‘Transfer Type’ dropdown list (currently in development),
depending upon the selection made, they may want to modify the workflow name and add custom parameters to the
URL. For example; they may have more items in the ‘Transfer Type’ dropdown list (4, 5, 6) and have new workflows
they want to use.
4.2.3 GET_WORKFLOW_NAME
IMPORTING IM_PROJID Type CLIKE “Project Id
IM_XFER_TYPE Type DYNFIELDVALUE
IM_LOG Type Ref To /SEPC/CL_LOG_HANDLER
IM_XFER_ROW Type /SEPC/XFER_PR_T
EXPORTING EX_WORKFLOW_NAME Type String
This method will input current project id, and the selected transfer_type which is currently ‘Transfer from SAP ERP’
(1), ‘Transfer to SAP ERP’ (2), ‘Transfer from SAP ERP Actuals’ (3).
The thought here is that if the customer has customized the ‘Transfer Type’ dropdown list (currently in development),
depending upon the selection made, they may want to modify the workflow name and add custom parameters to the
URL. For example; they may have more items in the ‘Transfer Type’ dropdown list (4, 5, 6) and have new workflows
they want to use.
4.2.4 AUTHORIZATION_CHECK
IMPORTING IM_PROJS Type /SEPC/T_PROJ_PROJECTS
IM_XFER_TYPE Type DYNFIELDVALUE
IM_LOG Type Ref To /SEPC/CL_LOG_HANDLER
EXPORTING EX_RETURN Type SYSUBRC
This method will input the table of projects, and the selected transfer_type.
This method will execute authorization check on the projects and return the SYSUBRC value that is returned from
authorization check. The transfer_type is input as well in the case that the user has permission to read a project
(transfer from SAP PS) but no permission to update a project (transfer to SAP PS).
Example AUTHORIZATION_CHECK interface implementation is delivered in the fallback class;
/SEPC/BADI_PROJS_XFER_FB_CL method /SEPC/BADI_PROJS_XFER_IF~AUTHORIZATION_CHECK.
AUTHORITY-CHECK OBJECT 'C_AFKO_ACT'
ID 'PS_ACTVT' FIELD '02'.
4.3 Using a custom Transfer Type in your BADI implementation
In order to use a custom Transfer Type, the user must decide on what Workflow will be executed for this Transfer Type. Therefore, the user must implement the interface GET_WORKFLOW_NAME.
Review the example implementation class and method;
/SEPC/BADI_PROJS_XFER_FB_CL-GET_WORKFLOW_NAME as shown below.
22 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
To implement your customization; you will need to create an Enhancement Implementation container.
The container will contain the Z_class in your local namespace, that uses and implements the BADI interface.
Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 23
For example; Z_BADI_PROJS_XFER_TEST above contains a reference to the BADI definition and interface, as well as the implementation class Z_BADI_PROJS_XFER_CL. The class contains the 3 methods; one for each method defined in the interface.
If we want to use the custom Transfer Type described earlier, then we need to implement the method for defining the workflow name associated with the new Transfer Type.
For example; the method GET_WORKFLOW_NAME will input the selected Transfer Type from the drop down list. Depending upon the Transfer Type the workflow name can be modified.
Sample code might look like:
CASE im_xfer_type.
WHEN '4'.
ex_workflow_name = 'SapToMSP'.
ENDCASE.
The ex_workflow_name will need to be set to a workflow name that is exists in an operation file. The operation files are located in the ‘config/datapath/operations’ folder.
Once the code is compiled and activated, the code will be executed at runtime during the processing of the “Transfer Projects” (button click) step of the transaction /SEPC/XFER_PROJECT.
24 Error! Reference source not found.
CUSTOMER
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Caution
<Put your caution here>
Example
<Put your example here>
Note
<Put your note here>
Recommendation
<Put your recommendation here>
Syntax
<Put your syntax here>
www.sap.com/contactsap
Material Number
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior
notice.
Some software products marketed by SAP AG and its distributors
contain proprietary software components of other software
vendors.
National product specifications may vary.
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.
SAP 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. Please see
www.sap.com/corporate-en/legal/copyright/index.epx#trademark
for additional trademark information and notices.