<?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; DataXstream</title>
	<atom:link href="http://www.dataxstream.com/tag/dataxstream/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dataxstream.com</link>
	<description>SAP Certified Consultants</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:57:26 +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 IDOCs for Customer Number with different Sales Organizations to different External Partnerships</title>
		<link>http://www.dataxstream.com/2012/02/sap-idocs-for-customer-number-with-different-sales-organizations-to-different-external-partnerships/</link>
		<comments>http://www.dataxstream.com/2012/02/sap-idocs-for-customer-number-with-different-sales-organizations-to-different-external-partnerships/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 14:00:47 +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[Uncategorized]]></category>
		<category><![CDATA[ALE]]></category>
		<category><![CDATA[DataXstream]]></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]]></category>
		<category><![CDATA[XI/PI]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=10174</guid>
		<description><![CDATA[Have you ever implemented an outbound  EDI process from SAP for a single customer number where the customer has multiple EDI trading by Sales Organization or Division?  It can be done.  In order to accomplish this you will need to create separate output types for each Sales Organization/Division and then set up the Access Sequence/Output [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever implemented an outbound  EDI process from SAP for a single customer number where the customer has multiple EDI trading by Sales Organization or Division?  It can be done.  In order to accomplish this you will need to create separate output types for each Sales Organization/Division and then set up the Access Sequence/Output Determination in order to create the IDOC for each partnership.  You can then use the Message Variant and/or Message Function fields of the Partner Profile to differentiate between the two Sales Organizations/Divisions.  Finally, you would set up your EDI Mapping to look at the Partner Profile fields in order to route it to the correct partnership.  Let&#8217;s take a closer look at this process.</p>
<p>Let&#8217;s say that Customer 15 in your SAP system buys products from your company.  It sends inbound EDI Orders to you using three different partner IDs because they have 3 internal divisions and they want all transactions to be separate.  You want to keep all sales data for this customer under one customer number in your SAP system and just separate them by a different division.  You are required to send out EDI invoices to this customer, but they must go to the correct EDI Partner ID.  Let&#8217;s say you would normally use the Standard SAP Output Type RD00 and  Access Sequence 0003 (Sales Org, Distribution Channel, Division, Customer Number) for producing your INVOIC IDOCs.<span id="more-10174"></span></p>
<p>Your first step would be to make three copies of the RD00 Output Type (ZRD0,  ZRD1, ZRD2) using transaction V/40.  We will need to make three copies because the Standard RD00 Output type uses Access Sequence 0004.   Select Change mode for this transaction and find the RD00 entry.  Select the RD00 entry and click on the &#8216;Copy As&#8217;  icon on the Menu bar or press the F6 key.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog9.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10183" src="http://www.dataxstream.com/wp-content/uploads/blog9.png" alt="" width="800" height="674" /></a></p>
<p>Change the Output Type to ZRD0 and the Access Sequence to 0003 and hit your Enter key.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog10.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10184" src="http://www.dataxstream.com/wp-content/uploads/blog10.png" alt="" width="796" height="600" /></a></p>
<p>A prompt will appear with three options.  Copy all, only copy entry, or cancel.  Select the copy all option.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog111.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10185" src="http://www.dataxstream.com/wp-content/uploads/blog111.png" alt="" width="821" height="634" /></a></p>
<p>An information message will appear displaying the number of dependent entries have been added.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog12.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10186" src="http://www.dataxstream.com/wp-content/uploads/blog12.png" alt="" width="645" height="606" /></a></p>
<p>Hit the enter key and the main Output Type screen will appear with your new output type.  Select the entry and double click the Processing Routines option in the left hand column.  Make sure that the EDI Medium is listed under the Processing Routines.  If not, add it as shown below.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog13.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10187" src="http://www.dataxstream.com/wp-content/uploads/blog13.png" alt="" width="1171" height="389" /></a></p>
<p>Double click on the Partner Functions option in the left hand column.  Make sure the Partner Function you will be using is listed for the EDI Medium.  In this case we will be using the BP (Bill-to Party) Partner Function.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog14.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10188" src="http://www.dataxstream.com/wp-content/uploads/blog14.png" alt="" width="769" height="539" /></a></p>
<p>Hit the save button to save the new output type.  Repeat this process for the other two new output types.  If the Access Sequence you require is not available a new one can be created.  Creating a new Access Sequence is not covered in this blog.</p>
<p>Now we can set up the Partner Profiles for this customer using transaction WE20.  On WE20, expand the Partner Type KU folder and select customer number 15.  Under the Outbound parmtrs section click on the &#8216;Create Outbound Parameters&#8217; icon.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog15.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10189" src="http://www.dataxstream.com/wp-content/uploads/blog15.png" alt="" width="824" height="745" /></a></p>
<p>Fill in the proceeding screen with the as follows.  If you are using an IDOC Extension enter that also.  For this example we are just using the Standard INVOIC02 IDOC.  As you can see I have entered 10 in the Message Code field.  This represents one of the Divisions for this customer.  You can use this field and the Message Function field to differentiate between Divisions or other criteria you wish to use.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog16.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10190" src="http://www.dataxstream.com/wp-content/uploads/blog16.png" alt="" width="635" height="647" /></a></p>
<p>Select the Message Control tab and click on the Insert Row icon.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog17.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10191" src="http://www.dataxstream.com/wp-content/uploads/blog17.png" alt="" width="654" height="590" /></a></p>
<p>Your Application will be V3 (Billing), your Message Type will ZRD0 (the new output type), and your Process Code will be SD09 (Invoice).  Enter these three values and save the entry.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog18.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10192" src="http://www.dataxstream.com/wp-content/uploads/blog18.png" alt="" width="685" height="655" /></a></p>
<p>You will create two more Outbound Parameter entries for the other Divisions.  In these two new entries you will place the other divisions in the Message Code field and the other output type field in the Message Control Message Type field.  Everything else will be the same.</p>
<p>When you are done, the Partner Profile for this customer will look like this.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog19.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10193" src="http://www.dataxstream.com/wp-content/uploads/blog19.png" alt="" width="756" height="711" /></a></p>
<p>Finally we will need to create the output determination so the output is created automatically once the invoice is completed.  For invoicing, the transaction for output determination is VV31 for create and VV32 for changes.  We will use VV31 since this is the first time this output type will be used.  Enter ZRD0 as the Output Type and hit Enter or click the Key Combination button.  If more then one Key Combination is available then a pop up window will appear asking which one you want to use.  Once you select one and click the Green check the key fields will appear.  If there is only one, then the key field will appear immediately.  Select the SOrg/Distrib Ch/Division/Customer option.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog20.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10194" src="http://www.dataxstream.com/wp-content/uploads/blog20.png" alt="" width="784" height="479" /></a></p>
<p>Enter the Sales Org, Distribution Channel, and Division data.  Then for each customer you will be using this Output Determination for you would enter the Customer Number, Partner Function, Medium (6 = EDI), Date/Time (This represents when/how the output will be processed), and Language (EN = English).  Then hit the save button.  Repeat this process for the other two output types.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/blog21.png" rel="shadowbox[sbpost-10174];player=img;"><img class="alignnone size-full wp-image-10195" src="http://www.dataxstream.com/wp-content/uploads/blog21.png" alt="" width="879" height="801" /></a></p>
<p>Once this is completed every time an invoice is created for this combination of Sales Org, Distribution Channel, Division, and Customer number an Output will be created using the specified Output Type.  Once the output is processed an IDOC will be created with the Division in the Control Record of the IDOC which can then be used in the EDI Software to determine which EDI Partner the data should be sent to.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2012/02/sap-idocs-for-customer-number-with-different-sales-organizations-to-different-external-partnerships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Build an RFC Client with NCo 3.0 for VB.NET &#8211; A Step-By-Step Guide</title>
		<link>http://www.dataxstream.com/2011/11/nco-3-rfc-client-vb-net-step-by-step/</link>
		<comments>http://www.dataxstream.com/2011/11/nco-3-rfc-client-vb-net-step-by-step/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 16:50:25 +0000</pubDate>
		<dc:creator>Craig Stasila</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[.Net Connector]]></category>
		<category><![CDATA[Craig Stasila]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[NCo]]></category>
		<category><![CDATA[NCo 3.0]]></category>
		<category><![CDATA[SAP .Net Connector]]></category>
		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=9772</guid>
		<description><![CDATA[Recently, I published an article showing step-by-step instructions for how to consume an SAP RFC with the SAP .Net Connector 3.0 (NCo 3.0).  The article included code samples and a working code example for download written in C#.  Well, not everybody writes in C#.  There are some of you that would prefer to write in VB.NET. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I published an article showing step-by-step instructions for <a title="Build an RFC Client with NCo 3.0 – A Step-By-Step Guide" href="http://www.dataxstream.com/2011/08/nco-3-rfc-client-step-by-step/">how to consume an SAP RFC with the SAP .Net Connector 3.0 (NCo 3.0)</a>.  The article included code samples and a working code example for download written in C#.  Well, not everybody writes in C#.  There are some of you that would prefer to write in VB.NET.  So, I have heeded your call, all you VB.NET developers!  Here is your very own article detailing how to build an RFC client with NCo 3.0 for VB.NET.</p>
<p>The SAP .Net Connector 3.0 (NCo 3.0) offers many improvements over SAP .NET Connector 2.0. Unfortunately, SAP no longer offers example .NET code.  This blog attempts to fill that gap by describing how to build a simple RFC Client using SAP .Net Connector (NCo) 3.0 with VB.NET.  <a href="http://www.dataxstream.com/sap-nco-3-0-rfc-client-code-sample-for-visual-basic/" target="_blank">Click here</a> to request a .zip file containing a copy of the source code.</p>
<p><span id="more-9772"></span>The sample program displays details about companies defined by SAP. There are two BAPI calls involved, BAPI_COMPANY_GETLIST and BAPI_COMPANY_GETDETAIL.<br />
Along with the SAP .Net Connector 3.0, we are using Microsoft Visual Studio 2010 and the Microsoft .Net Framework 4.0 to build our sample.  Prior to starting, you will have to download and install <a href="http://service.sap.com/connectors" target="_blank">NCo 3.0</a> (OSS login required).<br />
<img title="More..." src="http://www.dataxstream.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<h2>Setting up the Project</h2>
<p>Using Visual Studio 2010, create a new Windows Form project. In the project properties, be sure to set the Target Framework to .Net Framework 4.0.  To change the target .NET framework version on a VB.NET project, first open the project&#8217;s property page.  Click on the &#8220;Compile&#8221; tab in the property page.  Then click on the &#8220;Advanced Compile Options..&#8221; button.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_01.png" rel="shadowbox[sbpost-9772];player=img;"><img class="alignnone size-full wp-image-9773" title="Change .NET Framework Target Version" src="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_01.png" alt="" width="645" height="311" /></a></p>
<p>In the ensuing dialog window, change the target framework version.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_02.png" rel="shadowbox[sbpost-9772];player=img;"><img class="alignnone size-full wp-image-9774" title="Change .NET Framework Target Version (No Client Profile)" src="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_02.png" alt="" width="520" height="423" /></a></p>
<p>Next, add references to the SAP .Net Connector 3.0. There are two DLLs, sapnco.dll and sapnco_utils.dll.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_03.png" rel="shadowbox[sbpost-9772];player=img;"><img class="alignnone size-full wp-image-9775" title="Add Reference to NCo 3.0" src="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_03.png" alt="" width="315" height="225" /></a></p>
<p>&nbsp;</p>
<h2>Design the Form</h2>
<p>Add two controls to the form. The first is a List Box, which will contain the list of available SAP companies. The second control to add is a Property Grid control, which is used to display the details of a particular SAP company when the user selects one from the List Box.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_04.png" rel="shadowbox[sbpost-9772];player=img;"><img class="alignnone size-full wp-image-9776" title="Design Windows Form" src="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_04.png" alt="" width="562" height="445" /></a></p>
<p>&nbsp;</p>
<h2>Using App.Config to define the SAP Connections</h2>
<p>There are several methods you can use in your solutions to define a particular SAP host. For this example, we are using an app.config file to define our SAP host.<br />
The SAP .Net Connector 3.0 includes sample app.config files. For the RFC client, be sure there is a sectionGroup definition for &lt;ClientSettings&gt;.<br />
The SAP host is defined by the destinations section. Within the destination, the Name field identifies this app.config entry to our program code. Specify the appropriate user name, password, SAP host name, client and system number in the destination section.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_05.png" rel="shadowbox[sbpost-9772];player=img;"><img class="alignnone size-full wp-image-9777" title="App.config" src="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_05.png" alt="" width="647" height="230" /></a></p>
<h2>The BAPIs</h2>
<p>Use the SAP transaction SE37 to determine the parameters for functions BAPI_COMPANY_GETLIST and BAPI_COMPANY_GETDETAIL. This will tell us what parameters need to be passed in and where to find the results that are returned to our code.</p>
<h2>The Code</h2>
<p>During the form load event, we want to populate our List Box with the defined companies from SAP.</p>
<ol>
<li>Acquire a valid RfcDestination to use. Use method RfcDestinationManager.GetDestination() to do this. GetDestination() requires a parameter to determine which SAP host to refer to. Pass in the Name of the SAP host you previously defined in the app.config file. (Line 39)</li>
<li>Now that we have a valid RfcDestination object, we need access to the SAP Repository. The repository contains information about the BAPI calls we are going to make. The RfcRepository is an attribute of an RfcDestination object. (Line 42)</li>
<li>Using the RfcRepository object, acquire a reference to the SAP BAPI by calling method RfcRepository.CreateFunction() method. Pass in the name of the desired function as a string parameter to CreateFunction(). This method returns an object we can use to setup parameters, invoke the function, and retrieve results.</li>
<li>Now we can make the RFC calls into SAP. Using the IRfcFunction object returned by CreateFunction(), call the Invoke() method, passing in our RfcDestination object as parameter. This will make the RFC call into SAP, and provides the results via our IRfcFunction object. (Line 48)</li>
<li>SAP function BAPI_GET_COMPANYLIST returns a table of company records. We use an instance of an IRfcTable object that we retrieve by calling the GetTable() method on the IRfcFunction object. To get a desired table, pass in the table name to the GetTable() method. (Line 50)</li>
<li>We now have an instance of an IRfcTable object that contains company information through which we can iterate. It is possible to iterate through the data by setting the CurrentIndex property on the returned table. For a particular row in the table, it is possible to access values using the GetString() method. (Lines 55-59)</li>
<li>For each company, get the CompanyNumber, and use that as a parameter to SAP function BAPI_COMPANY_GETDETAIL. BAPI_COMPANY_GETDETAIL returns detailed information about that particular SAP company. The techniques are the same as before, with the additional step of using the SetValue() method on the IRfcFunction object to pass in the company number as a parameter. (Lines 60-67)</li>
<li>BAPI_COMPANY_GETDETAIL returns data as an instance of the IRfcStructure interface. Access individual field data of the company record, using the GetString() method of the IRfcStructure object instance. (Lines 67-78)</li>
<li>Extract the company details as desired. Add them to some object you create and then add that object to the List Box control. (Line 80)</li>
</ol>
<p>&nbsp;</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_06.png" rel="shadowbox[sbpost-9772];player=img;"><img class="alignnone size-full wp-image-9778" title="NCo 3.0 RFC Client Sample VB.NET Code" src="http://www.dataxstream.com/wp-content/uploads/NCO3_Client_VB_06.png" alt="" width="580" height="523" /></a></p>
<p>The rest of the code is regular Windows Forms programming. Your code will need to wire up the List Box changed events so that the Property Grid will display the details of the selected company.</p>
<h2>Additional Information</h2>
<p>Follow these links for more information about NCo 3.0 programming:</p>
<ul>
<li>Webinar: <a href="http://www.dataxstream.com/sap_webinars/sap-nco-3-0-best-practice-guide-for-upgrade-from-net-connector-2-0/">SAP NCo 3.0 – Best Practice Guide for Upgrade from .NET Connector 2.0</a></li>
<li>Source Code: <a href="http://www.dataxstream.com/sap-nco-3-0-rfc-client-code-sample-for-visual-basic/" target="_blank">RFC Client with NCo 3.0 for VB.NET</a></li>
<li>C# version of this example: <a title="Build an RFC Client with NCo 3.0 – A Step-By-Step Guide" href="http://www.dataxstream.com/2011/08/nco-3-rfc-client-step-by-step/" target="_blank">Build an RFC Client with NCo 3.0 &#8211; A Step-By-Step Guide</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/11/nco-3-rfc-client-vb-net-step-by-step/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>It&#8217;s SAP Upgrade Time! Do You Know Where Your Customizations Are? Part 3.</title>
		<link>http://www.dataxstream.com/2011/11/sap-upgrade-and-customizations-3/</link>
		<comments>http://www.dataxstream.com/2011/11/sap-upgrade-and-customizations-3/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 14:15:54 +0000</pubDate>
		<dc:creator>Mike Salvo</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP ABAP Blog]]></category>
		<category><![CDATA[SAP Functional]]></category>
		<category><![CDATA[SAP Project Management]]></category>
		<category><![CDATA[SAP Strategy]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[SAP Testing]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[Mike Salvo]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[sap upgrade]]></category>
		<category><![CDATA[upgrade cost]]></category>
		<category><![CDATA[upgrade risk]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=3141</guid>
		<description><![CDATA[In my final post on this topic, I will discuss some of the techniques that I use to “discover” information about customizations in an SAP system, even in the absence of any documentation.  The information available to be discovered may include such details as the object name, object type, user name of the person who [...]]]></description>
			<content:encoded><![CDATA[<p>In my final post on this topic, I will discuss some of the techniques that I use to “discover” information about customizations in an SAP system, even in the absence of any documentation.  The information available to be discovered may include such details as the object name, object type, user name of the person who made the last modification, date and time of the last modification, usage statistics, where-used, and for code-based objects, even the versions and their code differences.</p>
<p><span id="more-3141"></span></p>
<h3>Discovering Direct Modifications of SAP Standard Objects – One Example</h3>
<p>As I discussed in a previous post on this topic, direct modification of SAP standard objects within the SAP namespace carries a high risk in an upgrade project.  It would be very valuable to be able to identify some details about these objects, so that further analysis could be performed to determine their disposition in the upgrade.</p>
<p>Modification of standard SAP objects typically requires that a modification registration key be obtained for that object from the SAP SSCR facility.   The SSCR facility (SAP Software Change Registration) is a procedure which registers all manual changes to SAP sources and SAP Dictionary Objects.  With a valid and authorized OSS ID for an SAP system, you can go to the SAP Support Portal on the web and view the SAP objects that were registered for modification by that OSS ID.  If there are multiple OSS IDs for any SAP system, make sure that you check all of them to capture all objects registered by all of the authorized OSS IDs for an SAP system.  Press the “Objects Registered by Me” button to view a list of the registered objects.</p>
<p><img class="alignnone" title="SSCR - SAP Software Change Registration" src="http://www.dataxstream.com/wp-content/uploads/2009/11/11.bmp" alt="SSCR - SAP Software Change Registration" width="555" height="411" /></p>
<p>Another place that you can look for this information is directly within SAP.  Table ADIRACCESS stores the registration keys which were obtained from SAP, and which were entered by the developer when the object was to be modified for the very first time.  This entry shown below from table ADIRACCESS shows that function group SCPRPS was registered with SAP for modification.</p>
<p><img class="size-full wp-image-3145 alignnone" title="ADIRACCESS" src="http://www.dataxstream.com/wp-content/uploads/2009/11/21.bmp" alt="ADIRACCESS records" width="554" height="173" /></p>
<p>Registering an object for modification does not mean that the object was actually modified.<br />
What additional evidence can we discover that would show that the object was, in fact, modified?   And, since a function group contains many objects, can we determine exactly which object or objects were modified?</p>
<p>With a little bit of forensic analysis, we can discover the specific object within the function group that was modified, the user name of the programmer who last modified the object, date of the last modification, and the line-by-line source code differences.</p>
<p>If you are familiar with the structure of function groups, you already know that they may contain many function modules, and that the source code for each function module resides within its own include file.  At the moment, we know that the function group name is SCPRPS, but we do not have the list of function modules within that function group.</p>
<p>To obtain that list, we can use the SAP function module FUNCTION_SELECT_TFDIR.<br />
The result list is shown here:</p>
<p><img class="size-full wp-image-3146 alignnone" title="FUGR SCRPRS records" src="http://www.dataxstream.com/wp-content/uploads/2009/11/31.bmp" alt="FUGR SCRPRS records" width="624" height="453" /></p>
<p>So which, if any, of these has been modified?  To determine this, we need to find all of the rows in table TRDIR where the NAME field is equal to the PNAME entries listed above.</p>
<p>Here is an excerpt from SAP table TRDIR for SAP object names that begin with the characters LSCPRPSU:</p>
<p><img class="size-full wp-image-3148 alignnone" title="LSCRPR* objects" src="http://www.dataxstream.com/wp-content/uploads/2009/11/42.bmp" alt="LSCRPR* objects" width="624" height="302" /></p>
<p>Note that for all of these objects, which are not in the customer namespace, the Author Username field (TRDIR_CNAM) is ‘SAP’.  Also note that for most of the entries listed here, the Last Changed By user name field (TRDIR_UNAM) is also ‘SAP’, except for one row, where the Last Changed By username field is not ‘SAP’.  From this row, we can see that include file LSCPRPSU36 was last modified by user DXSDEV on 10/19/2009.</p>
<p>If we look back at the result list of FUNCTION_SELECT_TFDIR and find the row where the field PNAME is equal to LSCPRPSU36, we can see that the name of the modified function module is SCPR_PRSET_CT_IMPORT_INDUSTRY.</p>
<h3>Exactly What Changes Were Implemented?</h3>
<p>By going to the Version Management Utility for this function module, we can see what the various versions of the code contained.  The Version Management Utility will also show us the transport request numbers, date and time, and username for each version of the code.  The Version Management Utility also has a code comparison tool which will highlight the line-by-line differences between versions of the source code.</p>
<p>Here is an excerpt from the side-by-side source code comparison utility which shows the modified version on the left side and the original version on the right side.  Fortunately, in this instance, the programmer left excellent notes indicating that a correction instruction from an OSS note was being applied.</p>
<p><img class="size-full wp-image-3147 alignnone" title="Modified Code" src="http://www.dataxstream.com/wp-content/uploads/2009/11/51.bmp" alt="Modified Code" width="705" height="117" /></p>
<h3>What Are the Discovery Possibilities?</h3>
<p>The manual example described above showed how to discover and analyze customizations that had been applied to a single SAP standard object.  But what if the customizations number in the hundreds or even thousands?  What about all of the customizations that were built entirely within the customer namespace?</p>
<p>It is possible to discover hundreds or even thousands of customizations regardless of which namespace they were developed in.  The key is automation, understanding that this information already resides within SAP waiting to be discovered, and more importantly, understanding the meaning of the discovered information.  I have already developed an ABAP discovery program which will mine, analyze, and report data about the following customized objects:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="319">ABAP Programs</td>
<td valign="top" width="319">Basic IDOCs</td>
</tr>
<tr>
<td valign="top" width="319">Function Modules</td>
<td valign="top" width="319">IDOC Extensions</td>
</tr>
<tr>
<td valign="top" width="319">Function Groups</td>
<td valign="top" width="319">Message Types</td>
</tr>
<tr>
<td valign="top" width="319">Class Definitions</td>
<td valign="top" width="319">Process Types Inbound</td>
</tr>
<tr>
<td valign="top" width="319">BADI Implementations</td>
<td valign="top" width="319">Process Types Outbound</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Domains</td>
<td valign="top" width="319">SAPSCRIPT FORMS</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Data Types</td>
<td valign="top" width="319">Smartforms Forms</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Transparent Tables</td>
<td valign="top" width="319">Smartforms Styles</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Structures</td>
<td valign="top" width="319">Packages</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Views</td>
<td valign="top" width="319">Logical Databases</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Append Structures</td>
<td valign="top" width="319">FICO Client Dependent and Independent Exits</td>
</tr>
<tr>
<td valign="top" width="319">Dictionary Append Fields</td>
<td valign="top" width="319">Message Classes and Messages</td>
</tr>
<tr>
<td valign="top" width="319">Search Helps</td>
<td valign="top" width="319">Number Ranges</td>
</tr>
<tr>
<td valign="top" width="319">CMOD User Exits</td>
<td valign="top" width="319">Authorization Objects</td>
</tr>
<tr>
<td valign="top" width="319">User Exits for the SD Module (MV45AF*)</td>
<td valign="top" width="319">Authorization Fields</td>
</tr>
<tr>
<td valign="top" width="319">Requirements Definitions (transaction VOFM)</td>
<td valign="top" width="319">SPA/GPA Parameters</td>
</tr>
</tbody>
</table>
<hr />
<h2>More Discovery – Usage Statistics and Where-Used</h2>
<h3>Customization Usage Statistics</h3>
<p>The goal of customization usage statistics analysis is to discover the usage frequency of customized objects.  The usage discovery may show usage anywhere from several times daily by key users, to none when analyzed over a long time period.   Since most companies really do not want to incur the cost and the risk of moving an unneeded customization into the upgrade system, objects which show no usage over long periods of usage history become targets.  Care must be used here, as some transactions are exercised only quarterly, semi-annually, or annually.  I always recommend letting the business process owner make the final decision to eliminate any customization object in the upgrade.</p>
<p>SAP keeps track of usage statistics, and this data is available for you to analyze.  You will need to check what facility is available for your particular SAP system, as the transaction codes and programs differ among various versions of SAP.   The amount of data stored within SAP is configurable, and is usually set to a small date range.  Some companies that want to analyze the statistics over longer time periods actually download and store the statistics data in their own external databases.</p>
<h3>Customization Where-Used</h3>
<p>Like usage statistics, the goal of customization where-used analysis is to discover customized objects that are orphan or not being used.  What about that custom data type that is not used in any table or structure?  What about that function module that shows an empty list when you click the where-used icon in the function builder?</p>
<p>To properly perform a where-used analysis, it is important to understand all of the various possible uses for an ABAP object.  For example, here is the selection screen of possible uses that is presented by the ABAP Dictionary when you click the where-used icon to determine the where-used list for a data table:</p>
<p><img class="size-full wp-image-3149 alignnone" title="Where-Used" src="http://www.dataxstream.com/wp-content/uploads/2009/11/61.bmp" alt="Where-Used" width="260" height="484" /></p>
<p>And what about that custom function module, which I alluded to earlier, which shows a completely empty where-used list?  Perhaps it is a remote-enabled function module that was installed by, and is currently being called by an external third-party package.   Or, perhaps it is linked to an SAP EDI inbound or outbound process code.  It is really important to be able to properly interpret the data being presented and to not draw any hasty conclusions.</p>
<h3>ABAP Programs Where-Used Analysis Example</h3>
<p>In the ABAP workbench, SAP provides a where-used facility, which reports the various areas where a single selected object is used.  For a discovery project, you may want to automate this facility to analyze groups of ABAP objects (e.g. all custom ABAP programs, all custom tables, etc.).</p>
<p>Here is an ABAP programs where-used analysis example to help illustrate how a where-used analysis might be utilized.</p>
<p>Your automated where-used analysis program to analyze custom ABAP programs reports fifteen custom programs which show no usage in any of the following areas:</p>
<p><img class="size-full wp-image-3150 alignnone" title="Where-Used ABAP Program" src="http://www.dataxstream.com/wp-content/uploads/2009/11/72.bmp" alt="Where-Used ABAP Program" width="287" height="234" /></p>
<p>A quick analysis shows that all of these fifteen programs are simple reports.  Since users typically execute their reports via transaction codes, you wonder how these fifteen programs could ever possibly be executed without transaction codes.</p>
<p>You further analyze the SAP job scheduler data as far back as possible and find that only ten of these ABAP programs were ever scheduled in a batch job.  Some of these were scheduled very recently, and some have not been scheduled for a long time (another thread of evidence that we will need to pursue).  This leaves five ABAP programs with no apparent means of being executed.</p>
<p>As further evidence, you perform a cross-check against the usage statistics report and find that two of these five ABAP programs show no usage.</p>
<p>Armed with this analysis, you are now ready to meet with the business process owners to discuss the disposition of the objects on your short list.</p>
<p>A salient point here is that you will need to gather your evidence from several different analysis sources to help paint the most accurate picture about the possible disposition of customized objects.</p>
<h2>Summary</h2>
<p>Throughout all three parts of this post, I have stressed that customizations, while necessary, add risk and cost to an upgrade project.  And customizations that are not necessary or built poorly without the constraints of best-practice controls can add high levels of risk and cost.  Here are some general guidelines to follow:</p>
<p>Many companies and their auditors consider a well-controlled and secure ERP system to be a fundamental component that is vital to the success of the business.   They recognize that an out-of-control ERP system can easily paralyze a company for extended periods of time.  With this in mind, implement and enforce best-practice controls and standards to make sure that future customizations are reviewed, approved, built, tested, documented, and implemented properly.  This may already be an internal or external audit requirement, so check with your inside and outside auditors to make sure that your controls meet the auditing requirements.</p>
<p>Periodically review, audit, and amend your best-practice controls to make sure that they are still effective in supporting the needs of the business; and that both internal staff and external consultants are in compliance of these controls.</p>
<p>Know your customizations.  Know where they are, why they are, and what they do.  Whenever feasible, it is most efficient to eliminate ABAP object customizations, especially any that were performed within the SAP namespace, and any that are not really needed because they can be implemented within standard SAP.</p>
<p>The degree of risk and cost depends on the specific type of customization that was performed.  Establish a formal review board to own the customization approval process.  Understand that approving a customization also means approving the risk and the cost burdens.  Some companies consider this to be so significant, that they include a high-level business executive as a default member of the review board.</p>
<p>Set and enforce a policy making ABAP object customization the last resort, only after all other options have been thoroughly researched and exhausted.  Here are some examples:</p>
<ol>
<li>Research forums, blogs, become active in user groups, etc. to see how other companies might also be implementing the business function that you require.</li>
<li>Find and use customer and user exits instead of directly modifying objects in the SAP namespace.</li>
<li>Determine, for example, how to implement and maintain that complex pricing procedure using the pricing condition tables instead of writing custom code and building custom tables.</li>
</ol>
<p><strong>Share Your Experience</strong>.</p>
<p>Once again, I look forward to hearing from our readers to reply to this post with their own experience with customizations, best-practice standard and policies, and success stories illustrating how your company transitioned to best-practice controls.</p>
<p style="padding-left: 30px; padding-right: 30px;"><em>[Editor's Note] This blog is third of a multi-part series:</em></p>
<ol>
<li><a href="http://www.dataxstream.com/2009/11/sap-upgrade-and-customizations-1/">Part 1</a></li>
<li><a href="http://www.dataxstream.com/2009/11/sap-upgrade-and-customizations-2/">Part 2</a></li>
<li><a href="http://www.dataxstream.com/2009/11/sap-upgrade-and-customizations-3/">Part 3</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/11/sap-upgrade-and-customizations-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s SAP Upgrade Time!  Do You Know Where Your Customizations Are?  Part 2.</title>
		<link>http://www.dataxstream.com/2011/11/sap-upgrade-and-customizations-2/</link>
		<comments>http://www.dataxstream.com/2011/11/sap-upgrade-and-customizations-2/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 14:15:43 +0000</pubDate>
		<dc:creator>Mike Salvo</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP ABAP Blog]]></category>
		<category><![CDATA[SAP Upgrade Blog]]></category>
		<category><![CDATA[ABAP]]></category>
		<category><![CDATA[ABAP Code Objects]]></category>
		<category><![CDATA[ABAP development]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[Mike Salvo]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[sap upgrade]]></category>
		<category><![CDATA[Upgrade]]></category>
		<category><![CDATA[upgrade cost]]></category>
		<category><![CDATA[upgrade risk]]></category>
		<category><![CDATA[upgrade tips]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=2983</guid>
		<description><![CDATA[In my last post on this topic, I discussed two negative effects of customizations in an upgrade project – risk and cost.  I also discussed an obvious reason to eliminate unnecessary customization – the mitigation of risk and cost. In this post, we will look at some of the customization areas which add risk and [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.dataxstream.com/2009/11/sap-upgrade-and-customizations-1/">last post</a> on this topic, I discussed two negative effects of customizations in an upgrade project – risk and cost.  I also discussed an obvious reason to eliminate unnecessary customization – the mitigation of risk and cost.</p>
<p>In this post, we will look at <em><span style="text-decoration: underline;">some</span></em> of the customization areas which add risk and the cost to an upgrade project.</p>
<p><span id="more-2983"></span></p>
<h3>1. Direct Modifications to SAP Standard Objects</h3>
<p>Direct modifications to SAP standard objects bear the highest risk.  During the upgrade, these modifications will be lose&#8211;either because they will be overwritten by their respective upgraded SAP standard objects; or because these objects no longer exist and are not used by standard SAP in the upgrade system.</p>
<p><strong> <span style="font-weight: normal; background-color: #ffffff;">Typically, there are two reasons for performing direct modifications to SAP standard objects:</span></strong></p>
<ol>
<li>The application of authorized individual OSS corrections to fix problems.</li>
<li>Direct customer modification to provide business process enhancements.</li>
</ol>
<h4 style="padding-left: 30px;">1.1. Application of Individual OSS Corrections and Support Packs</h4>
<p style="padding-left: 30px;">Individual OSS corrections are patches supplied by SAP to fix recognized problems with SAP objects.  Sometimes, individual OSS correction instructions are included and delivered within a specific level of support packs.   That means that applying support packs to the specified level will apply the desired correction, and manual intervention is not needed.  Sometimes OSS correction instructions are not yet included in any specific level of support packs, and these will need to be applied either manually or with the SAP Note Assistant.</p>
<p style="padding-left: 30px;">It is important to carefully analyze the validity range of an OSS note to determine both how it was applied in the legacy system, and how it is to be applied in the upgrade system.  This analysis will help determine how far to patch the upgrade system to make sure that the desired corrections are included in the upgrade system.   Any needed correction that exists at a patch level beyond the highest patch level in the upgrade system will need to be addressed  manually or with the SAP Note Assistant.</p>
<p style="padding-left: 30px;">The decision of which support pack levels should be applied to the upgrade system must be made carefully.  One approach is to apply the highest level of support packs that are available.    The rationale for applying the latest available support packs is to insure that the most recent problem fixes are applied to the upgrade system.  This is a two-edged sword, as the most recent  support packs may also introduce other problems into the upgrade system.</p>
<h4 style="padding-left: 30px;">1.2. Direct Customer Modification of SAP Standard Objects to Provide Business Process Enhancements</h4>
<p style="padding-left: 30px;">Direct modifications of SAP standard objects to provide enhancements are most costly and bear the highest level of risk.  While direct modifications of SAP standard objects may have been technically expedient at the time of implementing the enhancement, they will always require additional work effort and analysis at upgrade time to determine:</p>
<ol>
<li>Whether or not the functionality provided by the enhancement is still required by the business.</li>
<li>Whether or not the functionality provided by the enhancement is already included in the upgrade system as standard SAP.  You will need the help of functional subject matter experts here.</li>
<li>Whether or not the modified SAP object still exists in the upgrade system.</li>
<li>How to move these required enhancements into the customer namespace, using the SAP preferred enhancement procedures.  Moving these types of enhancements to the customer namespace also moves them from the very costly and highest risk category to a lower cost and lower risk category.</li>
</ol>
<h3>2. Custom Interfaces</h3>
<p>Custom interfaces are loaded with opportunity for high upgrade risk.  Take, for example, the SAP standard IDOC Basic Type, which was copied as the baseline for an enhanced customized basic type containing additional custom segments and fields.  In the upgrade system, a new version of this SAP standard IDOC Basic Type may now contain additional segments and fields.</p>
<p>Likewise, the associated standard processing module for that standard basic type, which was copied as the baseline for an enhanced processing module to handle the custom segments and fields of the enhanced custom basic type, may also have changed in the upgrade to accommodate the new standard IDOC version.</p>
<p>So, in the upgrade system, especially if you need to implement the new upgrade IDOC version, it may be necessary to start with the new standard basic type and standard processing module, and reapply the customizations.</p>
<h3>3. ABAP Code Objects</h3>
<p>Of all customized objects discovered in most SAP systems, ABAP Code objects are the most numerous.  These objects include classes, methods, function modules, report programs, dialog programs, and include files which support the all of the other ABAP object types.</p>
<p>At greatest risk are the SAP standard ABAP code objects which were modified directly in the SAP namespace; and those that were copied into the customer namespace and subsequently modified.<strong> </strong>This is because the standard SAP code objects may have changed in the upgrade.    These changes can range anywhere from simple error corrections to complete process and code redesigns.  In these instances, each modified object must be compared to its counterpart in the upgrade system to determine its existence, and the nature and extent of what might have changed.   If the customization is still needed in the upgrade system, and to stay current with the enhanced standard code, it is probably best to start with the upgrade standard code and reapply the customizations.</p>
<p>ABAP code objects that were developed entirely in the customer namespace (not copied from standard SAP code) are usually low on the risk ladder.  Problems occur when data selected by these objects has moved elsewhere or behaves differently in the upgrade system, when ABAP constructs used are now obsolete in the upgrade system, or when standard called functions are changed in the upgrade system.</p>
<p>Ultimately, the business must decide why SAP standard code was directly modified, why SAP standard code was copied into the customer namespace and modified, why custom code was developed entirely within the customer namespace, whether or not any of these modifications are needed, and how they might be implemented differently in the upgrade system.  This evaluation presents another opportunity to remove some rocks from the customization rock bag.</p>
<h3>4. Automated Standard SAP Transactions</h3>
<p>Custom ABAP programs which automate standard SAP transactions bear an above-average risk.  This is because the behavior of some SAP transactions may have changed in the upgrade.  These changes can be manifest in the functional performance of the transaction, the technical location and existence of data fields on screens, screen field properties, IMG configuration specific to the transaction, the transaction code associated with the transaction, or even the existence of the transaction or an equivalent in the upgrade system.  The nature and the extent of the changes to the transaction in the upgrade system will determine the amount of effort needed to automate it.</p>
<p>Also, if an “old” SAP transaction has been replaced by a “new” upgraded equivalent, it is usually wise to make the change to the new transaction at upgrade time.  At some point in the future, the “old” version of the transaction will become obsolete and no longer useable or supported.</p>
<h3>5. Data Dictionary Customizations</h3>
<p>Many customizing projects within SAP require the storage and manipulation of data that is not included in the standard SAP dictionary.   One way in which these requirements can be addressed is by building complete custom transparent tables and data structures.  Another way is by adding append structures and append fields to existing standard SAP tables.  With either approach, it is always an excellent idea to evaluate the need to move these customizations into the upgrade; and another opportunity to lighten the customizing bag of rocks.</p>
<h3>6. Customer and User Exits</h3>
<p>Customer and user exits are provided by SAP as the SAP-approved mechanism for enhancing standard functionality.  Enhancements performed within these boundaries are guaranteed by SAP to bear low technical risk in an upgrade situation.  While SAP guarantees that the custom code will arrive technically intact in the upgrade system, functional analysis must still be performed to determine the continued need for the enhancement in the upgrade system.</p>
<p>Any enhancement implemented in a customer or user exit that is either functionally covered or determined to be unnecessary in the standard upgrade system should be retired.  This is consistent with the goal of lightening the load in the bag of rocks.  Since a customer or user exits may implement several different enhancements, take extra care to make sure that only the right code or other objects are retired.</p>
<h3>7. The Environmental Effects &#8211; Operating System Change</h3>
<p>OK, changing the operating system during an upgrade project is not customization of SAP objects.  But it does add risk and cost to the project.</p>
<p>Why?</p>
<p>If the upgrade operating system changes from UNIX to Windows or vice versa, then any ABAP program or interface which reads or writes a data file to an operating system folder must be changed.  The changes needed to these ABAP programs are very narrow in scope,  and reflect the manner in which the operating system specifies its file paths.  Additional BASIS work, such as determining the proper file system authorizations, may also be needed.</p>
<p>Using the SAP logical file name facility can help enormously by removing the need to make changes to hard-coded file names and path names in many different ABAP programs.</p>
<h3>Share Your Experience</h3>
<p>At the top of this post, I stated that I would discuss <span style="text-decoration: underline;">some </span>of the customization areas which add risk and cost to an upgrade project.  I look forward to hearing from our readers to reply to this post with their own experience with customizations, how they were handled, and how this affected an upgrade project.</p>
<p>In my next post on this topic, I will reveal some of the techniques I use to &#8220;discover&#8221; customizations, even in the absence of documentation.</p>
<p style="padding-left: 30px; padding-right: 30px;"><em>[Editor's Note] This blog is the second of a multi-part series:</em></p>
<ol>
<li><a title="It’s SAP Upgrade Time!  Do You Know Where Your Customizations Are?  Part 1." href="http://www.dataxstream.com/2009/11/sap-upgrade-and-customizations-1/">Part 1</a></li>
<li><a href="http://www.dataxstream.com/2009/11/sap-upgrade-and-customizations-2/">Part 2</a></li>
<li>Part 3</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/11/sap-upgrade-and-customizations-2/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>SAP Go-Live Lessons Learned</title>
		<link>http://www.dataxstream.com/2011/09/sap-go-live-lessons-learned/</link>
		<comments>http://www.dataxstream.com/2011/09/sap-go-live-lessons-learned/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 14:15:46 +0000</pubDate>
		<dc:creator>Tim Cooper</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP Project Management]]></category>
		<category><![CDATA[SAP Strategy]]></category>
		<category><![CDATA[SAP Testing]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[SAP ECC 6.0]]></category>
		<category><![CDATA[SAP Integration]]></category>
		<category><![CDATA[SAP testing]]></category>
		<category><![CDATA[Tim Cooper]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=6448</guid>
		<description><![CDATA[In real estate the key factors in making the sale are location, location and location.  In an SAP project I’m coming round to believing that success requires testing, testing and testing. A Short Selective Retrospective on Key Constituencies All project events and project success stem from testing and testing well.  I’ve written about various types [...]]]></description>
			<content:encoded><![CDATA[<h2><span class="Apple-style-span" style="font-size: 13px; font-weight: normal;">In real estate the key factors in making the sale are location, location and location.  In an SAP project I’m coming round to believing that success requires testing, testing and testing.</span></h2>
<h2>A Short Selective Retrospective on Key Constituencies</h2>
<p>All project events and project success stem from testing and testing well.  I’ve written about <a href="http://www.dataxstream.com/2009/10/sap-testing-terminology/">various types of testing</a> before and how that can lead to some confusion because of issues with definitions.  Here I want to discuss some areas where testing really can make or break a project and ideas for how to minimize the chances of things turning out badly.<span id="more-6448"></span></p>
<h2>SAP Testing with Project Team Members</h2>
<p>Unsung heroes abound on SAP projects and your client&#8217;s key business analysts can be fabulous participants or sacks of rocks you have to carry everywhere for no apparent benefit.  Always choose the former or trade up if you discover you got the latter. Engaged business analysts are great when they bring business knowledge, a willingness to learn SAP, insight to the hot-button, day-to-day issues and the understanding that the consulting team may know a lot, but not necessarily everything.  Partnership between consultants and business analysts can be very fruitful at teasing out mainstream, what happens 90% of the time, business scenarios and building coherent test cases.</p>
<p>These key project team members can provide a sanity check when you try to bring prior experiences and findings from other clients to the project.  A crazy design you built on the last project may not be relevant here and your BA can save you from any tendency to over engineer a solution.  Conversely, your BA might be the one who sets you down the path to an unusual design.  Either way, it has to be tested and between you and the BA the bases should be covered.</p>
<p>I’ve found that the BA’s on a project are usually there for one of two reasons: <em>either </em>a motivated high performer with knowledge and credibility; <em>or </em>someone found the SAP project was a place to dump a personnel problem.  Fortunately, the latter is rare these days as more and more people turn into high performers out of necessity.  Consequently, your BA is going to know key areas of process and functionality that must work for the project to be a success and he/she drives you to deliver.  Never be afraid to let a BA talk about the business, what it needs to be able to do and what needs to be tested.</p>
<p>However, the BA probably isn’t going to be using the system as an end user on a day-to-day basis and can only get you so far with the completeness of testing.  This is where you need to branch out from the immediate project team and into the realm of the end user.</p>
<h2>SAP Testing with End Users</h2>
<p>In an ideal world, the systems we build would be foolproof, but there are some smart fools out there and they don’t always behave the way we want them to.  As you probably know, SAP is not the most intuitive system to navigate and use (would an overhaul of the GUI make system adoption quicker and easier?) and people don’t always do what they are told.  I know you are <em>shocked</em> to hear this!</p>
<p>If I had a lot more time on my hands I’d love to watch people using systems and seeing all the various ways people try to do things.  It’s a fairly dopey example, but I’m one of those mouse-and-menu people when I use MS Office.  The ALT, CTL, and SHIFT keys are a tiny part of my repertoire because I learned how to use these products a certain way, but I know some people who do almost everything with keyboard shortcuts.  I can scarcely follow <strong><em>how</em></strong> they do things, although I can see <strong><em>what</em></strong> they are doing.  The fun is seeing different ways to achieve the same end.  SAP is a bit like this in that there are different ways to approach a task: using menu paths; transaction codes; single session; multiple sessions; favorites list entries; and different entry points to get to data.  Unless you have really nailed down tightly how to execute tasks users will eventually find all possible ways, but more importantly, without nailing it down users will find ways to do it wrong and not realize it.  This is a potential disaster in the making.</p>
<p>Despite the best intentions of project team members (business analysts, consultants, trainers, supervisors) end users will use the system in ways you did not anticipate.  After all, the way <span style="text-decoration: underline;"><strong>you</strong></span> use the system works brilliantly, so no one would think to do it any differently, would they?  Except, they do use it differently.</p>
<p>Including a round or two of real end user testing on the QAS system is probably going to be quite revealing.  Ideally, after a dry run conversion and before going live you want to let loose on the system and do some serious day-in-the-life and periodic processing.  And you want to back off on your desire to hand hold.  This way you can see how a user actually uses the system, the steps they take when they get into trouble, and what they try to do as corrective actions.  The intuitive and natural screen flow you came up with?  Perhaps its not as intuitive as you thought.</p>
<p>Here’s the point: carving out time in a project to involve end users in testing is invaluable.  Initially they will stick to the script but after a short time they will extemporize and that is when you find out if you built a robust system that guides people down the desired path or a mess that allows mistakes and the attendant downstream problems.</p>
<p>It is better to take the time before you go live to ensure you don’t get downstream problems than to discover the chaos in production.</p>
<h2>SAP Testing to Make Executives Happy</h2>
<p>A final group of people with a vested interest in SAP project success is the executives.  These are rarely the folks who execute transactions on a daily basis; at best they might run a financial statement or a flash report of some description.  Nonetheless, these people along with departmental heads need to feel confident that the system <em>works</em> in an abstract way: a little like the way you know the engine in your car is working although you don’t really understand how all the various components fit and work together.  You’re pretty upset when the car won’t start, or the heater blows hot and cold intermittently, or you can’t tell if you have an almost empty gas tank.  Similarly executives get upset if they can’t get information that is important to them or they are unable to complete key tasks: for example, flash reports that don’t run or give “funny” numbers, not being able to close an accounting period.</p>
<p>These executives can be especially challenging to a project because they have so many things to worry about that they may only truly pay attention to an SAP project during times of crisis or around go-live.  At earlier times in the project life cycle they may have deferred to the PMO and existing management structure, but at crunch time things change.  Consequently, a conscious effort to find out from them what they need in order to feel comfortable with the system is critical: discovering what they need their organizations to do is critical.  Once you know what they want you can build it into project test plans and activities and show success.</p>
<p>This is one constituency that might be late coming to the party but you can’t ignore them or chastise them for tardiness – they are probably paying the bill!</p>
<h2>Key Ingredients for SAP Success: Testing, Testing &amp; (You Guessed It) Testing</h2>
<p>It is stating the obvious (a core competence of mine) to say that an SAP project is a complicated endeavor.  I’d say there are no easy projects, only less difficult ones and testing is one of the most difficult areas to do well.</p>
<p>There are groups who judge testing success in different ways and with varying degrees of thoroughness.  A corner cut here and there might be acceptable, but too many cut corners and it all unravels.  By identifying key constituencies, identifying their needs, building test plans and strategies to address those needs, and executing against them greatly increases your chances of overall success.  And, if you do it right, you ensure their involvement and make them accountable for the results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/09/sap-go-live-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NCo 3.0: Reconnecting a Broken RFC Server Connection</title>
		<link>http://www.dataxstream.com/2011/09/nco-3-0-reconnecting-a-broken-rfc-server-connection/</link>
		<comments>http://www.dataxstream.com/2011/09/nco-3-0-reconnecting-a-broken-rfc-server-connection/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 14:10:17 +0000</pubDate>
		<dc:creator>Craig Stasila</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[SAP Interface Blog]]></category>
		<category><![CDATA[SAP Technical]]></category>
		<category><![CDATA[.Net Connector]]></category>
		<category><![CDATA[Craig Stasila]]></category>
		<category><![CDATA[DataXstream]]></category>
		<category><![CDATA[NCo]]></category>
		<category><![CDATA[NCo 3.0]]></category>
		<category><![CDATA[RFC Server]]></category>
		<category><![CDATA[SAP .Net Connector]]></category>

		<guid isPermaLink="false">http://www.dataxstream.com/?p=8826</guid>
		<description><![CDATA[Don&#8217;t you hate it when you&#8217;re talking on the cell phone and the call drops?   I was talking to my wife on the way to my client site this week and was telling her about this awesome blog post I was writing when the call dropped.  Bummer.  Since I really wanted to tell her [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t you hate it when you&#8217;re talking on the cell phone and the call drops?   I was talking to my wife on the way to my client site this week and was telling her about this awesome blog post I was writing when the call dropped.  Bummer.  Since I really wanted to tell her about my blog, I wanted to complete the conversation.  But first, I had to wait for service.  Then I had to call her back, and have her answer.  Then I uttered the phrase that all cell phone users know, &#8220;What was the last thing you heard me say?&#8221;  It was a fairly messy recovery, but I was finally able to talk about my blog!</p>
<p>When two software systems integrate, we also have to deal with the &#8220;dropped call&#8221; problem.  SAP NCo 3.0 offers a few different levels of  data recovery options depending on whether NCo is the client or the server.  But before any data recovery can happen, the first step is to call the other party back.  This blog post describes the general process to reconnect an NCo RfcServer to an SAP gateway host.</p>
<p><span id="more-8826"></span></p>
<p>I have read in other blogs that SAP claims their RfcServer object will automatically reconnect if it detects a dropped connection.  While this may be true, I have not seen this automatic reconnection occur in all the testing that I have done.  So, left to my own devices, I set out to figure out the best way to reconnect an RfcServer.</p>
<p>The first thing I did was to map out the &#8220;dropped call&#8221; process diagram.</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/PhoneCall_Reconnect_Flow-e1316637566273.png" rel="shadowbox[sbpost-8826];player=img;"><img class="alignnone size-full wp-image-9212" title="Phone Call Reconnection Flowchart" src="http://www.dataxstream.com/wp-content/uploads/PhoneCall_Reconnect_Flow-e1316637566273.png" alt="" width="534" height="402" /></a></p>
<p>I know that some of you are thinking that after a call is dropped it is not necessary to hang up.  This is true.  But the connection needs to be cleaned up.  In the mobile phone analogy, the phone automatically detects the dropped call and hangs up for you.  What I found during my research is that NCo 3.0 doesn&#8217;t automatically clean up broken connections, nor does it automatically clean up failed connection attemps.</p>
<p>Armed with this flow chart, my new found understanding of NCo 3.0, some Diet Mountain Dew, and a bag of Skittles, I decided to tackle coding a similar solution in C# using NCo 3.0.</p>
<p>But first, I tweaked my flow chart:</p>
<p><a href="http://www.dataxstream.com/wp-content/uploads/RfcServer_Reconnect_Flow.png" rel="shadowbox[sbpost-8826];player=img;"><img class="alignnone size-full wp-image-8829" src="http://www.dataxstream.com/wp-content/uploads/RfcServer_Reconnect_Flow.png" alt="" width="534" height="402" /></a></p>
<p>The result was a RfcServer NCo 3.0 project that would automatically recover from connection errors.  The key concept is to call the <span style="font-family: Consolas, Courier, monospace;">Shutdown()</span> method of the <span style="font-family: Consolas, Courier, monospace;">RfcServer</span> object after each connection failure.  Add in an event handler for the RfcServerError Event and a timer, and the rest falls into place.</p>
<h2>Download RfcServer Reconnection Sample NCo 3.0 Project</h2>
<p>A full sample C# project is available for download here: <a title="SAP NCo 3.0 RFC Server Reconnection Sample" href="http://www.dataxstream.com/sap-nco-3-0-rfc-server-reconnection-sample/">SAP NCo 3.0 RFC Server Reconnection Sample</a></p>
<h2>Additional SAP NCo 3.0 Information</h2>
<p>Follow these links for more information about SAP NCo 3.0 programming:</p>
<ul>
<li><a title="SAP NCo 3.0 – Best Practice Guide for Upgrade from .NET Connector 2.0" href="http://www.dataxstream.com/sap_webinars/sap-nco-3-0-best-practice-guide-for-upgrade-from-net-connector-2-0/">Webinar: SAP NCo 3.0 – Best Practice Guide for Upgrade from .NET Connector 2.</a></li>
<li><a title="Build an RFC Client with NCo 3.0 – A Step-By-Step Guide" href="http://www.dataxstream.com/2011/08/nco-3-rfc-client-step-by-step/">Build an RFC Client with NCo 3.0 – A Step-By-Step Guide</a></li>
<li><a title="Build an RFC Server with NCo 3.0 – A Step-By-Step Guide" href="http://www.dataxstream.com/2011/08/nco-3-rfc-server-step-by-step/">Build an RFC Server with NCo 3.0 – A Step-By-Step Guide</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dataxstream.com/2011/09/nco-3-0-reconnecting-a-broken-rfc-server-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

