Professional Documents
Culture Documents
1.
INTRODUCTION ................................................................................................ 4
2.
3.
4.
5.
6.
CONCLUSION ................................................................................................. 38
1.
INTRODUCTION
Large enterprises consist of multiple small entities such as subsidiaries, branches, locations, and
departments. In often cases, those smaller entities have either different business processes or totally
different activities and business models. Most large corporations have implemented a financial
solution such as SAP or Oracle (Tier 1 solutions) as their ERP backbone to run most operations.
However, some of the local entities are too small to operate with the Tier 1 solutions due to
complexity or budget constraints for the cost of implementation. Microsoft Dynamics AX offers a
great alternative to those local entities by focusing on delivering flexible industry solutions that are
easy to implement, and simple to use for maximum user adoption with minimal training. Microsoft
Dynamics ERP two-tier connector allows Microsoft Dynamics AX to be implemented in subsidiaries to
lower costs and increase productivity while remain connected to the corporate headquarters financial
system.
The Microsoft Dynamics ERP Two-Tier Connector for SAP allows Microsoft Dynamics AX to
exchange information with SAP Business Suite 6 (SAP) to facilitate collaboration across sites or
departments by streamlining business processes going through different systems.
This document will describe the Regional Distribution scenario about the integration of intercompany
procurement and supply-chain processes between local and regional distribution with centralized
fulfillment organizations. In this scenario, the local company will source its items/products from other
entity running on SAP. The request will be transferred to SAP and supply chain processes will
execute and then update in both environments so users do not have to navigate through multiple user
interfaces (UI) to track status of this sourcing and delivery process.
1.1
BUSINESS TRANSACTIONS
The parent company sells products to the sales office. The basic elements of this order-to-stock
transaction between sales office and parent are shown in the figure below.
In this scenario, the SAP parent and Microsoft Dynamics AX sales office essentially have a vendorcustomer relationship. Information is exchanged, goods are shipped and cash is collected.
2.
The business transactions described above depend on system settings and master data. The system
settings form the organizational and technical structure, and the master data is the basis for content
in the business transactions. This section describes the system settings for both SAP and Microsoft
Dynamics AX concerning the integration of their processes.
2.1
SAP CUSTOMIZATIONS
In SAP, configuring the system is called customizing. This functionality provides all the means to
configure the system and make it fit to an organization and its business processes. In other words,
the customization does not concern operational data, but rather, the business structure and business
process definition. Customizing in SAP is done in the Implementation Management Guide (IMG) and
has a tree-like structure. Screenshots of the relevant areas in this structure have been included in the
text below.
2.1.1 CUSTOMIZING THE ORGANIZATIONAL STRUCTURE IN SAP
A standard SAP IDES environment has been customized to incorporate the Microsoft Dynamics AX
sales office on an operational and financial level. This paragraph describes the elements that have
been customized to create the scenario.
SAP Transaction: SPRO
SAP Implementation guide: Enterprise Structure- Definition
IMG Area
Activity
Description
Financial Accounting
Define division 00
Materials Management
Logistics Execution
Logistics- General
Activity
Description
Financial Accounting
Controlling
Logistics- General
The sales order confirmation, delivery note and the sales invoice used in the scenario are standard
SAP IDOCs. There are no modifications in the way the documents are generated as the scenario is
based on standard SAP functionality. All the parameters described below are available in a standard
SAP IDES environment.
The first step for sending a sales order confirmation is the Output Type definition for the sales order.
Output type BA00 is the standard type for sales order confirmation and can be accessed in the path
SAP Customizing Implementation Guide> Sales and Distribution> Basic Functions> Output Control>
Output Determination> Output Determination Using the Condition Technique> Maintain Output
Determination for Sales Activities> Maintain Output Determination for Sales Documents> Maintain
Output Types. The delivery note output type LD00 is the standard type for delivery confirmation which
along with sales invoice is set up in the same way, but has output type RD00.
SAP Customizing path for Maintain Output Types.
The output type does not define one single medium used for creating the output. SAP allows various
methods to output a sales order confirmation such as printer, fax, EDI. Medium four allows us to
send IDOC messages and will be explained in the next step.
In the second step, the system can link the output type and specific medium to a business partner.
This is useful because you might deal with some business partners who want to have paper forms
while others prefer electronic messages. The condition record created below shows that sales order
confirmations for business partner CEU are created using medium 4, which means ALE distribution
model is used to create an IDOC as soon as the sales order has been saved in the SAP system. This
is not part of the customization but is closer to transactional/master data and thus accessed in the
standard SAP user menu as transaction NACE.
An actual sales order document (transaction VA03 display) contains the reference to the output
type and shows the status of this output (whether it is paper or otherwise). The log for the sales order
show that output type BA00 (order confirmation) has been created in the form of an IDOC message
that has been forwarded for transmission.
At this point, we turn to the configuration of the IDOC subsystem where partner profiles are created
for every business partner, with which the system needs to exchange electronic messages. Partner
profiles are accessed using transaction WE20.
The sales office is represented as a standard customer. A corresponding partner profile has been
created to define that the system will allow the following types of IDOC messages to be sent to this
particular business partner (outbound parameters):
Sales Order Confirmation
OR
Standard Order
BA00
V10000
ORDRSP
ORDERS05
Order Confirmation
Order Output
Purchase order / order confirmation
Purchasing/Sales
As indicated earlier, the sales order confirmation will only reach the sales office if the parent company
cannot meet the requirements of the purchase order sent by the sales office.
Sales Invoices
8
Billing Type
Output type
Output Determination
Procedure
Message Type
Basic Type
2.1.3
F2
Invoice
RD00
V10000
Invoice
Billing Output
INVOIC
INVOIC01
Invoice/Billing Document
Invoice/Billing document
The advanced shipping notification IDOC is customized in the same way as the sales documents
described above. The output type for this message is LD00 and is created and sent after the delivery
is created using VL01N in the system.
2.2
Besides the customizing described above, the SAP environment needs master data to process the
business transactions. The following paragraphs describe the master data needed to set up business
process integration.
2.2.1
CEU
In an all-SAP solution where both parent and sales offices operate within a SAP landscape, the
sales offices would be separate plants and/or sales organizations depending on whether they carried
inventory or not. This setting would make it possible to register the individual sales activities of every
sales office. However, the intercompany procurement and supply chain process scenario demands
another approach where end-customer sales are registered at the parent company as monthly net
figures provided by the sales office. The replenishment of stock at a sales office takes place in a
vendor-customer relationship. This allows the parent company to capture its intra-company sales and
isolate it for financial consolidation purposes at a later stage. In order to create this scenario, the
sales office is set up as a standard customer master record in the SAP system. This customer master
is referenced when creating sales orders for the sales office. For this scenario, customer master
record CEU has been created using transaction XD01.
2.2.2
Company code
CEU
Sales offices are set up as company codes in order to create financial postings for the consolidation
at the end of the month. Company code CEU has been created for this purpose in the same way as
the company code CUS for the parent company.
000000000000000001
000000000000000012
000000000000000015
000000000000000016
000000000000000017
000000000000000018
000000000000000019
2.3
INT
The organizational structure in a Microsoft Dynamics AX sales office is simple. There is a company
definition with an area of activity represented by a division. This division sells to end-customers in this
scenario and generates sales revenues which, at a later stage, are consolidated in SAP.
The next paragraph provides the Microsoft Dynamics AX setup steps for the scenario. The setup is
based on the .xpo file bundled with this document.
NOTE: The other values can be used as placeholders to attach actions to them.
The following is an additional setup step:
o In the Accounts payable parameters form, select Copy all dollar values from
incoming AIF file field to ensure the sales prices, discounts and total line amounts are
copied from the incoming AIF file.
Corporate ERP field is a non-editable field (enum) and can only be changed by an AIF
incoming document. It stores the status of the purchase order relative to the sales order in
SAP.
External Sales Order ID field is a non-editable field and can only be changed by an AIF
incoming document. This field stores the created SalesOrderId from SAP.
Last External Invoice field is a non-editable field and can only be changed by an AIF
incoming document. This field stores the InvoiceId of the created SalesOrderId from SAP.
This field is available in the Posting tab of Purchase order form.
Last External Invoice Date field is a non-editable field. Microsoft Dynamics AX will set the
current date when the Last External Invoice is set. This Last External Invoice Date field is
available in the Posting tab of Purchase order form.
12
The Send electronically button has been added to the Purchase order form to send the purchase
order as an XML message to the Gateway queue.
The following graphic shows the Purchase order form with the Send electronically button in the
header.
The following shows the window when the Send electronically button is selected.
3.
For this scenario, the Item Master and its inter-company price only are interfaced with Microsoft
Dynamics AX.
13
3.1
A partner profile should be created in SAP system which introduces a logical system to exchange
IDOCs. In this scenario, the logical system is the Microsoft BizTalk server which is the logical
destination of the outbound IDOCs.
The outbound IDOCs can be setup with the following procedures in the URL.
http://msdn.microsoft.com/en-us/library/ms942196(BTS.10).aspx
There is no business trigger for the distribution of master data; this is done manually using standard
SAP transactions.
The MATMAS is sent through the navigation: ALE> Master Data Distribution> Cross Application>
Material or transaction BD10 (Send Material)
4.
The BizTalk is used in the Microsoft Dynamics ERP Two-Tier Connector scenario as an integration
broker between SAP and Microsoft Dynamics AX. The communication between SAP and BizTalk is
carried out by IDOCs (SAP standard interfacing documents) and BAPIs (SAP Business Objects). The
following displays the communication between SAP, BizTalk, and Microsoft Dynamics AX.
14
4.1
4.2
INTERFACES
The interfaces for the Microsoft Dynamics ERP Two-Tier Connector are summarized below:
Interface
1. Materials (IDOC MATMAS05)
2. Customers (IDOC DEBMAS03)
3. Purchase Order (BAPI_CREATESALESORDER_FROMDAT2)
4. Shipment Notification (IDOC DELVRY06)
5. Invoice (IDOC INVOIC02)
6. Sales Order Confirmation (IDOC ORDERS05)
Source
SAP
SAP
Microsoft Dynamics AX
SAP
SAP
SAP
Destination
Microsoft Dynamics AX
Microsoft Dynamics AX
SAP
Microsoft Dynamics AX
Microsoft Dynamics AX
Microsoft Dynamics AX
15
4.3
SETTING UP BIZTALK
This section discusses the steps for setting up BizTalk for this Regional Distribution Scenario. The
steps will focus on the specific configurations related to this scenario rather than the standard setup.
The following are the steps initial steps for setting up BizTalk.
Step 1: Install BizTalk Server
Step 2: Add BizTalk Adapter Pack 2.0 on the Existing BizTalk 2009 Installation
Step 3: Install Microsoft Dynamics AX Adapter on BizTalk Server 2009 Server
The purchase order is created in Microsoft Dynamics AX and Sent electronically is selected
on the form.
This will place an XML message of the purchase order in Microsoft Dynamics AX Queue.
The BizTalk process uses the Microsoft Dynamics AX adapter and should pick up the
message from Microsoft Dynamics AX Queue by leveraging a BizTalk map.
The message is converted to a SAP sales order XML message. To place a sales order into
SAP, this paper uses a SAP RFC call, BAPI_SALESORDER_CREATEFROMDAT2. From
the BizTalk project (within the Visual Studio project), the message schema of this BAPI can
be exposed by using the SAP Adapter pack. This will also provide the SAP Port binding
which sends and receive requests to SAP.
Purpose
BAPI_SALESORDER_CREATEFROMDAT2
PurchaseOrderService_PurchaseOrder
Please note the tRfc schema is used to call the RFC in Transactional mode. In this case, a unique ID
(transaction ID) is sent after the RFC call to commit the transaction. Otherwise, SAP will not create a
sales order. In return, SAP will send a confirmation of committing the transaction so the process
ensures a transaction is committed. The following are the minimum requirements for fields in the
XML message for calling this RFC.
ORDER_HEADER_IN
DOC_TYPE
SALES_ORG
TA
The SAP sales
organization
DISTR_CHAN
DIVISION
16
REQ_DATE_H
PURCH_DATE
PURCH_NO_C
CURRENCY
ORDER_ITEMS_IN
MATERIAL
PLANT
TARGET_QTY
TARGET_QU
ORDER_PARTNERS
PARTN_ROLE
PARTN_NUMB
The following is a sample of the XML.
<BAPI_SALESORDER_CREATEFROMDAT2
xmlns="http://Microsoft.LobServices.Sap/2007/03/Rfc/">
<ORDER_HEADER_IN>
<DOC_TYPE
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">TA</DOC_TYPE>
<SALES_ORG
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">BP01</SALES_OR
G>
<DISTR_CHAN
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">01</DISTR_CHAN
>
<DIVISION
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">01</DIVISION>
<REQ_DATE_H
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">20100729</REQ_
DATE_H>
<PURCH_DATE
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">20100722</PURC
H_DATE>
<PURCH_NO_C
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">123456</PURCH_
NO_C>
<CURRENCY
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">USD</CURRENCY>
</ORDER_HEADER_IN>
<ORDER_ITEMS_IN>
<BAPISDITM
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">
<MATERIAL>000000000000000001</MATERIAL>
<PLANT>BP01</PLANT>
<TARGET_QTY>1</TARGET_QTY>
<TARGET_QU>EA</TARGET_QU>
</BAPISDITM>
</ORDER_ITEMS_IN>
<ORDER_PARTNERS>
<BAPIPARNR
xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/">
<PARTN_ROLE>WE</PARTN_ROLE>
<PARTN_NUMB>0000100000</PARTN_NUMB>
17
</BAPIPARNR>
</ORDER_PARTNERS>
<RETURN/>
</BAPI_SALESORDER_CREATEFROMDAT2>
xmlPO is the original Microsoft Dynamics AX purchase order that was received from the Queue. To
update AIFPurchStatus field in this message, an approach such as custom .NET assembly that can
traverse this element in the XML can be used. The following is the orchestration implemented for this
paper:
18
This figure displays the first part of orchestration where it reads a purchase order asynchronously
from Microsoft Dynamics AX Queue and creates a new or a return sales order by calling
corresponding maps.
19
This figure displays the other part of the orchestration where the
BAPI_SALESORDER_CREATEFROMDAT2 TRfc transaction is called to create a sales order and
commits the transaction by sending the GUID.
20
This figure displays the last step in the orchestration where the purchase order status in the XML
message is updated and a synchronous action (update) is called to update the purchase order in the
Microsoft Dynamics AX.
4.3.5 SALES ORDER CONFIRMATION
After a sales order is confirmed in SAP, a sales order confirmation should be sent to Microsoft
Dynamics AX. At a minimum, this confirmation should include a sales order ID for the corresponding
purchase order created in Microsoft Dynamics AX and should be used to update the status of
purchaser order in AX. In addition, the status should be updated when a delivery is processed and
when an invoice is issued.
The SAP IDOCs should be setup to receive sales order confirmations, pre-delivery notifications and
invoices. The Partner Profile describes how to configure an endpoint in SAP so the IDOCs are sent
automatically to the BizTalk port for each of the processes mentioned. The following table displays
the list of IDOCs for each process. (NOTE: Please check for the current version available for each
IDOC operation.)
Operation
IDOC Name
http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/ORDERS05//700
Pre-Delivery Notification
Invoice
http://Microsoft.LobServices.Sap/2007/03/Idoc/3/DELVRY06//700/Receive
http://Microsoft.LobServices.Sap/2007/03/Idoc/3/INVOIC02//700/Receive
4.3.6
21
All processes relevant to receive IDOCs from SAP are included in the EDI.Scn1 Solutions folder.
Other processes are included in the Scn1 Solution folder. The following displays the EDI.Scn1
folder.
Invoice
22
23
In the Consume Adapter Service dialog box, click the Connect button to connect the adapter to
SAP.
9. Select Service (Inbound operations) from the Select contract type picklist list. The Select a
category list will be refreshed with IDOC, RFC and TRFC nodes.
a. Navigate to "MATMAS>MATMAS05>MATMAS05.V3(700)
b. Receive should appear in Available Categories and Operations:
c. Click Receive
d. Select Add
10. Check the Generate Unique schema types checkbox and provide any filename prefix for the
IDOCs and click OK. (This will generate the Schemas needed to receive the Sales Order
Confirmation and a binding metadata. We can use the binding metadata file to configure the SAP
receive port where the IDOCs are sent electronically to BizTalk.)
11. Repeat the previous steps to generate the schemas for Delivery Notification and Invoice IDOCs.
which is used from both EDI.Scn1 projects as well as Scn1 projects. The assembly source code is
under the Common Solution.
26
4.3.12 ORCHESTRATION
The EDI Orchestrations are basically receiving IDOCs, sending IDOCs, and receiving confirmations in
the SAP environment.
27
Response = TempXMLData;
Response(WCF.Action)=
"http://Microsoft.LobServices.Sap/2007/03/Idoc/3/ORDERS05//700/Receive/res
ponse";
The same approach is used for the other two IDOCs which update the pre-delivery notification,
invoice status, and IDs in the Microsoft Dynamics AX purchase order.
4.3.13 DEPLOYING FOR REGIONAL DISTRIBUTION SCENARIO
In this paper, a shared assembly has been created in Visual Studio which contains the internal
Schema POSO. This schema is used in both Scn1 and EDI.Scn1 assemblies. Hence, a shared
BizTalk application on BizTalk server, called SharedSchemas has been created. This is the only
artifact it has for the POSO schema. Both EDI.Scenario1.DistributedDistribution and
Scenario1.DistributedDistribution have added a reference to this application.
28
29
5.
SCENARIO DETAILS
5.1
A large company is running a different legacy system in its central operation and in some of its
distribution facilities. This is a typical retail/distribution scenario where regional stores/distribution
centers are replenished by central organization. Microsoft Dynamics AX is operated for the regional
stores/distribution centers and the central distribution facility is the supplier. The regional
stores/distribution centers can be considered as internal customers. This would also apply with a
franchise that is operated with Microsoft Dynamics AX.
30
Scenario description:
Regional stores/distribution centers generate purchase order of goods to replenish.
The items in the regional stores/distribution centers are considered to be purchased from a
vendor which is the central organization.
o In this case, the regional stores/distribution centers send a purchase order to the
central organization.
At the central organization level, the purchase order becomes a sales order as it would be
delivered to a customer.
Delivery and returns can be handled.
Financials will follow the regular intercompany billing rules.
The following displays the scenario transactions that will be detailed in the following sections.
32
Step 2: Click Send electronically button on the header section and select the following:
Select RemoteEP in the Endpoint ID field to specify where the document should go in
BizTalk.
Select the purchase order number in the Purchase Order field.
Step 3: Click OK to add an unprocessed XML file for this purchase order to the Gateway queue. The
Gateway queue is accessible from Basic>Periodic>Application Integration Framework> Queue
manager.
The following displays the Queue manager form:
33
Step 4: The entry can be completed through a batch process or the following job to execute
immediately. Run the job called runAIFSync to process the message in queue to be picked up by
BizTalk.
After the job runAIFSync is run, the following fields are set:
Channel
Source endpoint
The message is now ready to be picked up by BizTalk. After the purchase order is send
electronically, the message will be an outbound message and can be consumed by any external
system including the BizTalk server.
The following displays the Queue manager with the Channel and Source endpoint fields set:
34
BizTalk also refers to the Gateway queue to periodically check for any messages available. The
Gateway queue will read the message into the BizTalk message box. If the message is known to
BizTalk, then BizTalk will start processing the message. In this scenario, the BizTalk server will
receive a purchase order from the Gateway queue. BizTalk is configured to work with the purchase
order schema and picks up the purchase order message.
The BAPI used in this transaction is BAPI_SALESORDER_CREATEFROMDAT2.
The following displays the orchestration of the purchase order:
35
BizTalk transforms the outbound Microsoft Dynamics AX purchase order into an inbound sales order
message and calls the standard SAP BAPI to create the sales order in SAP.
Once the sales order is created, SAP users can process and confirm the sales order so a sales order
confirmation can be sent to external parties.
5.1.3 TRANSMIT ORDER, ITEM/QUANTITY, DATE CONFIRMATION
The SAP environment must be setup to send a IDOCs to BizTalk Logical System for sales order
confirmation. The IDOCs will be sent to BizTalk which is listening to the SAP endpoint. The name of
this IDOC is BA00 and contains the item, quantity, and date confirmation corresponding to the sales
order.
The sales order confirmation includes the purchase order ID created by the sales office. BizTalk can
use this purchase order ID to correlate the sales order confirmation to a purchase order in Microsoft
Dynamics AX. BizTalk extracts the purchase order from Microsoft Dynamics AX and then updates
36
the Corporate ERP field to Sales order confirmed. The following displays the updated Microsoft
Dynamics AX Purchase order form with the Corporate ERP field equal to Sales order confirmed.
5.1.4
37
6.
CONCLUSION
The Regional Distribution scenario detailed the Two-Tier ERP deployment approach where a large
corporation would use a Tier 1 financial application such as Oracle or SAP to run its headquarters.
The smaller entities such as subsidiaries, divisions, branches, departments, lines of businesses
would standardize to use Microsoft Dynamics AX. Microsoft Dynamics AX allows the smaller entities
to run their business processes with a globally available industry ready solution to take advantage its
ease of use, flexibility, scalability, quick implementation and training that result in lower cost of
ownership.
To take full advantage of this Two-Tier implementation strategy, Microsoft Dynamics AX proposes to
directly connect to the corporate ERP system to streamline cross entity collaboration. This realistic
scenario can be used as a template for implementations if the organization wants to connect local
entities to the corporate ERP solution across Microsoft Dynamics AX and SAP.
38
Microsoft Dynamics is a line of integrated, adaptable business management solutions that enables you and your
people to make business decisions with greater confidence. Microsoft Dynamics works like and with familiar Microsoft
software, automating and streamlining financial, customer relationship, and supply chain processes in a way that
helps you drive business success.
U.S. and Canada Toll Free (888) 477-7989
Worldwide (1) (701) 281-6500
www.microsoft.com/dynamics
39