Sunteți pe pagina 1din 6

Value Mapping Replication Scenario | SAP PI Tutorials Page 1 of 6

SAP PI Tutorials
SAP PI Tutorials, SAP PI Jobs, SAP PI
Interview Questions

Value Mapping Replication Scenario


Application Integration www.AutomationAnywhere.com
Code Free, Application Integration Download
Free Trial Now.
FI training www.sapficoconsultant.com
Configure Finance module in 30 days Become
a Super FI Consultant
Visual Data Integration www.ecrion.com
Easy to use Data Integration environment. Try
now!
Make Process Maps www.SmartDraw.com
Perfect Process Maps Made Easy See
Examples. Free Download!

Posted on April 14, 2009 by admin

0
tweets

tweet

Value Mapping Replication Scenario

Background

PI Mapping Runtime can require external data for serveral reasons. Most common are different names for same
unities in different systems. For example material classes vary often as well as names for organizations. A
mapping program requires in such cases an access to a table where the values from different systems are
correlated. There are quite different strategies to implement such a scenario:

■ Put the data direct into the mapping program: Most serios disadvantage would be a bad maintenance; the
program has to be changed and retested in case of new or changed values .
■ Reading the data from an external file or a PI table: Unusual maintenance and no control of authorization
■ Access the data during runtime via lookup: Can lead to performance issues. Analyzing any errors could be
difficult as the monitoring isnt that smooze as for message traffic. A temporary connection problem to the
value mapping storage would be an additional risc.
■ Storing the data in a SAP ECC table for usual maintenance (SM30) and good control of authorization and
replicating them by any change to PI Java Runtime Cache for a good runtime performance

Description of the scenario

The external data (correlation of different values) are stored in SAP ECC z-table. By any change of the table
content an ABAP program calls a proxy, which replicates the whole table content. There wont be any
performance issues if the data are not changed too often and if this are not too much data. This preconditions
shouldnt be a problem in the most cases. The full table replication is much easier than a delta load and can be
implemented within a few hours.

The data are replicated to Java Runtime Mapping Cache, they can be controlled from Runtime Workbench. A
standard function from Message Mapping can make use of the correlated values, the Runtime performance for
this sceanrio is better than for any scenario with lookup.

http://www.sappi.sapag.co.in/uncategorized/value-mapping-replication-scenario/ 10/04/2011
Value Mapping Replication Scenario | SAP PI Tutorials Page 2 of 6

Example

Suppose we have different purchase organizations in a SAP system and a third party system. We are planning to
add later organizations and we might want to add another third party system in future. To exchange messages we
need to map that organizations by an external table.

Mapping Table at SAP System

The mapping table is created at the SAP system (transaction SE11).


The context is individual for our mapping case (and therefore for our scenario and our third party system). The
context and at least one of the mapping values should be key of the table.

Table Maintenance Generator

The function Utilities / Table Maintenance Generator at SE11 allows to create a quick controlled table
maintenance from SM30). We can choose directly a Authorization Group for a control of access. The Function
Group, which later will be extended, must be in the customers namespace. From this dialog we can jump to the

http://www.sappi.sapag.co.in/uncategorized/value-mapping-replication-scenario/ 10/04/2011
Value Mapping Replication Scenario | SAP PI Tutorials Page 3 of 6

event handling: Environment / Modification / Events

Events from Table Maintenance

An event can be defined in that step, for example “02 – After saving in the database”, and a FORM routine what
should be called if that event was raised. A own FORM should be typed in here, which will be created in the next
step.

Function Group

A new include needs to created in the Function Group (SE80), what was typed in at the Table Maintenance
Dialog. It has to be in the customers namespace. During the activation there could popup some confusing
messages which can be ignored. The include just contains the FORM routine from the last step.

http://www.sappi.sapag.co.in/uncategorized/value-mapping-replication-scenario/ 10/04/2011
Value Mapping Replication Scenario | SAP PI Tutorials Page 4 of 6

ABAP Outbound Proxy

With the SAP BASIS Software Component two ABAP outbound proxies were delivered (transaction SPROXY). In
our example the synchronous proxy is used.

It can be used to send messages directly (as XML) to the PI Integration Engine. The view tabs are very helpful
during implementation of the ABAP program (the FORM) routine. They provide an overview about the structure
and by clicking on an element the type can be copied from “ABAP Name Ref.”.

■ Operation: Fixed Value: Insert, Delete, DeleteGroup, DeleteContext or DeleteContextGenerice. This value
determines the action. In our example we use “Insert” and “DeleteContext”.
■ GroupID: 2 Values with the same GroupID belong together (correlation). To create that 32 character
hexadecimal number function module ICF_CREATE_GUID is used.
■ Context: Values of one context belong to one scenario. For values of one context can be searched at RTW
and one context can be deleted by only one message.
■ Identifier(VALUE): The value of the parameter in the different systems. In our case the value for the purchase
organization.
■ scheme: A scheme what the value is about. In our case the fix value “PurchaseOrg”. The scheme would allow
to extend the scenario for other mapping tasks to use only one ECC table for a lot PI scenarios. In our
example a constant is used, the more generic scenario would require a variable value there.
■ agency: The system (or the “agency”) what the value is belonging to. In our case SAP or the the third party
system.

