Some time ago we discussed SAP ALE, what it is, how it works. Here is the link. Today I want to share with you how we can change data on-fly when we need to do some conversion during the integration process.
Usually, we need conversion in heterogeneous landscapes, where different systems presented with miscellaneous settings, types, architectures. Let’s say you want to include a new SAP ERP during company acquisition into your landscape. There will be another business unites codes or personnel numbers, which differ from your present system. Or you want to send some flag depending on your conditions in the source system. Here data conversion rules come into place.
When you do SAP ALE configuration, you usually use IDOC conversion rules. So to start with conversions, have a look at these three IMG paths. Run SALE transaction and scroll down to our menu.
Create Rule (BD62 transaction) defines rules per segment which works for specified segment.
Maintain Rule (BD79 transaction) defines fields we want to convert, what algorithms to use. If double click on ‘Sender fld val’, a new window opens with a bunch of settings.
Assume, field ‘Nickname’ should be filled with a constant.
Done, let’s verify. Run PFAL transaction, select personnel number and send. In BD87 transaction open Outgoing IDOCs to see what would be sent through ALE.
Looks like it works. Let’s complicate. We want to convert value based on some table values. For each old value, we need a new value. In this case, I want to change initials from the second infotype. Silly, I know.
In ‘value receiver’ field we set what we expect to be as an outcome, on the right side – income value.
Run PFAL and look at the result. My name is Vitalii Igorevich, so initials are VI. They were changed to IV.
In Assign Rule to Message Type (BD55 transaction) we assign conversion rules to logical systems. It would allow us to be more specific and apply conversions to specific systems. It could be helpful in heterogeneous systems.
I’d recommend you to read my another article about sending long-tail infotypes in SAP HCM – How to send custom infotype over SAP ALE. There are also some tricks how to convert data with ABAP code. There you will take full control od data exchange in SAP landscape.