<p>Some time ago we discussed SAP ALE, what it is, how it works. <a href="http://saphcmsolutions.com/2017/08/21/sap-ale-works/" target="_blank" rel="noopener">Here is the link</a>. 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.</p>
<p>Usually, we need conversion in heterogeneous landscapes, where different systems presented with miscellaneous settings, types, architectures. Let&#8217;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.</p>
<p>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.</p>
<p><a href="http://saphr.ru/wp-content/uploads/sale_01.png"><img class="alignnone size-full wp-image-2432" src="http://saphr.ru/wp-content/uploads/sale_01.png" alt="" width="523" height="374" /></a></p>
<p><!--more--></p>
<p>Create Rule (BD62 transaction) defines rules per segment which works for specified segment.</p>
<p>Maintain Rule (BD79 transaction) defines fields we want to convert, what algorithms to use. If double click on &#8216;Sender fld val&#8217;, a new window opens with a bunch of settings.</p>
<p><a href="http://saphr.ru/wp-content/uploads/sale_02.png"><img class="alignnone size-full wp-image-2433" src="http://saphr.ru/wp-content/uploads/sale_02.png" alt="" width="820" height="183" /></a> <a href="http://saphr.ru/wp-content/uploads/sale_03.png"><img class="alignnone size-full wp-image-2434" src="http://saphr.ru/wp-content/uploads/sale_03.png" alt="" width="710" height="787" /></a></p>
<p>Assume, field &#8216;Nickname&#8217; should be filled with a constant.</p>
<p><a href="http://saphr.ru/wp-content/uploads/sale_05.png"><img class="alignnone size-full wp-image-2439" src="http://saphr.ru/wp-content/uploads/sale_05.png" alt="" width="699" height="533" /></a></p>
<p>Done, let&#8217;s verify. Run PFAL transaction, select personnel number and send. In BD87 transaction open Outgoing IDOCs to see what would be sent through ALE.</p>
<p><a href="http://saphr.ru/wp-content/uploads/bd97_01.png"><img class="alignnone size-full wp-image-2440" src="http://saphr.ru/wp-content/uploads/bd97_01.png" alt="" width="1014" height="555" /></a></p>
<p>Looks like it works. Let&#8217;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.</p>
<p><a href="http://saphr.ru/wp-content/uploads/bd79_02.png"><img class="alignnone size-full wp-image-2562" src="http://saphr.ru/wp-content/uploads/bd79_02.png" alt="" width="745" height="541" /></a></p>
<p>In &#8216;value receiver&#8217; field we set what we expect to be as an outcome, on the right side &#8211; income value.</p>
<p><a href="http://saphr.ru/wp-content/uploads/bd79_03.png"><img class="alignnone size-full wp-image-2563" src="http://saphr.ru/wp-content/uploads/bd79_03.png" alt="" width="487" height="227" /></a></p>
<p>Run PFAL and look at the result. My name is <a href="https://saphcmsolutions.com/resume-sap-architect/">Vitalii Igorevich</a>, so initials are VI. They were changed to IV.</p>
<p><a href="http://saphr.ru/wp-content/uploads/bd79_04.png"><img class="alignnone size-full wp-image-2564" src="http://saphr.ru/wp-content/uploads/bd79_04.png" alt="" width="995" height="454" /></a></p>
<p>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.</p>
<p><a href="http://saphr.ru/wp-content/uploads/sale_04.png"><img class="alignnone size-full wp-image-2436" src="http://saphr.ru/wp-content/uploads/sale_04.png" alt="" width="693" height="238" /></a></p>
<p>I&#8217;d recommend you to read my another article about sending long-tail infotypes in SAP HCM &#8211; <a href="https://saphcmsolutions.com/how-to-send-custom-infotype-over-sap-ale/" target="_blank" rel="noopener">How to send custom infotype over SAP ALE</a>. There are also some tricks how to convert data with ABAP code. There you will take full control od data exchange in SAP landscape.</p>
<p><!-- Begin MailChimp Signup Form --></p>
<style type="text/css">
	#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}<br />
	/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.<br />
	 We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */<br />
</style>
<div id="mc_embed_signup">
<form id="mc-embedded-subscribe-form" class="validate" action="https://saphcmsolutions.us3.list-manage.com/subscribe/post?u=9946caca159afc9a77502e9a5&;id=ba2e54e4b1" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank">
<div id="mc_embed_signup_scroll"><label for="mce-EMAIL">Stay tuned for our best practices and top-notch advice</label><br />
<input id="mce-EMAIL" class="email" name="EMAIL" required="" type="email" value="" placeholder="email address" /><br />
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--></p>
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input tabindex="-1" name="b_9946caca159afc9a77502e9a5_ba2e54e4b1" type="text" value="" /></div>
<div class="clear"><input id="mc-embedded-subscribe" class="button" name="subscribe" type="submit" value="Subscribe" /></div>
</div>
</form>
</div>
<p><!--End mc_embed_signup--></p>