Source Code of FORM routine:

http://www.sappi.sapag.co.in/uncategorized/value-mapping-replication-scenario/ 10/04/2011
Value Mapping Replication Scenario | SAP PI Tutorials Page 5 of 6

*&———————————————————————* *& Include


ZZMM_PURCH_ORGS_EVENTS *&——————————————————
—————* FORM f_pi_export_zzmm_purch_orgs. *———————————
————————————-* * DATA
DECLARATION * *————————————
———————————-* DATA: * error text application error
l_appl_fault_text TYPE string, * One context for Value Mapping
Replication l_context TYPE zz_context, *———————————————
————————-* * STRUCTURES * *—
——————————————————————-* * request type for proxy
lwa_output TYPE svmr_value_mapping_replication, * reponse type for
proxy lwa_input TYPE svmr_value_mapping_rep_resp, * one item in proxy
structure lwa_item TYPE svmr_value_mapping_rep_item, * Line of table
ZZMM_PURCH_ORGS BEGIN OF lwa_purch_orgs, context
TYPE zz_context, sap_purch_org TYPE vkorg,
thrd_party_org TYPE zz3rdparty_org, END OF lwa_purch_orgs, *——
—————————————————————-* * INTERNAL
TABLES * *———————————————
————————-* * internal table like transparent table lit_purch_orgs
LIKE TABLE OF lwa_purch_orgs, * context entries in transp table
zzmm_purch_orgs lit_contexts TYPE TABLE OF zz_context, *——————
—————————————————-* * OBJECTS
definitions * *———————————————
————————-* * standard proxy for value mapping replication
(synchronous) lo_vmr_proxy TYPE REF TO

Java Inbound Proxys

The Java inbound proxies on the Integration Server can easily be activated by calling a simple URL:
Asynchronous: http://: /ProxyServer/register?
ns=http://sap.com/xi/XI/System&interface=ValueMappingReplication
&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplication &method=valueMappingReplication
Synchronous: http://: /ProxyServer/register?
ns=http://sap.com/xi/XI/System&interface=ValueMappingReplicationSynchronous
&bean=localejbs/sap.com/com.sap.xi.services/ValueMappingApplicationSynchronous
&method=valueMappingReplicationSynchronous

Integration Builder Configuration

■ Sending System: SAP System >= WAS 6.20


■ Receiving System: Integration Server
■ Receiver Determination: Sender: SAP-System / IF: ValueMappingReplicationSynchronous / NS:
http://sap.com/xi/XI/System – Receiver: Integration Server
■ Interface Determination: Sender: SAP-System / IF: ValueMappingReplicationSynchronous / NS:
http://sap.com/xi/XI/System – Receiver: Integration Server Inbound-IF:
ValueMappingReplicationSynchronous / Inbound-NS: http://sap.com/xi/XI/System – no Mapping
■ Communication Channel: Component: Integration Server – Adapter Type: XI-Receiver – HTTP Destination:
Destination to Integration Engine
■ Destination: Type: H, Host: Java host, Service No: Java Port, Path-Prefix: /MessagingSystem/receive/JPR/XI
■ Receiver Agreement: Sender: SAP-System – Receiver: Integration Server / IF:
ValueMappingReplicationSynchronous / NS: http://sap.com/xi/XI/System – Receiver Channel: like above

Replication Control

The proxy replication can be monitored at transaction SXMB_MONI either at SAP and at PI. The values are
available at Runtime Workbench / Cache Monitoring / Cache Instance: Mapping Runtime Cache, CAche Object:
Value Mapping Groups

http://www.sappi.sapag.co.in/uncategorized/value-mapping-replication-scenario/ 10/04/2011
Value Mapping Replication Scenario | SAP PI Tutorials Page 6 of 6

Use in Message Mapping

Value Mappings can maintained with standard function “Value Mapping”. The context must be typed in, as well
the Schema (“PurchaseOrg” for our example). The organizations are mapped by the typed in values for source
and target agency. The behaviour regarding exceptions of the function can be maintained: Source value, default
value or runtime exception

SAP Help Linx

Value Mapping
Value Mapping Replication for Mass Data

Share this:

Related posts:

1. Scenario Demonstrating the usage of ABAP Mapping


2. Scenario Demonstrating the usage of ABAP Mapping-1

This entry was posted in Uncategorized. Bookmark the permalink.

© Copyright SAP PI Tutorials


Zone Theme by SAP PI TUTORIALS

http://www.sappi.sapag.co.in/uncategorized/value-mapping-replication-scenario/ 10/04/2011

S-ar putea să vă placă și