Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Automatic creation of inter-company PO and Billing by EDI in SAP. – M.

JAYABABU (S4 HANA MM Consultant)

Auto creation of intercompany purchase orders with billing via EDI within same client.

This is about integrating purchasing and sales processes between different company codes
maintained in the same server & client by using EDI & I-Docs with message type ORDERS. Once the
Sales order is created in Supplying company code, confirmation is sent to receiving company code by
using message type ORDRSP.

Auto-delivery will get created by Batch Job or sales document settings.

Once done the PGI from the delivering company code side, then Inbound delivery gets created by
using message type DESADV. And then you need to do a good receipt for purchasing company code
side via VL32N.

The billing document will get created for delivery for the delivering company code side by scheduling
the batch job (program RV60SBAT/VF06) and once created billing document and then the Invoice
document will be posted automatically in a purchasing company code side by using the message
type INVOIC.

Configuration:

➢ Define logical system via SALE

➢ Assign Logical System to Client


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Define RFC Settings via WE21

This scenario is an intercompany STO process, i.e., between company code to company code

We need to create a supplier master for purchasing company codes and a customer master for
delivering company codes.

Purchasing company code details:

Company code: 2222

Purchase organization: 2222

Supplier master: 5900000043

➢ Create supplier master via BP


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Delivering company code details:

Company code: 8888

Sales organization: 8888

Distribution Channel: 88

Division : 88

Customer master : 5900000044

➢ Create customer master via BP


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Maintain the outbound parameters


Define partner profile (Vendor Master) via WE20

Partner Type LI

Message type: ORDERS


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Message type: ORDCHG


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Define partner profile (Customer Master) via WE20

Partner Type KU

Message Type: ORDRSP


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Message Type: INVOIC

Message Type: DESADV


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Maintain the inbound Parameters


Define the Partner Profile for Logical system via WE20

Partner Type LS

Message Type: ORDERS


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Message Type: ORDRSP

Message Type: DESADV

Message Type: INVOIC


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Output message determination


➢ Maintain Message Types for PO

SPRO-MM-PO-Messages-Output Control-Message Types-Define Message Types for Purchase Order-


Maintain Message Types for PO

➢ Maintain Message Determination Schema: Purchase Order

➢ Fine-Tuned Control: Purchase Order

➢ Assign Schema to Purchase Order


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Maintain Output Types for Sales Documents

Sales and Distribution- Basic Functions- Output Determination- Output Determination- Output
Determination Using the Condition Technique- Maintain Output Determination for Sales Documents-
Maintain Output Types

➢ Maintain Output Determination Procedure

➢ Assign Output Determination Procedures

➢ Maintain Output Types for Billing Documents

Sales and Distribution- Basic Functions- Output Determination- Output Determination- Output
Determination Using the Condition Technique- Maintain Output Determination for Billing
Documents- Maintain Output Types
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Maintain Output Determination Procedure

➢ Assign Output Determination Procedures

➢ Maintain Output Types for Outbound Deliveries

Logistics Execution- Shipping- Basic Shipping Functions- Output Control- Output Determination-
Maintain Output Determination for Outbound Deliveries- Maintain Output Types

➢ Maintain Output Determination Procedure

➢ Assign Output Determination Procedures


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Another main configuration


➢ Define Sales Document Types

SPRO-Sales and Distribution -Sales - Sales Documents -Define Sales Document Types

Here, I have maintained “A” for Immediate delivery. That means once the sales order gets
confirmed, then delivery will get created automatically.

➢ Define Billing Types

SPRO-Sales and Distribution -Billing- Billing Documents- Define Billing Types


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Assign created Z billing document types, output determination, Application V3 & output type ZINV.

➢ Convert External to Internal Partner Numbers

Sales and Distribution- Electronic Data Interchange- EDI Messages- IDoc- Configure EDI Partners-
Convert External to Internal Partner Numbers

Above, we should maintain customer number 5900000044, partner function SH, External Partner
should be a receiving plant (2222) & Internal number should be a customer 5900000044

➢ Assign Customer/Supplier to Sales Organization Data

