ALE distribution of Cost Center and GL Account Master Data across SAP systems through IDOCs
Introduction:
Organisations today span across geographies and locations. Keeping in mind the legal and country specific requirements, in most multi country based organizations, there is a need to have varied systems across geographies for various business functions like T&E payouts, payroll processing, claims processing, purchase processing etc. This of course needs the systems to have data exchange among them in real time. In SAP systems also there arises a need to distribute master data from a source SAP system to a target SAP system.
SAP provides various options to distribute data across systems like LSMW, ALE data transfer etc. The data transfer using RFC’s and through IDOC’s is one of the better ways of transmitting data as this takes care of real time data transfer and makes the solution sustainable for future.
Finance and controlling master data being the core data required for most of the business transactions in SAP, distribution of finance master data would be required in such a scenario. The recommended approach for the same would be using ALE distribution of data through SAP standard IDOC’s.
Solution:
In a nutshell the setup will be such that any creation/changes in master data would be tracked by activated change pointers and SAP standard programs RBDMIDOC will convert the change pointers to SAP standard IDOCs based on the filters in the ALE distribution model updates and send it across to the target system. RBDCPCLR program will clear the processes change pointers.
Note: Please note that sending it across systems would need a middleware like SAP PI for the data to be transferred. Also since some countries use non western characters the middleware should be Unicode compliant to make sure that data is sent in all languages.
In our example we will be setting up the configurations for transmission of Cost center and GL account master data and middle ware of SAP PI.
Configurations:
RFC Connection
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Communication > Create RFC Connections
Transaction: SM59
First step would be to configure an ABAP RFC connection for data transmission to SAP PI using SM59 transaction. This will be managed by the SAP Basis team. The connection must be set up as a Unicode communication type in our example.
RFC Destination |
SAP Source System |
SAP PI System |
Type |
Unicode |
SAPPITest1 |
SAP Client 100 |
SAP PI Client |
3 |
Yes |
As shown in the below in the screenshot in SM59 we would need to click on create button in the below screen
In the below screen which comes when create button is clicked all the details needs to be entered for the RFC connection setup.
Port Maintenance
Menu Path: Tools > ALE > ALE Administration > Runtime Settings > Port Maintenance
Transaction: WE21
A transactional RFC port must be created as defined below. This will link the logical system to the RFC connection.
In the below screen in WE21 we would need to create a Transactional RFC:
Logical Systems
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Basic Settings > Logical Systems > Define Logical System
Transaction: SM30, view V_TBDLS
The logical system name (a unique ID to represent a SAP system) for the target SAP system has to be created to enable SAP PI to determine where the outbound IDocs must be sent. New entries can be defined as follows:
Partner Profiles
Menu Path: Tools > ALE > ALE Administration > Runtime Settings > Partner Profiles
Transaction: WE20
A partner profile will need to be created to represent the Target SAP System. This information will enable SAP PI to identify that the generated IDocs should be submitted to the target system by using the receiving partner field (RCVPRN) in the IDoc header. The receiver port will be used to define that the IDocs should be sent from SAP source system to SAP PI via transactional RFC.
A partner profile must be created for each of the three logical systems defined above. They should all have the following values:
In the Outbound Parameters sections, create the following entries (non-specified fields will use their default value). This must be applied to all the partner profiles:
The above details need to be entered in the below screen for Partner Type LS (Logical Screen):
Cross-System Company Codes
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Global Organisation Units > Cross-System Company Codes > Cross-System Company Codes
Transaction: OB72
This step is used to create cross-system company codes that will be used by the ALE integration layer for distribution of financial master data. The following entries will be used as an example:
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Global Organisation Units > Cross-System Company Codes > Assign Company Code to Cross-System Company Code
Transaction: OBB5
This step is used to allocate a company code to a cross-system company code for distribution of financial master data.
Create Filter Group
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Maintain Distribution Model and Distribute Views
Transaction: BD59
This step enables us to create additional filters by IDoc message type which can be used to restrict the information sent via ALE when maintaining the distribution model.
The following table entries should be added to the specified message types only:
The Offset and Internal Length table values will by calculated automatically by SAP. On execution in initial screen of BD59 the message type needs to be entered:
The filter details need to be entered as required for GLMAST (Chart Of Accounts and Company Codes)
Similarly filter has to be maintained for COSMAS (Company Code).
Maintain Distribution Model
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Maintain Distribution Model and Distribute Views
Transaction: BD64
The systems involved in the distribution of data need to know which messages must be dispatched, where they are dispatched from, and where they are dispatched to. This information is stored in the distribution model which consequently forms the basis of distribution, and controls it directly. This step involves the manual creation of the ALE distribution model for the Finance master data required by the target system.
FI Distribution Model
The following filters should be applied (it depends as per business requirements):
The above settings define that company codes relevant to the countries that are in scope for General Ledger accounts are restricted to the required chart of accounts, INT. They are also further restricted to company code level based upon the business requirements.
Activate Change Pointers
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Master Data Distribution > Replication of Modified Data > Activate Change Pointers for Message Types
Transaction: BD50
To ensure that changes to cost centre, General Ledger accounts are logged in the database (tables BDCP and BDCPS), change pointers need to be activated for the corresponding IDocs. Using the above transaction set the ‘active’ indicator for message types COSMAS and GLMAST.
Switch Change Pointer Storage
Menu Path: IDoc Interface / Application Link Enabling (ALE) > Modelling and Implementing Business Processes > Master Data Distribution > Replication of Modified Data > Switch Change Pointer Storage
Transaction: SM30, V_TBDA2X
SAP recommends that wherever possible change pointer data storage should be moved from tables BDCP and BDCPS to BDCP2. This functionality aggregates changes on a common data object into a single IDoc rather than sending multiple IDocs.
As of now SAP only provides this aggregated solution for cost centre master data. Using the above transaction, ‘CP Target’ for IDoc message type COSMAS will need to be set to BDCP2.It should be noted that SAP does not support back-migration of the change pointers from BDCP2 to BDCP/BDCPS.
Additional Information
In actual scenario the sending of the master data should be scheduled through a batch job which should have the SAP programs RBDMIDOC (to generate the IDOCs) and RBDCPCLR (to clear processed change pointers) for each of the message types.
Note: Please note it is always advisable to run the RBDCPCLR program to clear the processed change pointers to avoid the change pointers table to get too lengthy with recorded data.
From an end-to-end perspective, the solution is dependent upon the target system also performing specific configuration steps. If the configurations are not completed, then the IDocs would fail when they reach the target system. Also, as part of the cutover plan, existing master data will need to be distributed to the target system using the following transactions:
BD16 – Send Cost Centre Master Data
BD18 – Send General Ledger Account Master Data
New NetWeaver Information at SAP.com
Very Helpfull