SAP Automatic PO-SO By I-Doc Message Type ORDERS

In this example:

  • Purchasing Company (Passive Toller): CC: Z006, Receiving Plant: Z006, Purch Org: Z007
  • Selling Company (Active Toller): CC: Z007, Delivering Plant: Z007, Sales Area: Z007 Z3 Z4

Preparation

1. Check Logical system assigned to your client in transaction SCC4

2. Create RFC destination (of type  ABAP Connection)  to the logical system in transaction SM59.

Here give the same name as of logical system & fill target host & system number. In logon & security Tab fill client, username & password. To check the connection click on Remote logon & connection test. If you are able to remotely log in to target client then  proceed to the next step.

3. Create a port of type Transactional RFC in transaction WE21.

You can give port name manually or else system will assign one based on your selection. Select IDoc version as SAP release 4.X & give RFC destination name which was created in Step No.2

Vendor Master

4. Create Vendor Master in Transaction XK01 with Organizational elements of Purchasing System i.e., Company Code:Z006 & P. Org: Z007.

In Correspondence Company Code data, maintain  Account with Vendor field  with the customer number that you will create in Step No.7

Vendor Partner Profile

5. In transaction WE20 create Partner of type LI(Vendor) & give the vendor number created in Step No.4 & Save it.

Click on ‘+’ button in Outbound parameters.

6. Enter the Partner Role VN and select Message Type as ORDERS.

6.A. In Outbound options tab, enter the Receiver port which was created in Step No.3. Select the Transfer IDoc Immed to transfer the IDoc as soon as it was created. Select the Basic type as ORDERS05

6.B. In Message Control tab, enter the Output Message type of Purchaser order Ex. NEU and select Process code as ME10.

6.C. In EDI Standard Tab maintain as shown. For more details press F1 in that particular field.

Customer Master

7. Create Customer Master in Transaction XD01 with organizational elements of Sales System i.e., Company Code: Z007 Sales Area: Z007, Z3, Z4.

In Correspondence tab of Company Code Data, maintain Account at cust field with vendor number created in Step No.4.

Customer Partner Profile

8. In transaction WE20 create Partner of type KU (Customer) & give the Customer number created in Step No.7 & Save it.

Now Click on ‘+’ button in Outbound parameters area.

8. Enter the Partner Role SP and select Message type as ORDRSP.

8.A. In Outbound options tab, enter the Receiver port which was created in Step No.3.

Select the Transfer IDoc Immed to transfer the IDoc as soon as it was created.

Select the Basic type as ORDERS05

8.B. In Message Control tab Enter the confirmation Message type of Sales Order Ex. BA00 and select Process code as SD10.

8.C. In EDI Standard tab maintain as shown.

For more details press F1 in that particular field.

LS Partner Profile to create SO

9. In transaction WE20, expand Partner type LS(Logical System) & select the Logical system which was assigned to your client in Step No.1 (This Logical system already exists & don’t required to create).

Click on ‘+’ button in Inbound parameters area as shown above. Select Message type as ORDERS.

9.A. In Inbound options tab, Select the Process code ORDE and select Trigger Immediately to process the IDoc immediately. 

LS Partner Profile to update PO

10. Similarly maintain Inbound parameters for Message type ORDRSP to the same logical system with Process code ORDR (order confirmation)

PO Output Condition Record

11. Create Condition Record in transaction NACR for Output type ZNEU (purchase order Print out EDI) with Key Combination P.Org & EDI Vendor

11.A. Enter the P.Org: Z007 & Vendor:100000 and press enter. Select Medium 6(EDI), 4(send immediately) & Language EN)English). Then save it.

Note: The Funct selected here is used as partner role in Step No.6.

Note: In Output type you have to maintain this message(ZNEU) in step No.6.

SO Output Condition Record

12. Similarly Create Condition record in transaction NACR for Output type BA00(Sales Order Confirmation) with Key Combination Order Type.

Material Master

13. Create Material Master in Transaction MM01 with organizational elements of purchasing system i.e., Plant: Z006. Maintain Basic Data, Purchasing, Plant storage data & Accounting views.

Fill Gross weight & net weight fields in Basic Bata tab. remaining as normal.

14. Extend the material created in Step No.13 in transaction MM01 with organizational elements of Sales system i.e., Plant: Z007, Sales Area: Z007, Z3, Z4. Maintain Sales 1 & 2, Sales plant data, Storage plant data, Accounting views.

PIR

15. Create standard Purchasing Info Record in Transaction ME11, with vendor: 100000, Material; ZTESTMAT006T, P.Org:Z007, Plant: Z006.

15.A. In General Data maintain Vendor Material Number field with material Number in Sales system (Same number as both systems are using same material number).

15.B. In Condition tab maintain Gross price. Ex. 110,000 IDR per KG

Input Tax Condition Record

16. Create Condition Record for Input Tax Condition type MWVS/ZTX0 in transaction FV11. Select Key Combination Ex. Domestic Taxes. Where A0 is the Input Tax code with 10% input tax in Country Indonesia