Sales and Distribution- Electronic Data Interchange- EDI Messages- IDoc- Configure EDI Partners-
Convert- Assign Customer/Supplier to Sales Organization Data

Above, we should maintain customer 5900000044, vendor 5900000043, and delivery company
code’s sales organization 8888, Distribution 88, division 88 & sales order type ZSOR

➢ Assign Tax Codes

Materials Management- Logistics Invoice Verification- Electronic Data Interchange (EDI)- IDoc- Assign
Tax Codes
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Above, we should maintain partner type LS, Partner number S4HCLNT100, Tax type I4 (Tax type
should be an output tax code which was maintained in VK11), Tax rate 18% should be 00.000 or if
ZERO % then it should be 0 & Tax code I4 (which were maintained in FV11).

➢ Assign Company Code

Materials Management- Logistics Invoice Verification- Electronic Data Interchange (EDI)- IDoc- Assign
Company Code

Above, we should maintain Partner type LS, Partner number S4HCLNT100, Company code Name in
the Invoice should be customer number 5900000044, and company code (2222) should be a
purchasing company code.

➢ Enter Program Parameters

Materials Management- Logistics Invoice Verification- Electronic Data Interchange (EDI)- IDoc- Enter
Program Parameters

Above, we should maintain partner type LS, Partner number S4HCLNT100, Company code (2222)
should be a purchasing company code & Invoice document type “RE & KR.

➢ Sales document Pricing Procedures (V/08)

Sales and Distribution- Basic Functions- Pricing- Pricing Control- Define And Assign Pricing
Procedures- Set Pricing Procedures
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Check Calculation Procedure (OBQ3)

Financial Accounting- Financial Accounting Global Settings- Tax on Sales/Purchases- Basic Settings-
Check Calculation Procedure

➢ Maintain the Tax code via FTXP

TAX is an exemption here

➢ Maintain the Tax condition record via FV11

➢ Maintain the sales Tax condition record via VK11


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Maintain tax data in material master via MM02

➢ Maintain Tax data customer master via BP


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Scenario Testing
➢ Create Intercompany purchase order via ME21N

Create PO for purchasing company code side and must maintain the confirmation control.

Please note: Must extend material master on both company code’s plants.

Intercompany STO PO created under the number 4500002435

Check output type’s processing log and then click PO’s relationship
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Here, Message type ORDERS will get created a sales order and the sales order will get confirmed by
message type ORDRSP.

And see the sales order under the “confirmation” tab

➢ Display sales order via VA03


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Check the process logs

Look at the above, the sales order has got confirmed.


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Note: Delivery gets created once the sales order quantity is confirmed as configured (Immediate
delivery (A) in the sales document ZSOR.

➢ Post goods issue from delivery company code’s plant side via VL02N

Above, delivering plant (8888) & Storage location 1000 are from delivering company code 8888.
Picked Quantity and click on PGI.
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Look at the above, inbound delivery has been created, once made PGI by using Message type
DESADV.

➢ Display the purchase order via ME23N

Look at the above, Inbound delivery & outbound delivery are under the “confirmation “tab
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Goods receipt for receiving company code’s plant side via VL32N

Look at the above, receiving plant (2222) & storage location (1000) are from receiving company code
2222. Putaway Quantity and good receipt

Goods receipt for inbound delivery 180000476 posted (material document 9900000239)

➢ Display the purchase order history via ME23N

I have scheduled a batch job for creating billing automatically for deliveries by using the program
RV60SBAT/VF06.

Once ran the batch job successfully, then the billing document has got created and you can see by
displaying the sales order via VA03 or V.21
Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

➢ Display the billing document via VF03


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Look at the above, the message type INVOIC will get created MM invoice document once posted the
billing document for outbound delivery is for delivering company code side.

➢ Display invoice document via MIR4


Automatic creation of inter-company PO and Billing by EDI in SAP. – M. JAYABABU (S4 HANA MM Consultant)

Above, Invoice got created for purchasing company code (2222)

➢ Display the purchase order history via ME23N

You can see the IDoc status via WE09 Transaction

Thanks & Regards

M. JAYABABU (S4 HANA MM Consultant)

You might also like