<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SAP Experts: VMware Virtualization &#124; Consulting &#124; Integration - DataXstream &#187; SAP PI Blog</title>
	<atom:link href="http://www.dataxstream.com/category/sap-consultants-blog/sap-technical/pi-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dataxstream.com</link>
	<description>SAP Certified Consultants</description>
	<lastBuildDate>Sat, 04 Feb 2012 05:00:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SAP EDI EDPAR Table Walkthrough &#8211; How to Cross Reference External Customer Number to SAP Customer Number (Part 2)</title>
		<link>http://www.dataxstream.com/2012/02/sap-edi-edpar-table-walkthrough-how-to-cross-reference-external-customer-number-to-sap-customer-number/</link>
		<comments>http://www.dataxstream.com/2012/02/sap-edi-edpar-table-walkthrough-how-to-cross-reference-external-customer-number-to-sap-customer-number/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 19:36:45 +0000</pubDate>
		<dc:creator>dkoch</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP EDI Blog]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[ALE]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[EDPAR]]></category>
		<category><![CDATA[IDOC]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SAP External Cross Reference]]></category>
		<category><![CDATA[SAP Integration]]></category>
		<category><![CDATA[VOE4]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=9941</guid>
		<description><![CDATA[Let&#8217;s say you are receiving EDI ANSI X12 850 Sales Orders from you customers that need to be uploaded into your SAP System using the ORDERS05 IDOC.  Most customers will have their own internal customer numbers that they send in their EDI transmissions to represent the Sold-To and Ship-To partners. How do you convert these [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you are receiving EDI ANSI X12 850 Sales Orders from you customers that need to be uploaded into your SAP System using the ORDERS05 IDOC.  Most customers will have their own internal customer numbers that they send in their EDI transmissions to represent the Sold-To and Ship-To partners.</p>
<p>How do you convert these external customer numbers into your internal SAP customer numbers?</p>
<p>Some may hard code these conversions into their EDI maps.  This approach can be very high maintenance as customers can add new ship-to locations or reorganize their internal numbers which would require changes to your maps.</p>
<p>Others may set up a cross reference table within their EDI translation table to perform the conversion.  This works well at times, but then you are at the mercy of your EDI group to update the table with any new additions or changes to existing entries.<span id="more-9941"></span></p>
<p>I find the best way to perform this conversion is within your SAP system.  Mainly because SAP has given you a standard utility to perform the conversion.  All you need to do is populate a few fields of the incoming IDOC and populate the EDPAR table using transaction VOE4 with the internal and external customer numbers.  The Function Module used to process the IDOC takes care of the rest.  SAP uses the Sender Partner Number of the IDOC Control record along with the PARVW and LIFNR elements from the E1EDKA1 segment to look up the correct entry in the EDPAR table.  In your EDI maps you would populate the PARVW element with the partner function code for the external customer number (AG = Sold-To, WE = Ship-To) and populate the LIFNR field with the external customer number received in the EDI file from that partner.  All other fields would remain blank in the E1EDKA1 segment.</p>
<p><em>Sender Information Partner Number from the Control Record:</em></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog11.png" rel="shadowbox[sbpost-9941];player=img;"><img class="alignnone size-full wp-image-10006" src="http://www.dataxstream.com/wp-content/uploads/blog11.png" alt="" width="645" height="568" /></a></p>
<p><em>E1EDKA1 Segment for the Sold-To Partner (AG):</em></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog2.png" rel="shadowbox[sbpost-9941];player=img;"><img class="alignnone size-full wp-image-9997" src="http://www.dataxstream.com/wp-content/uploads/blog2.png" alt="" width="626" height="535" /></a></p>
<p><em>E1EDKA1 Segment for the Ship-To Partner (WE):</em></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog3.png" rel="shadowbox[sbpost-9941];player=img;"><img class="alignnone size-full wp-image-9998" src="http://www.dataxstream.com/wp-content/uploads/blog3.png" alt="" width="638" height="535" /></a></p>
<p>Use transaction VOE4 to populate the EDPAR table.  You enter the value from the Sender Partner Number in the IDOC control record in the Customer field, the function code for the partner in the Ext. Function field.  <strong>Note: The Ext. Function field will not be the same as the Partner Function (PARVW) element of the IDOC.  (AG in IDOC = SP on VOE4, WE = SH).</strong>  The External Partner is the number received in the EDI data from the customer which is also the number in the LIFNR element of the IDOC.  Int. no is the SAP customer number associated with the External number.</p>
<p><em>VOE4 transaction with required entries for the Sold-To and Ship-To for IDOC information above:</em></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog41.png" rel="shadowbox[sbpost-9941];player=img;"><img class="alignnone  wp-image-10011" src="http://www.dataxstream.com/wp-content/uploads/blog41.png" alt="" width="639" height="388" /></a></p>
<p>Using the EDPAR table for customer conversion allows this function to remain in control of those responsible for customer accounts.  Users can be trained to use the VOE4 transaction to update the EDPAR table so when new ship-to or sold-to numbers need to be added they can be done in a timely matter and not rely on other departments.  It also takes this responsibility away from the EDI group so they don&#8217;t have to maintain maps or tables for this function.</p>
<p>This function can be used for other incoming IDOCs as well.  You will need to check the Function Modules used to process incoming IDOCs to determine if EDPAR can be used for customer number conversion and on which IDOC segment you would send the external number.</p>
<p>Outbound IDOCs can use either the EDPAR table or the PUMA table to cross reference external customer numbers.  Again, it depends on the IDOC type.  I will cover this topic in a separate blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2012/02/sap-edi-edpar-table-walkthrough-how-to-cross-reference-external-customer-number-to-sap-customer-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Dynpro Basics: Context and Binding</title>
		<link>http://www.dataxstream.com/2012/01/web-dynpro-basics-context-and-binding/</link>
		<comments>http://www.dataxstream.com/2012/01/web-dynpro-basics-context-and-binding/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 21:22:04 +0000</pubDate>
		<dc:creator>Michael Champion</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP ABAP Blog]]></category>
		<category><![CDATA[SAP ABAP Performance]]></category>
		<category><![CDATA[SAP Basis Blog]]></category>
		<category><![CDATA[SAP Basis Performance]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Web Dynpro]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=10302</guid>
		<description><![CDATA[This is for those who are new to Web Dynpro programming. Here is an explanation of how to set up a Web Dynpro application using the context and binding the context to User Interface (UI) elements of the application. This is only a basic explanation to help set a foundation for understanding Web Dynpro programming. [...]]]></description>
			<content:encoded><![CDATA[<p>This is for those who are new to Web Dynpro programming. Here is an explanation of how to set up a Web Dynpro application using the context and binding the context to User Interface (UI) elements of the application. This is only a basic explanation to help set a foundation for understanding Web Dynpro programming. The 3 basic elements of a Web Dynpro application are windows, views and the context. The window is simply a container for a view. To assign a view to a window expand the views and windows under the section labeled ‘Object Name.’ Double click on a window and then drag and drop the view into the window.<span id="more-10302"></span><br />
<a href="http://www.dataxstream.com/wp-content/uploads/1-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10315" title="1 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/1-web-dynpro-1024x611.jpg" alt="" width="617" height="367" /></a><br />
The views hold the visual content (i.e. buttons, tables, headers). Once a view is created and populated with UI elements, the text values of some of these elements can be hard coded (via the UI element’s properties)<br />
<a href="http://www.dataxstream.com/wp-content/uploads/2-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10314" title="2 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/2-web-dynpro-1024x554.jpg" alt="" width="617" height="334" /></a><br />
Or they can be populated dynamically during runtime. Certain elements can ONLY be populated during runtime, such as a table. The text of a button can be set by entering a string value into the ‘text’ property of the element when in the layout tab of the view, for example ‘Hello World’.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/3-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10316" title="3 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/3-web-dynpro-1024x666.jpg" alt="" width="617" height="402" /></a></p>
<p>For the element that’s text cannot be hardcoded or the element that’s visibility needs to change during runtime, the context needs to be used. The data that is seen on the screen is not stored within the web browser itself. The Web Dynpro application makes calls to the server to retrieve data to be displayed. This is where the context comes into play. The context is the memory on the server that stores data for the Web Dynpro application. When setup correctly a context can hold tables, structures or single element variables. Here is an example of how to build a context and then make method calls to read or set the context.</p>
<p>Select the ‘Context’ tab. Right click on the context node and select ‘Create’ -&gt; ‘Node’ and fill out the fields according to the picture below.<a href="http://www.dataxstream.com/wp-content/uploads/4-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10308" title="4 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/4-web-dynpro-1024x682.jpg" alt="" width="617" height="411" /></a></p>
<p>Right click on the BUTTON_PROPERTIES node and select ‘Create’ -&gt; ‘Attribute.’<br />
<a href="http://www.dataxstream.com/wp-content/uploads/5-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10309" title="5 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/5-web-dynpro-1024x682.jpg" alt="" width="617" height="410" /></a></p>
<p>Now we have created an attribute in the context that will hold a string value. By the names I have given to the node and the attribute you can guess that this node will hold any attributes related to the button we created. The attribute that we created will be used to hold text value of the button.</p>
<p>Now that the context attribute has been created, let’s fill it with a value. Go back to the button properties under the ‘Layout’ tab and find the ‘onAction’ properties under ‘Events.’ Click the create button, it looks like a white piece of paper with the top right edge folded down, and fill in the fields as below.<br />
<a href="http://www.dataxstream.com/wp-content/uploads/6-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10310" title="6 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/6-web-dynpro-1024x666.jpg" alt="" width="617" height="401" /></a><br />
Double click on the name of the new action we just created, SHOW_TEXT and this will take you to the methods tab. Here we are going to use the Web Dynpro Code Wizard to set the value of the attribute.<br />
Click on the Web Dynpro Code Wizard icon (or Ctrl +F7), select ‘Read’, click and select the attribute that was created, TEXT. (Illustrated Below)<br />
<a href="http://www.dataxstream.com/wp-content/uploads/7-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10311" title="7 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/7-web-dynpro-1024x611.jpg" alt="" width="617" height="368" /></a><br />
Now repeat the same steps starting with the Web Dynpro Code Wizard except this time select ‘Set’ instead of ‘Read.’ Each time the Web Dynpro Code Wizard is used DATA variables are created.</p>
<p><strong>Note: If there are multiple attributes within a node, all of the attributes can be read or set at once by selecting the node.</strong></p>
<p>After using the Web Dynpro Code Wizard the second time we now have two copies of the data variables that will not compile. Select the second set and delete them and in place put the following code:<br />
<a href="http://www.dataxstream.com/wp-content/uploads/7.1-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone size-full wp-image-10313" title="7.1 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/7.1-web-dynpro.jpg" alt="" width="717" height="693" /></a><br />
Now if the application was tested the value of the attribute TEXT would be changed  between ‘Hide Text’ and ‘Show Text’ every time the button is pushed.</p>
<p>That is the rundown of how to build, read and set the context’s nodes and attributes. Now the context needs to be linked or ‘bound’ to the UI elements. Go back to the Layout tab and select the button. Under the properties find the ‘Text’ property. Click the yellow box to the right of the property and select the attribute to create the binding .</p>
<p><strong>Binding</strong></p>
<p>Binding is linking the data in the context to the UI elements. Here we have created an attribute that holds text. The ‘Text’ property of the button is set to the value within that property. Activate the Web Dynpro Component, create an application and test it.</p>
<p>For a little extra practice, add a TextView by dragging and dropping into the layout or right clicking on ROOTUIELEMENTCONTAINER and selecting ‘Insert Element.’ In the properties section set the Text value to ‘Now you see me!’ Create another node and attribute for the TextView by going to the ‘Context’ tab and right clicking on the ‘Context’ node and selecting ‘Create’ -&gt; ‘Node’. Then create the attribute with the properties below.<br />
<a href="http://www.dataxstream.com/wp-content/uploads/8-web-dynpro.jpg" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10312" title="8 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/8-web-dynpro-1024x666.jpg" alt="" width="617" height="401" /></a></p>
<p>Go to the ‘Methods’ tab and go into the method we was worked on earlier, ONACTIONSHOW_TEXT. Place the cursor after the ‘if’ statement that was put in, approximately line 33. Use the code wizard to set the new context we made. Then cut and pasted the DATA declarations just created and move them up to the top of the code. Then edit the ‘if’ statement to look like this:<br />
<a href="http://www.dataxstream.com/wp-content/uploads/9-web-dynpro.png" rel="shadowbox[sbpost-10302];player=img;"><img class="alignnone  wp-image-10317" title="9 web dynpro" src="http://www.dataxstream.com/wp-content/uploads/9-web-dynpro.png" alt="" width="504" height="370" /></a></p>
<p>Return to the ‘Layout’ tab, select the TextView and set the ‘Visible’ property to the new attribute. Activate the Web Dynpro Component and test the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2012/01/web-dynpro-basics-context-and-binding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SAP EDI EDPAR Table Walkthrough &#8211; How to Cross Reference SAP Customer Number to External Customer Number (Part 1)</title>
		<link>http://www.dataxstream.com/2012/01/sap-edpar-table-sap-customer-number-cross-reference-to-external-customer-number/</link>
		<comments>http://www.dataxstream.com/2012/01/sap-edpar-table-sap-customer-number-cross-reference-to-external-customer-number/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 05:00:37 +0000</pubDate>
		<dc:creator>dkoch</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP EDI Blog]]></category>
		<category><![CDATA[SAP Functional]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[ALE]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[IDOC]]></category>
		<category><![CDATA[Interface]]></category>
		<category><![CDATA[PI]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SAP Integration]]></category>
		<category><![CDATA[SAP PI]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=10105</guid>
		<description><![CDATA[When creating IDOCs in SAP to send Invoices to customers via EDI you will likely have to send the customers their internal partner numbers on the EDI ANSI X12 810 Invoice Document.  In almost all cases this will not be the same as the SAP partner numbers.  So how can we set up a cross [...]]]></description>
			<content:encoded><![CDATA[<p>When creating IDOCs in SAP to send Invoices to customers via EDI you will likely have to send the customers their internal partner numbers on the EDI ANSI X12 810 Invoice Document.  In almost all cases this will not be the same as the SAP partner numbers.  So how can we set up a cross reference of SAP and external partner numbers?  Well, the answer is simple because SAP has set up a utility to handle this for you.  All you need to do is populate the EDPAR table in SAP using the VOE4 transaction.  Once this is completed the IDOC_OUTPUT_INVOIC function module will read the EDPAR table when the Invoice document output is processed and populate the LIFNR element of the E1EDKA1 or E1EDPA1 segments of the INVOIC IDOC with the external partner number.  Entries in EDPAR can be set up for multiple partners including the Sold-to, Ship-to, and Bill-To numbers so that external customer number cross-references can be passed on the IDOC if needed.</p>
<p>Let&#8217;s look at how this process works.  Let&#8217;s say we have created an invoice document in SAP.  In this case, the Sold-to, Ship-to, and Bill-to partners are all SAP customer number 15.  If we want to create an INVOIC02 IDOC on which the external customer numbers are populated for all three of these partners we would have to set up three EDPAR entries as displayed on the below screen shot.  The Customer field will contain the SAP partner number (Sold-to, Ship-to, Bill-to).  The Ext. Function field will contain the Partner Function (SP = Sold-to, SH = Ship-to, BP = Bill-to).  The External Partner field will contain the external partner number that the customer is expecting on the EDI file.  And the Int. no. field will contain the SAP partner number (Same as the Customer field).</p>
<p><span id="more-10105"></span></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog5.png" rel="shadowbox[sbpost-10105];player=img;"><img class="alignnone size-full wp-image-10164" src="http://www.dataxstream.com/wp-content/uploads/blog5.png" alt="" width="622" height="198" /></a></p>
<p>&nbsp;</p>
<p>After we have set up the Partner Profile (WE20) for the INVOIC for this customer we can produce the output through transaction VF02 to create the IDOC.  The INVOIC02 IDOC will display the Sold-to and the Bill-to partners at the Header level in the E1EDKA1 segments, but because we could have multiple Ship-tos on an invoice the Ship-to partner(s) are located at the Item level in the E1EDPA1 segments.  In both segments, the external partner numbers will be populated in the LIFNR element.  The segments for the three partners are displayed below:</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog6.png" rel="shadowbox[sbpost-10105];player=img;"><img class="alignnone size-full wp-image-10165" src="http://www.dataxstream.com/wp-content/uploads/blog6.png" alt="" width="642" height="559" /></a></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog7.png" rel="shadowbox[sbpost-10105];player=img;"><img class="alignnone size-full wp-image-10166" src="http://www.dataxstream.com/wp-content/uploads/blog7.png" alt="" width="621" height="526" /></a></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog8.png" rel="shadowbox[sbpost-10105];player=img;"><img class="alignnone size-full wp-image-10167" src="http://www.dataxstream.com/wp-content/uploads/blog8.png" alt="" width="635" height="560" /></a></p>
<p>&nbsp;</p>
<p>As you have probably noticed, the Partner Functions on the IDOCs do not match the Partner Functions in the EDPAR table.  Those would translate as follows: SP in EDPAR = AG in the IDOC, SH = WE, BP = RE.  As you can see the LIFNR field is populated with the values in the External Partner field of the EDPAR table.  These values can now be used in the EDI mapping tool to send the value to the customer.</p>
<p>This is a useful tool as new partners can be added easily using the VOE4 table by a customer service representative.  It also keeps the cross reference within SAP so that the EDI group does not have to build their own functionality to convert the partner numbers and maintain it as new customers are added or locations are changed.</p>
<p>This table can be used for other partner types and other outbound IDOCs.  You would need to check the function module that processes the output to see if it uses the EDPAR table and for which partners.  Another internal SAP table that is used for partner cross reference is the PUMA table.  This is used when creating DELVRY and SHPMNT IDOCs whose function modules do not use the EDPAR utility.  The use of the PUMA table will be discussed in a separate blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2012/01/sap-edpar-table-sap-customer-number-cross-reference-to-external-customer-number/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: SAP PI Data Type Enhancements</title>
		<link>http://www.dataxstream.com/2011/10/how-to-sap-pi-data-type-enhancements/</link>
		<comments>http://www.dataxstream.com/2011/10/how-to-sap-pi-data-type-enhancements/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 15:15:43 +0000</pubDate>
		<dc:creator>Craig Stasila</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[BADI]]></category>
		<category><![CDATA[Craig Stasila]]></category>
		<category><![CDATA[Data Type Enhancement]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Message Mapping]]></category>
		<category><![CDATA[PI]]></category>
		<category><![CDATA[SAP PI]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=5217</guid>
		<description><![CDATA[I have worked with SAP PI since it was called SAP XI (version 3.0).  SAP XI was pretty rough around the edges and was not what I would call an enterprise class integration tool.  Each successive SAP PI release and enhancement pack has steadily added functionality such that the latest version of SAP PI is [...]]]></description>
			<content:encoded><![CDATA[<p>I have worked with SAP PI since it was called SAP XI (version 3.0).  SAP XI was pretty rough around the edges and was not what I would call an enterprise class integration tool.  Each successive SAP PI release and enhancement pack has steadily added functionality such that the latest version of SAP PI is finally starting to resemble a fully functional EAI platform.</p>
<p>One such example of additional functionality is the ability to enhance delivered integration content.</p>
<p>Recently, I had to make some modifications to an integration scenario where an SAP ERP system was sending data to an external custom solution.  The good news was the SAP ERP and PI objects were built and delivered by SAP!</p>
<div id="attachment_5218" class="wp-caption alignnone" style="width: 511px"><a href="http://www.dataxstream.com/wp-content/uploads/Blog_dte00.jpg" rel="shadowbox[sbpost-5217];player=img;"><img class="size-full wp-image-5218" title="Delivered Content" src="http://www.dataxstream.com/wp-content/uploads/Blog_dte00.jpg" alt="SAP ERP Delivered Content" width="501" height="333" /></a><p class="wp-caption-text">SAP ERP Delivered Content</p></div>
<p>The bad news was that the interface, as designed, did not meet the business&#8217; need&#8230;</p>
<div id="attachment_5219" class="wp-caption alignnone" style="width: 615px"><a href="http://www.dataxstream.com/wp-content/uploads/Blog_dte01.jpg" rel="shadowbox[sbpost-5217];player=img;"><img class="size-full wp-image-5219" title="Blog_dte01" src="http://www.dataxstream.com/wp-content/uploads/Blog_dte01.jpg" alt="How to add fields to delivered content?" width="605" height="508" /></a><p class="wp-caption-text">How to add fields to delivered content?</p></div>
<p>So, the $64,000 question is, how do we add fields to delivered SAP PI content?<br />
<span id="more-5217"></span><br />
<h2>SAP PI Data Type Enhancement</h2>
<p>SAP PI data type enhancements allow developers to customize delivered SAP PI content.  Here&#8217;s a quick rundown of how it works:</p>
<h3>Step by Step SAP PI Data Type Enhancement Instructions</h3>
<ol>
<li>First, create a new data type enhancement in the SAP PI ESR:<br />
<a href="http://www.dataxstream.com/wp-content/uploads/Blog_dte02.jpg" rel="shadowbox[sbpost-5217];player=img;"><img class="alignnone size-full wp-image-5220" title="Blog_dte02" src="http://www.dataxstream.com/wp-content/uploads/Blog_dte02.jpg" alt="" width="624" height="382" /></a></li>
<li>Add the required fields to the required data elements and then save and activate your SAP PI changes.</li>
<li>The newly created data elements are now in message type:<a href="http://www.dataxstream.com/wp-content/uploads/Blog_dte04.jpg" rel="shadowbox[sbpost-5217];player=img;"><img class="alignnone size-full wp-image-5222" title="Blog_dte04" src="http://www.dataxstream.com/wp-content/uploads/Blog_dte04.jpg" alt="" width="669" height="438" /></a></li>
<li>Login to the SAP ERP system and activate the proxy changes via transaction SPROXY.  This will create/update the proxy structures that correspond to the newly created data elements in the ERP system:<a href="http://www.dataxstream.com/wp-content/uploads/Blog_dte05.jpg" rel="shadowbox[sbpost-5217];player=img;"><img class="alignnone size-full wp-image-5223" title="Blog_dte05" src="http://www.dataxstream.com/wp-content/uploads/Blog_dte05.jpg" alt="" width="439" height="456" /></a></li>
<li>Finally, create a BADI to populate the new data fields in the SAP ERP system:<br />
<a href="http://www.dataxstream.com/wp-content/uploads/Blog_dte06.jpg" rel="shadowbox[sbpost-5217];player=img;"><img class="alignnone size-full wp-image-5224" title="Blog_dte06" src="http://www.dataxstream.com/wp-content/uploads/Blog_dte06.jpg" alt="" width="639" height="246" /></a></li>
<li>Save and activate your ERP changes. Now you&#8217;re ready to rock and roll!</li>
</ol>
<p>SAP PI data type enhancements blends the stability and functionality of delivered content with the flexibility of custom development. It is definitely one of my favorite advances in the SAP PI platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/10/how-to-sap-pi-data-type-enhancements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplify SAP PI Mapping Logic with FixValues Mapping</title>
		<link>http://www.dataxstream.com/2011/10/clean-up-sap-pi-mapping-logic-with-fixvaluemapping/</link>
		<comments>http://www.dataxstream.com/2011/10/clean-up-sap-pi-mapping-logic-with-fixvaluemapping/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 18:00:05 +0000</pubDate>
		<dc:creator>Dave Morin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[David Morin]]></category>
		<category><![CDATA[Message Mapping]]></category>
		<category><![CDATA[PI]]></category>
		<category><![CDATA[SAP PI]]></category>
		<category><![CDATA[XI]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=5159</guid>
		<description><![CDATA[I was trying to think of something to write about this weekend, when I happened to stumble upon this gem: After I stopped laughing, I started to cry, because I realized that this happens all the time in SAP PI&#8211;it just looks a little different&#8230; However, most of the time complex mappings can be simplified [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to think of something to write about this weekend, when I happened to stumble upon this gem:</p>
<p><iframe src="http://player.vimeo.com/video/9981123?byline=0&amp;portrait=0" frameborder="0" width="500" height="375"></iframe></p>
<p>After I stopped laughing, I started to cry, because I realized that this happens all the time in SAP PI&#8211;it just looks a little different&#8230;</p>
<p><span id="more-5159"></span></p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/needlessly-complex-mapping1.png" rel="shadowbox[sbpost-5159];player=img;"><img class="alignnone size-full wp-image-9657" title="Needlessly Complex Mapping" src="http://www.dataxstream.com/wp-content/uploads/needlessly-complex-mapping1.png" alt="" width="606" height="272" /></a></p>
<p>However, most of the time complex mappings can be simplified by using a different approach.  The mapping block FixValues is a great tool to reduce needless. So let&#8217;s expand on this example.</p>
<h2>Reducing Complexity with FixValues Mapping Block</h2>
<p>Let&#8217;s say I am developing an interface between a database with information about goods/materials  and a file for system that needs the database data in an easy to read format. To help visualize here is some pseudo-XML of the database:</p>
<pre style="background-color: #eaeaea; color: #222;">&lt;Database&gt;
  &lt;row&gt;
    &lt;goodName /&gt;
    &lt;goodType /&gt;
    &lt;goodQuantity /&gt;
  &lt;/row&gt;
&lt;/Database&gt;</pre>
<p>And here is some pseudo-XML of the file layout:</p>
<pre style="background-color: #eaeaea; color: #222;">&lt;Report&gt;
  &lt;row&gt;
    &lt;goodNumberUOM /&gt;
    &lt;goodName /&gt;
   &lt;/row&gt;
&lt;/Report&gt;</pre>
<p>In this example, the database categorizes goods by a category code (A-Z). The type of good determines the unit of measure.  In this imaginary scenario, maybe all but 5 categories have unit of measure assignments.  Everything else has the unit of measure of furlongs.  If we were converting the values using code (ABAP, perhaps?), we could implement the logic using a case statement:</p>
<pre style="background-color: #eaeaea; color: #222;">  CASE L_CATEGORY.
    WHEN 'D'.
      L_UOM = 'pounds'.
    WHEN 'C'.
      L_OUM = 'ounce'.
    WHEN 'B'.
      L_OUM = 'kilogram'.
    WHEN 'Y'.
      L_OUM = 'Units'.
    WHEN 'Q'.
      L_OUM = 'SQFT'.
    WHEN 'J'.
      L_OUM = 'Other unit of measure'.
    WHEN 'G'.
      L_OUM = 'Quarks'.
    WHEN 'F'.
      L_OUM = 'Kilograms'.
    WHEN 'E'.
      L_OUM = 'Units'.
    WHEN OTHERS.
      L_UOM = 'Furlongs'.
  ENDCASE.</pre>
<p>But how would we accomplish the same using an SAP PI message mapping? Well, one option would be to implement the logic with nesting IF blocks, but that has the nasty side effect of producing the messy message mapping shown above.  Another option is to implement the case statement in a UDF.  But a simpler option exists.  Use a FixValues mapping block.</p>
<p>Here is the same mapping logic using a FixValues mapping block:</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/Manipulate-TRUEFALSE_1.png" rel="shadowbox[sbpost-5159];player=img;"><img title="Manipulate TRUEFALSE_1" src="http://www.dataxstream.com/wp-content/uploads/Manipulate-TRUEFALSE_1.png" alt="" width="607" height="560" /></a></p>
<p>And here are the FixValues settings: </p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/Easier-to-understand-mapping_2.png" rel="shadowbox[sbpost-5159];player=img;"><img title="Easier to understand mapping_2" src="http://www.dataxstream.com/wp-content/uploads/Easier-to-understand-mapping_2.png" alt="" width="585" height="372" /></a></p>
<p>Another favorite trick of mine is to use FixValues to evaluate TRUE and FALSE. This can be useful on filtering at the root level (e.g. a requirement to not send a record when the good is a type not relevant to the report you are generating).  In this example mapping, the row will not get generated if the type isn’t a D, A, T, X, S, R, E, or M:</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/Manipulate-TRUEFALSE_1.png" rel="shadowbox[sbpost-5159];player=img;"><img title="Manipulate TRUEFALSE_1" src="http://www.dataxstream.com/wp-content/uploads/Manipulate-TRUEFALSE_1.png" alt="" width="607" height="560" /></a></p>
<p>And here are the FixValues settings: </p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/Manipulate-TRUEFALSE_2.png" rel="shadowbox[sbpost-5159];player=img;"><img title="Manipulate TRUEFALSE_2" src="http://www.dataxstream.com/wp-content/uploads/Manipulate-TRUEFALSE_2.png" alt="" width="585" height="372" /></a></p>
<p>The FixValues mapping block is a very useful message mapping block that can be used to streamline complicated SAP PI message mappings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/10/clean-up-sap-pi-mapping-logic-with-fixvaluemapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Availability Time Planning in SAP PI</title>
		<link>http://www.dataxstream.com/2010/11/configuring-availability-time-planning-in-sap-pi/</link>
		<comments>http://www.dataxstream.com/2010/11/configuring-availability-time-planning-in-sap-pi/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 14:30:12 +0000</pubDate>
		<dc:creator>Dave Morin</dc:creator>
				<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[Adapter Engine]]></category>
		<category><![CDATA[Communication Channel]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[David Morin]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[SAP PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=5877</guid>
		<description><![CDATA[A common problem in SAP PI is scheduling a particular interface to run at a particular time and date for adapters that poll (such as the file adapter). The communication channel is not a good way to handle this functionality as the polling period is reset if a change is activated or the channel is [...]]]></description>
			<content:encoded><![CDATA[<p>A common problem in SAP PI is scheduling a particular interface to run at a particular time and date for adapters that poll (such as the file adapter). The communication channel is not a good way to handle this functionality as the polling period is reset if a change is activated or the channel is stopped and then started on the runtime workbench. The purpose of this blog is to demonstrate how to set up communication channels so that they “turn on” at a specific point in time and how to maintain this setting if the system needs to be restarted.</p>
<p><span id="more-5877"></span>To begin, you must have a communication scenario, or at least the communication channel, already configured. Go to the <em>Runtime Workbench (RWB) &gt; Adapter Engine&gt; Communication Channel Monitoring</em>. In the top right corner of the screen there are two options that you may have overlooked dozens of times. Select <em>Availability Time Planning</em>:</p>
<p style="text-align: center;"><a href="http://beta.dataxstream.com/wp-content/uploads/Modified-Availability-Time-Planning.png" rel="shadowbox[sbpost-5877];player=img;"><img class="aligncenter size-full wp-image-5879" src="http://beta.dataxstream.com/wp-content/uploads/Modified-Availability-Time-Planning.png" alt="" width="687" height="209" /></a></p>
<p>On the next screen, fill in a description, pick a time and a duration that you would like it to run and for how long. This time period works in conjunction with the polling period used on the communication channel. For example if you polling period on the communication channel is every 5 minutes and you have the availability from 1 until 2, then the channel will poll every 5 minutes from 1 until 2. You also need to select active from this screen in order for the rule to work.</p>
<p style="text-align: center;"><a href="http://beta.dataxstream.com/wp-content/uploads/Original-configuring-time-availability-planning.png" rel="shadowbox[sbpost-5877];player=img;"><img class="aligncenter size-full wp-image-5880" src="http://beta.dataxstream.com/wp-content/uploads/Original-configuring-time-availability-planning.png" alt="" width="779" height="467" /></a></p>
<p>After you are done selecting the time, select the communication channel tab. I find that the filter by explicit list is often easier so select that mode, then select the communication channels that you want to affect click add and then select save.</p>
<p style="text-align: center;"><a href="http://beta.dataxstream.com/wp-content/uploads/modified-selecting-channels-explicitly.png" rel="shadowbox[sbpost-5877];player=img;"><img class="aligncenter size-full wp-image-5881" src="http://beta.dataxstream.com/wp-content/uploads/modified-selecting-channels-explicitly.png" alt="" width="614" height="510" /></a></p>
<p>Now you need to go back to communication channel monitoring and select the communication channel. There is an option for Automatic Control, and once you select it and your channel will turn off or on depending on the Availability Times that you configured.  One last consideration is that if someone mass starts or stops the channels, they must be in automatic control in order for the availability planning to work.</p>
<p>You should now be able to configure availability time planning. This feature will allow to run specific interfaces at specific times and dates, which is more robust than the standard communication channel polling interval.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2010/11/configuring-availability-time-planning-in-sap-pi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What’s in a Naming Convention? Part II</title>
		<link>http://www.dataxstream.com/2010/05/what%e2%80%99s-in-a-naming-convention-part-ii/</link>
		<comments>http://www.dataxstream.com/2010/05/what%e2%80%99s-in-a-naming-convention-part-ii/#comments</comments>
		<pubDate>Tue, 25 May 2010 13:30:29 +0000</pubDate>
		<dc:creator>Dave Morin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[Basis/Netweaver]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[David Morin]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[namespace]]></category>
		<category><![CDATA[NetWeaver]]></category>
		<category><![CDATA[SAP PI]]></category>
		<category><![CDATA[XI]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=5056</guid>
		<description><![CDATA[ I would like to say that I had a great DataXstream ESR-specific naming convention, however the SAP naming convention guide for PI 7.1 does the job perfectly.  In this post I would like to point out some things that I feel most people miss, as well as some things that I think are particularly interesting.]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.dataxstream.com/2010/05/what’s-in-a-naming-convention/">last post</a>, I discussed naming the naming convention that DataXstream recommends for SAP PI Integration Directory (ID) objects.  I would like to say that I had a great DataXstream ESR-specific naming convention, however the SAP naming convention guide for PI 7.1 does the job perfectly. Here is the link to the  PI 7.1 naming convention guide <a href="http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40a66d0e-fe5e-2c10-8a85-e418b59ab36a?QuickLink=index&amp;overridelayout=true">http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40a66d0e-fe5e-2c10-8a85-e418b59ab36a?QuickLink=index&amp;overridelayout=true</a> . I would like to point out some things that I feel most people miss, as well as some things that I think are particularly interesting.</p>
<h3><strong>Object Name Prefixes</strong></h3>
<p>I have seen a lot of places use prefixes or suffixes before objects such as or dt_ or _mt. I have never really been a fan of these prefixes and suffixes, and apparently neither is the above linked naming convention guide. The reason being is that they are unnecessary. It would be difficult to confuse a message type with a data type in a real interface scenario, even if troubleshooting an unknown broken object. Plus it makes message mapping unnecessarily confusing and long since it’s not clear whether to add the prefix, i.e. MT_one_to_MT_two. Good descriptive names are usually all that you need e.g. DEBMAS_to_Customer. The only possible exception to a no-suffix-or-prefix-policy is the service interface, as sometimes it is useful to know which direction and type a service interface is. An argument for a prefix or a suffix to describe a service interface would be to assist in understanding the flow from an SAP perspective in the event that someone who didn’t develop the interface had to come behind and troubleshoot. A argument against would be the fact that it looks silly if you use it for a web service, because you have a name that doesn’t mean anything to a third party user (note operation mappings are told to omit the prefix of direction and mode in the SAP guide).</p>
<p>One interesting thing that I noticed in my investigation of PI 7.1 EHP1 is that it appears that naming conventions on PI can be validated. If the object names do not conform to a naming convention a message will appear. Ter perform this check in the ESR go to menu <em>Tools&gt;Component Check</em>.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/2010/05/ESB-Component-Check1.jpg" rel="shadowbox[sbpost-5056];player=img;"><img class="alignnone size-full wp-image-5115" title="ESB-Component-Check" src="http://www.dataxstream.com/wp-content/uploads/2010/05/ESB-Component-Check1.jpg" alt="" width="551" height="434" /></a></p>
<p>Select &#8220;Governance&#8221; and &#8220;Interface Name Checks&#8221;:</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/2010/05/Interface-Name-Checks1.jpg" rel="shadowbox[sbpost-5056];player=img;"><img class="alignnone size-full wp-image-5116" title="Interface Name Checks" src="http://www.dataxstream.com/wp-content/uploads/2010/05/Interface-Name-Checks1.jpg" alt="" width="598" height="494" /></a></p>
<p>If the service interface does not end with (In/Out)(SYNC/ASY) the interface check will show as an error (does not impact interface processing). I created 2 interfaces: one good and one bad to show this error.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/2010/05/Results.jpg" rel="shadowbox[sbpost-5056];player=img;"><img class="alignnone size-full wp-image-5117" title="Results" src="http://www.dataxstream.com/wp-content/uploads/2010/05/Results.jpg" alt="" width="599" height="494" /></a></p>
<p>My suspicion is that SAP will put more in place to force consistent naming standards depending on the service interface pattern in future releases.</p>
<h3><strong>Using a software component and Namespace for each “side” of an interface</strong></h3>
<p>All objects of an interface should not be grouped in a single namespace. They should to be split among the Software Component Versions of the systems being interfaced. Otherwise when you go to configure, you will not be able to see your operational mapping (OM) in the dropdown box without having to select all in the dropdown menu. A general rule of thumb is: if it’s not easy to configure, odds are you have probably done something wrong. Another reason why an object might not appear in the dropdown menu (for example for an operations mapping on an interface mapping) would be if the installed checkbox is not clicked on the SLD. When done correctly, most interfaces should be able to be configured quickly and intuitively in the integration directory (ID) without the need to select from all SWCV from dropdown menus on the integration builder.</p>
<p>Whatever naming convention you choose to use for the ESR, the important thing to remember is that adhering to the standard makes production support and troubleshooting faster and easier.<br />
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2010/05/what%e2%80%99s-in-a-naming-convention-part-ii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Native SQL in an ABAP Proxy</title>
		<link>http://www.dataxstream.com/2010/05/using-native-sql-in-an-abap-proxy/</link>
		<comments>http://www.dataxstream.com/2010/05/using-native-sql-in-an-abap-proxy/#comments</comments>
		<pubDate>Thu, 13 May 2010 13:30:22 +0000</pubDate>
		<dc:creator>Mike Salvo</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP ABAP Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[ABAP]]></category>
		<category><![CDATA[ABAP development]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Mike Salvo]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SAP ABAP]]></category>
		<category><![CDATA[SAP programming]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=4929</guid>
		<description><![CDATA[To implement a case-insensitive WHERE clause in ABAP, you simply needed to use the native SQL UPPER() construct. The database system that is being used is Microsoft SQL Server, but the UPPER() function and its syntax is similar across different database platforms. This seemed like an easy nut to crack. But, as I soon found out, I actually had a lot to learn.]]></description>
			<content:encoded><![CDATA[<p>Recently, I was looking at a requirements document to build an interface to an external system that wants to query customer master data by the customer first name and last name.  As I read this, there were a cacophony of thoughts, all demanding equal attention, racing through my head:</p>
<blockquote>
<ul>
<li><span style="color: #0000ff;">How will I ever match the inbound interface parameter &#8220;Tom&#8221; with &#8220;TOM&#8221;, or &#8220;tom&#8221;?</span></li>
<li><span style="color: #0000ff;">How will I ever match the inbound interface parameter &#8220;Smith&#8221; with &#8220;SMITH&#8221; or &#8220;smith&#8221;?</span></li>
<li><span style="color: #0000ff;">The ABAP WHERE clause is <strong>not</strong> case-INsensitive.</span></li>
<li><span style="color: #0000ff;">There could be hundreds of customers named Tom Smith.</span></li>
<li><span style="color: #0000ff;">KNA1-NAME1 and KNA1-NAME2 are not indexed fields.</span></li>
<li><span style="color: #0000ff;">And no, we are not storing any portion of either first or last name in an existing indexed field like SORTL.</span></li>
<li><span style="color: #0000ff;">There are well over one million customers in the database.</span></li>
<li><span style="color: #0000ff;">We have already decided to use PI for all interfaces.</span></li>
<li><span style="color: #0000ff;">I will have to buy the BASIS team a case of beer to get them to agree to create indices on the fields KNA1-NAME1 and KNA1-NAME2 in a table with over one million records</span>.</li>
</ul>
</blockquote>
<p>I arrived at the conclusion that I need a case-insensitive database query, along with database indices created for the fields KNA1-NAME1 and KNA1-NAME2.</p>
<p>But, what is a case-insensitive WHERE clause?  A little research and help from colleagues revealed that many had gone before me, and this was nothing new.  To implement a case-insensitive WHERE clause in ABAP, you simply needed to use the native SQL UPPER() construct.  The database system that is being used is Microsoft SQL Server, but the UPPER() function and its syntax is similar across different database platforms.  This seemed like an easy nut to crack.  But, as I soon found out, I actually had a lot to learn.<br />
<span id="more-4929"></span></p>
<h3>Take 1</h3>
<p>The examples I found were very explicit, showing actual code snippets.  Using my research examples as a template, I built what was to be my first attempt at using native SQL in a ZTEST ABAP program:</p>
<pre style="background-color: #eaeaea; color: #222;">exec sql.
  select kunnr name1 name2
    from kna1
    into table i_cust
    where upper(name1) like :l_name1
      and upper(name2) like :l_name2
endexec.</pre>
<p>Well, as a native SQL rookie, I was stopped dead in my tracks.  Native SQL does not allow a select into a table – you can only select into a work area.</p>
<h3>Take 2</h3>
<p>In my ZTEST ABAP program, I changed the code to SELECT into a work area and append the work area to an internal table in a subroutine:</p>
<pre style="background-color: #eaeaea; color: #222;">exec sql performing append_cust.
  select kunnr, name1, name2
    from kna1
    into :wa_cust
    where upper(name1) like :l_name1
      and upper(name2) like :l_name2
endexec.

form append_cust.
  append wa_cust to i_cust.
endform.</pre>
<p>I really thought that this would work.  But, I was getting a syntax error from native SQL – the table name was not being recognized.  A little more research revealed that, in <em>some</em> cases, only UPPER CASE is valid for table names and field names.  OK.  I can handle that.</p>
<h3>Take 3</h3>
<p>I changed the native SQL statement to all UPPER CASE in my ZTEST ABAP program:</p>
<pre style="background-color: #eaeaea; color: #222;">EXEC SQL PERFORMING APPEND_CUST.
  SELECT KUNNR, NAME1, NAME2
    FROM KNA1
    INTO :WA_CUST
    WHERE UPPER(NAME1) LIKE :L_NAME1
      AND UPPER(NAME2) LIKE :L_NAME2
ENDEXEC.

form append_cust.
  append wa_cust to i_cust.
endform.</pre>
<p>This <em>appeared</em>to work just fine&#8230;  Except, I noticed that too many records were being returned.  A little more analysis showed that I was getting records from ALL clients, not just my logon client.</p>
<h3>Take 4</h3>
<p>Again, in my ZTEST ABAP program, specify the client:</p>
<pre style="background-color: #eaeaea; color: #222;">EXEC SQL PERFORMING APPEND_CUST.
  SELECT KUNNR, NAME1, NAME2
    FROM KNA1
    INTO :WA_CUST
    WHERE UPPER(NAME1) LIKE :L_NAME1
      AND UPPER(NAME2) LIKE :L_NAME2
      <span style="color: #ff0000;">AND MANDT = :L_MANDT</span>
ENDEXEC.

form append_cust.
  append wa_cust to i_cust.
endform.</pre>
<p>Now I was getting the results that I wanted!!!!  So, I pasted this ZTEST ABAP code into the ABAP proxy.</p>
<p>A syntax check of the code immediately rejected the use of subroutines &#8211; they are not allowed in OO ABAP.  I suppose I should have known that.  The error message indicated that I needed to use a cursor instead of the subroutine.  So, I started cursing – a lot!!!</p>
<h3>Take 5 (The Final Version)</h3>
<p>Here is the final version of the code which works for OO ABAP, and, hence, the ABAP proxy:</p>
<pre style="background-color: #eaeaea; color: #222;">EXEC SQL.
  OPEN CUSTCURSOR FOR
    SELECT KUNNR, NAME1, NAME2
      FROM KNA1
      WHERE UPPER(NAME1) LIKE :L_NAME1
        AND UPPER(NAME2) LIKE :L_NAME2
        AND MANDT = :L_MANDT
ENDEXEC.

DO.
  EXEC SQL.
    FETCH NEXT CUSTCURSOR INTO :WA_CUST
  ENDEXEC.

  IF SY-SUBRC NE 0.
    EXIT.
  ELSE.
    APPEND WA_CUST TO I_CUST.
  ENDIF.
ENDDO.

EXEC SQL.
  CLOSE CUSTCURSOR
ENDEXEC.</pre>
<p>Well, I finally got it right after five tries.  As mentioned before, I found many explicit code examples, but none were for OO ABAP with a database  requiring UPPER CASE be used, so that the table and field names would be recognized in the native SQL SELECT statement.</p>
<p>I learned something new about SAP.  I hope that I never stop learning.  I also hope that this blog might save someone a bit of distress in trying to work through a similar situation.  Now, I just need to figure out what kind of beer to buy the BASIS team to get those indexes created&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2010/05/using-native-sql-in-an-abap-proxy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What’s in a Naming Convention?</title>
		<link>http://www.dataxstream.com/2010/05/what%e2%80%99s-in-a-naming-convention/</link>
		<comments>http://www.dataxstream.com/2010/05/what%e2%80%99s-in-a-naming-convention/#comments</comments>
		<pubDate>Wed, 05 May 2010 13:30:25 +0000</pubDate>
		<dc:creator>Dave Morin</dc:creator>
				<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[David Morin]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[namespace]]></category>
		<category><![CDATA[PI]]></category>
		<category><![CDATA[SAP PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=4762</guid>
		<description><![CDATA[It doesn’t take long for a PI implementation to become a complete mess if standards are not put in place before development occurs.  Even among seasoned developers, opinions vary as to the best way to name and organize the IR (ESR) or ID (IB), depending on different backgrounds and previous project experience.  In the next [...]]]></description>
			<content:encoded><![CDATA[<p>It doesn’t take long for a PI implementation to become a complete mess if standards are not put in place before development occurs.  Even among seasoned developers, opinions vary as to the best way to name and organize the IR (ESR) or ID (IB), depending on different backgrounds and previous project experience.  In the next few blogs I would like to touch upon some of the best practices that we utilize in our implementations at DataXstream, which we have arrived at though our project experiences and  discussion, both internally and with other middleware experts.<br />
<span id="more-4762"></span></p>
<h2>Part One &#8211; The Integration Directory (for PI 7.1 or greater)</h2>
<p>I decided to start with the Integration Builder because it’s the easier component with which to bring everything into alignment (versus the ESR). Most of the time there are only two things to name: the scenario and the communication channel.  Unfortunately, it is still incredibly easy for objects to become disorganized.</p>
<h3>Configuration Scenarios</h3>
<p>The whole purpose of a configuration scenario is for organization. An interface will run whether it is in a scenario or not, however troubleshooting is much more difficult when objects are not properly organized. It is important to use a naming convention that addresses the business purpose of the interface and is specific to the flow of the interface (to help with troubleshooting issues and make flows easily traceable).  To accomplish all of these requirements, DataXstream recommends a naming convention that includes the specification number which originated the development request and a route number. The route number is used in interface diagrams and documentation and assists production support with identifying objects in the event that a business scenario involves multiple destinations.  We also recommend including a statement to describe the flow for the route, as well as the description of what the interface does. Some examples of a naming convention we might use would be:</p>
<p>0001.001_ECC_to_Partner1_TransactionalDataDistribution<br />
0001.002_ECC_to_Partner2_TransacationalDataDistribution<br />
0002.001_Partner3_to_ECC_SomeInboundInterface<br />
0003.001_Partner4_to_Partner5_SomeNonSAPInterface</p>
<p>The other thing of note is that all objects should exist in a scenario, even if in a test_DONOTTRANSPORTTOPRODUCTION_prototype_interfacedescription scenario. Proper organization makes it a lot easier to identify, modify, turn on and off, and troubleshoot interfaces. Fully configured interfaces running in objects view take more time to understand and are more time consuming to fix.</p>
<h3>Communication Channels</h3>
<p>Communication channels should describe the purpose, type, and direction of communication. However a lot of people include unnecessary components in the communication channel. For example, since there are usually only two objects with names in the IB, it is not necessary to prefix a communication channel with cc_ as it is unlikely to ever be confused for a scenario. A lot of people also include the communication component in the name of the communication channel, but that also seems redundant, since only communication channels exist under communication components. Some things that are valuable in looking at communication channel naming convention are knowing a brief description of the process it involves, a direction of the communication channel, and the type of adapter being used. Some examples of naming conventions we might use are:</p>
<p><strong>Logistics Company</strong></p>
<ul>
<li>PO_file_sender</li>
</ul>
<p><strong>Database System</strong></p>
<ul>
<li>materialSqlXml_jdbc_receiver</li>
</ul>
<p><strong>ECC system</strong></p>
<ul>
<li>IDoc_receiver</li>
</ul>
<p>As you can see, it is possible to keep the name descriptive and helpful without making the name overly verbose when it comes to communication channels.</p>
<p>The order in which the naming components are ordered depend as much on personal preference as anything else.  For example, let&#8217;s examine a sender file channel that pertains to purchase order data.  Some of the naming convention options are:</p>
<ul>
<li>Sender_File_PO: groups all sender and receiver channels together, then groups by adapter type</li>
<li>File_Sender_PO: groups communication channels by adapter type, then by sender and receiver</li>
<li>PO_File_Sender: groups by logical interface payload, then adapter type</li>
</ul>
<h3>Other Things To Watch Out For</h3>
<ul>
<li><strong>Configure the unnecessary</strong>- We all know that no sender agreement or channel is needed for certain communication methods like iDoc or SOAP to the IE, but if you can, add them to the scenario anyways. It makes it easier for a new developer (think of someone new to production support) to understand what’s happening with an interface, when they can see a consistent flow of the interface sender agreement to receiver agreement on all interfaces in a landscape. I know from working with working with soap, it’s kind of nice being able to grab the wsdl from the sender agreement, even though that component is technically optional.</li>
</ul>
<ul>
<li><strong>Don’t force an interface to work</strong>- If you are configuring a determination or agreement and are not seeing what you expect from the drop down menu, it may be because you haven’t properly defined the SLD or IR. Don’t be lazy and select the interface from all namespaces or SWCVs just to make the interface work; go back and figure out why its not dropping down on the drop down box and correct it.</li>
</ul>
<p>Establishing and adhering to a well thought-out and consistent naming convention can save you a lot of time during the support of your SAP PI interfaces.  In Part II of this blog, I will discuss naming conventions in SAP PI&#8217;s Enterprise Service Repository (ESR).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2010/05/what%e2%80%99s-in-a-naming-convention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting the Services Registry</title>
		<link>http://www.dataxstream.com/2010/02/troubleshooting-the-services-registry/</link>
		<comments>http://www.dataxstream.com/2010/02/troubleshooting-the-services-registry/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 02:07:45 +0000</pubDate>
		<dc:creator>Dave Morin</dc:creator>
				<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP PI Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[David Morin]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[PI]]></category>
		<category><![CDATA[SAP PI]]></category>
		<category><![CDATA[UDDI]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[XI]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=4441</guid>
		<description><![CDATA[Recently I set up the services registry for PI 7.1 EHP1 for a client of ours. Although it seemed like it would be a simple process, I ran into a 401 authorization issue and another issue where  web services were not publishing to the services registry. Looking online there are a lot of people who ran [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I set up the services registry for PI 7.1 EHP1 for a client of ours. Although it seemed like it would be a simple process, I ran into a 401 authorization issue and another issue where  web services were not publishing to the services registry. Looking online there are a lot of people who ran into the same issues as I did, so I am providing, here, the steps to perform if your services registry isn’t working.</p>
<p><span id="more-4441"></span></p>
<p>Please note that I was unable to find the wizard for setting it the Services registry in PI 7.1 EPH1, which means I did it manually.</p>
<h3><strong>Make sure everything is correct in the Services Registry Management </strong></h3>
<p>Go to the NWA (http://host:port/nwa).</p>
<p>Go to <em>SOA Management&gt; Technical Configuration&gt;Services Registry Management</em>.<br />
In theory, there is nothing to do here, however I did specify the discovery URL api parameter as the hostname of the server (no port). If you have changed some settings, on the maintenance tab you can click reinitialize, which should reset any changes you have made back to the initial state.</p>
<h3><strong>Configure the ServicesRegistrySiPort</strong></h3>
<p>Go to <em>SOA Management&gt; Application and Scenario Communication&gt; Single Service Administration</em></p>
<p>Click the Consumer Proxies tab.</p>
<p>Search for &#8220;ServicesRegistrySi&#8221;.</p>
<p>Click on the result and click the Configuration Tab and click on ServicesRegistrySiPort.</p>
<p>The service endpoint name should be ServicesRegistrySiPort.  Don’t change it.</p>
<p>Click security.</p>
<p>You have to give it an http authentication. If you don&#8217;t give the authentication, you will eventually have problems like not being able to publish to the SR, even though you may be able to access the registry.</p>
<p>Click on the user ID/ password, click details, and input your http authentication parameters.</p>
<p style="text-align: center;"><a href="http://www.dataxstream.com/wp-content/uploads/2010/02/ServiceRegistrySI1.png" rel="shadowbox[sbpost-4441];player=img;"><img class="aligncenter size-full wp-image-4455" src="http://www.dataxstream.com/wp-content/uploads/2010/02/ServiceRegistrySI1.png" alt="" width="567" height="596" /></a></p>
<h3><strong>Configure the third party UDDI (Only if not using SAP’s UDDI)</strong></h3>
<p>If you are using a non-sap UDDI, you will need to go to <em>NWA&gt;Destination Template Management</em> and create a UDDI_DESTINATION and a CLASSIFICATION_DESTINATION to point to the respective urls of your uddi. Don’t forget to click security and select User ID/Password Authentication for both destinations. Otherwise, you will get a 401 not authorized error when you try to access the services registry&#8211;similar to if you mistyped your password at ServicesRegistrySiPort.</p>
<p style="text-align: center;"><a href="http://www.dataxstream.com/wp-content/uploads/2010/02/3rd-party-uddi.png" rel="shadowbox[sbpost-4441];player=img;"><br />
</a><a href="http://www.dataxstream.com/wp-content/uploads/2010/02/3rd-party-uddi.png" rel="shadowbox[sbpost-4441];player=img;"></a><a href="http://www.dataxstream.com/wp-content/uploads/2010/02/3rd-party-uddi1.png" rel="shadowbox[sbpost-4441];player=img;"><img class="aligncenter size-full wp-image-4453" src="http://www.dataxstream.com/wp-content/uploads/2010/02/3rd-party-uddi1.png" alt="" width="493" height="503" /></a></p>
<h3><strong>Security</strong></h3>
<p style="text-align: center;">Make sure that your user has  UDDI_TierN and SERVICES_REGISTRY_READ_WRITE authorizations or you will get a 401 not authorized error.  Of course. in your system you should use a technical user instead of your userid as which I did for the purposes of this blog.<a href="http://www.dataxstream.com/wp-content/uploads/2010/02/Security-Authorizations1.png" rel="shadowbox[sbpost-4441];player=img;"><img class="aligncenter size-full  wp-image-4454" src="http://www.dataxstream.com/wp-content/uploads/2010/02/Security-Authorizations1.png" alt="" width="557" height="441" /></a></p>
<p>Please note, I did run into an issue where it suddenly stopped working a day everything was configured. All I can say is Gremlins. I switched the user to a technical user with the authorization listed above on the ServicesRegistrySiPort as well as on the destination templates and I haven’t had a problem since.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2010/02/troubleshooting-the-services-registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