Can also be maintained in SPRO-FI-GS-Tax-Calculation-MaintainTaxCode (FTXP)

Price Condition Record

17. Create Condition record For Gross Price Condition Type ‘PR00’/ZPR0 in transaction VK11 with required Key Combination & maintain the Gross Price. Ex.110,000 Per KG

Output Tax Condition Record

18. Create Condition Record for Output Tax condition type MWST/ZTX1 in transaction FV11 with required Key Combination. Where A0 is the ouput Tax Code with 10% output tax in country Indonesia.

Can also be maintained in SPRO-FI-GS-Tax-Calculation-MaintainTaxCode (FTXP)

Sales Area for Customer Vendor combination

19. Maintain the Sales Area for the Customer & Vendor combination in Transaction VOE2

Can also be maintained in SPRO-SD-EDI-EDIMessage-ConfigureEDIPartners-AssignCustomer/VendorToSalesOrganization Data

Note: Maintain the vendor number manually (as there is no search help) with prefix zeros if required as SAP will look for the same.

Automatically allocating a sales area (sales org, distr. chan., division)(Z007 Z3 Z4) to an incoming sales order from a customer (61). You enter the internal SAP customer number, and the vendor number (the number by which the customer identifies your company) and then specify the sales area and the document type against which the sales order will be created

External Ship to Party To Internal Cust

20. Convert External Partner Numbers to internal partner numbers. Here we have to convert external ship to party(Z006 receiving plant) to internal ship to party 61. To achieve this make entries as below in Transaction VOE4.

Can also be maintained in SPRO-SD-EDI-EDIMessage-ConfigureEDIPartners-ConvertExternalToInternalPartnerNumbers

Map the customers external partner numbers (their plants/ship to addresses) to your own internal customer numbers in KNA1

Modify Pricing Procedure

21. In your sales pricing procedure ZTAXPR make sure that condition types EDI1 & EDI2 exists at the end of the schema as shown.

Those two condition types stores unit price and total value of item expected by customer(i.e., Price maintained in PO).

These two condition types are for information purpose & can be used for blocking sales order & billing if the price differs from price in sales order. Transaction V.25 is to be used to release from blocking.

Can also be maintained in SPRO-SD-BF-Pricing-PricingControl

Diagram

Testing – Preparation

1.A. Make sure the stock exists in delivering plant(Z007) using MMBE

Testing – Create PO

1.B.1 Create PO in Transaction ME21N in receiving plant Z006

In PO Item Materials Data tab observe Vendor mat. no field filled or not. if you haven’t created info record you can maintain manually.

1.B.2 Create PO in Transaction ME21N in receiving plant Z006

In Confirmation tab maintain Confirmation Control key as 0001(Confirmations) & mark Acknowledgement required check box.

1.B.3 Create PO in Transaction ME21N in receiving plant Z006

In messages observe ZNEU message was triggered with medium 6(EDI). Save the PO & make sure PO message was sent. Use transaction code ME9F if required.

Testing – Check Outbound IDoc

2. In Transaction WE02, check the IDoc Status of message type ORDERS and ORDRSP.

2.A Check the outbound IDoc status of message type ORDERS. If it is successfully processed it will have status 3.

Testing – Check Inbound IDoc

3. Check Inbound IDoc of Message type ORDERS. Here the IDoc 3720.

If it is successfully processed and have status 53 then get the sales order number as shown.

Testing – Check IDoc generated Sales Order

4.A Open the sales order in Transaction VA03. Observe PO Number, order quantity, delivery date & customer material number.

4.B In item Conditions Tab observe condition types EDI1 & EDI2 are updated with Unit price & total value of material ordered in PO respectively

4.C In item Order Data tab observe details

Testing – Check SO Output

5. Now make sure sales order Message type BA00 was sent.

In VA03, goto Extras > Output > Header > Edit.

Testing – Check Outbound IDoc

6. In Transaction WE02, check Outbound IDoc status of Message type ORDRSP.

Here IDoc 372015 as shown. If it is successfully processed it will have status 3.

Testing – Check Intbound IDoc

7. Then Check Inbound IDoc of Message type ORDRSP.

Here the IDoc 372016. If it is successfully processed and have status 53 then check information message saying purchasing doc 4500000180 successfully processed as shown.

Testing – Check IDoc updated PO

8. Now Display the purchase order in ME23N and in item Confirmations tab observe the sales order number is updated with confirmed schedule line as shown.

Reference: https://blogs.sap.com/2013/08/22/integrating-mm-sd-modules-in-same-client-to-create-sales-order-in-supplying-company-code-using-po-raised-in-receiving-company-code-by-i-doc-message-type-orders-part1

Cheers

One thought on “SAP Automatic PO-SO By I-Doc Message Type ORDERS

  1. Pingback: SAP MM-SD Integration (Material Management – Sales and Distribution) – ROLANDO – MY SHARING BLOG

Leave a comment