Architecting EDI With SAP IDocs - Amazon S3

Transcription

Emmanuel HadzipetrosArchitecting EDI with SAP IDocs The Comprehensive GuideBonn Boston871 Book.indb 310/8/13 1:03 PM

Contents at a GlanceACT IHollywood, DVDs, and the After-Life of Movies1Hollywood’s B-Movie Queen Does SAP and EDI .2The Blueprint: Discovery and Documentation .3Designing the New SAP EDI Architecture .335179ACT IITaming Chaos with Standards—EDI in an SAPEnvironmentEDI: The Ugly Stepsister of E-Commerce .Real-World Business Process Integration with EDI . .EDI Architecture in SAP: IDoc Basics .Configuring IDocs in SAP for EDI Exchange .Custom IDocs and IDoc Extensions .115149209243309ACT III Realizing the Dream—Building Acme’s SAP EDI System9Generating the PO for Replication Services .10 The Inbound Goods Receipt .11 Processing the Incoming Supplier Invoice . .12 The Inbound Customer Purchase Order . .13 Building the Outbound Order Confirmation .14 Sending a Shipping Order to the Supplier . .15 The Inbound Shipping Confirmation . .16 The Advanced Shipping Notice to the Customer .17 Generating the Outbound Customer Invoice .18 Processing the Inbound Payment Advice .367395413441481547575605639703ACT IV Finishing Touches19 Extending the Interface: Custom IDoc Tools .20 Testing the EDI System in SAP .21 Troubleshooting and Recovery .73978784145678871 Book.indb 510/8/13 1:03 PM

ContentsPrologue .ACT I1Hollywood, DVDs, and the After-Life of MoviesHollywood’s B-Movie Queen Does SAP and EDI .331.11.2SAP and EDI: Getting to Know Each Other .A Brief History of Fame: Our Imaginary Dream Factory .1.2.1 A Bird’s-Eye View of the Business .1.2.2 Enter Plan Q: A New Project Is Born .1.2.3 We Define Our Scope .Defining Some Basic Ground Rules .1.3.1 The Technical Environment .1.3.2 The EDI System .1.3.3 Nothing but IDocs .1.3.4 Batch Processing of Large Files .1.3.5 XML File Ports .1.3.6 Partner Profiles .1.3.7 EDI Mapping Strategy .Summary .3435374041424242454647484850The Blueprint: Discovery and Documentation .512.15252575963656666676768691.31.42232.2A Business Process Overview .2.1.1 The As-Is Purchasing Process Flow .2.1.2 The As-Is Sales and Distribution Processing Flow .2.1.3 Selling the Dream with Vendor Management Inventory .Legacy Systems, Data Flows, and Interfaces .2.2.1 Title Master and DVD Repository .2.2.2 Release Planning and Promotions Systems .2.2.3 Legacy SD .2.2.4 Manufacturing .2.2.5 Finance .2.2.6 VMI and StoreData .2.2.7 EDI .7871 Book.indb 710/8/13 1:03 PM

Contents2.3Legacy EDI Data Flows .2.3.1 Replicating Success: Outsourcing Production .2.3.2 Order-to-Cash and Legacy EDI .Summary .69707578Designing the New SAP EDI Architecture . .792.433.13.23.33.43.53.6ACT II4The To-Be Systems and Interfaces Emerge .3.1.1 The Resource Integration Manager . .3.1.2 Let’s Get Technical: A More Intimate Look at the RIM .Laying the Foundations for EDI: Master Data .3.2.1 A Brief Word on Conversion Strategy .3.2.2 General Ledger Chart of Accounts and Cost Centers .3.2.3 Customer Master Sold-To . .3.2.4 Customer Master Ship-To . .3.2.5 Vendor Master .3.2.6 Material Master .3.2.7 Customer Material Info Records .3.2.8 Bill of Materials . .3.2.9 Pricing Conditions .The Typical Lifecycle of an Order from Gordy . .3.3.1 VMI Sales Orders .3.3.2 Catalog Planning .3.3.3 Purchasing/Manufacturing .3.3.4 Delivery .3.3.5 Billing .3.3.6 Payment .Interfaces in the Order-to-Cash Cycle .Considering the Project Plan .Summary 11112Taming Chaos with Standards—EDI in an SAP EnvironmentEDI: The Ugly Stepsister of E-Commerce . 1154.1A Brief History of e-Commerce .4.1.1 A Flowery Beginning for e-Commerce .4.1.2 The Berlin Airlift, the Supply Chain, and Transportation .4.1.3 The Birth of ASC X12 .1161171171198871 Book.indb 810/8/13 1:03 PM

Contents4.24.34.44.554.1.4 Global Trade and E-Commerce: UN/EDIFACT . .4.1.5 Other EDI Standards .4.1.6 Communications, VANs, and the Internet .The Anatomy of an EDIFACT Interchange .The Anatomy of an X12 Interchange . .4.3.1 Syntax and Semantics: X12 as Language .4.3.2 The Envelope Segments .4.3.3 Dissecting Gordy’s 850 to Acme .Enveloping and De-enveloping: The X12 in Action .4.4.1 Unwrapping an Inbound EDI Interchange .4.4.2 Building an Outbound EDI Interchange .Summary .120122123125128130132134145146147148Real-World Business Process Integration with EDI . 1495.15.25.35.45.55.65.75.8The Basic EDI Interface .Trading Partner Management .The Impact of VMI Collaboration through EDI .The Role of Acme’s EDI RIM . .5.4.1 Outbound Services . .5.4.2 Inbound Services . .5.4.3 Archiving EDI Data . .Reporting EDI Status to SAP .5.5.1 SAP Status Codes .5.5.2 Creating Custom Messages . .5.5.3 Mapping the STATUS IDoc . .5.5.4 So How Do We Get the Enveloping Data? . .5.5.5 The Status Interface Business Process Workflow .5.5.6 The 997 Functional Acknowledgment Interface . .Putting All the Pieces Together .5.6.1 Inbound .5.6.2 Outbound .Archiving and Deleting IDocs in SAP .5.7.1 Archive and Delete .5.7.2 Deleting IDoc Generated Work Items .Summary 931961962042079871 Book.indb 910/8/13 1:03 PM

Contents6EDI Architecture in SAP: IDoc Basics . 2096.16.26.36.47Intelligent Messages: The Anatomy of an IDoc . .6.1.1 Logical Message Type .6.1.2 IDoc Record Types: External Representation .6.1.3 IDoc Record Types: Internal Representation .6.1.4 IDoc Basic Type .6.1.5 IDoc Extended Type .6.1.6 IDoc Instance . .6.1.7 IDoc File .6.1.8 XML IDocs .IDoc Architecture and the Data Dictionary .6.2.1 Domains .6.2.2 Data Elements . .6.2.3 Fields .6.2.4 Segments .6.2.5 IDoc Basic and Extended Types .One-Time EDI Configuration for IDocs in SAP . .6.3.1 EDI User Name .6.3.2 Logical System .6.3.3 Connecting Systems to SAP .6.3.4 XML File Port . .Summary 35236237239241Configuring IDocs in SAP for EDI Exchange . . 2437.17.2Inbound Configuration is About Posting IDocs . .7.1.1 Key Values for Inbound IDoc Posting .7.1.2 Partner Type .7.1.3 Inbound Partner Profile for an ORDERS PO . .7.1.4 Inbound EDI Reference Data . .7.1.5 Tying It All Together: The SAP EDI Inbound ProcessingFlow .Outbound Configuration Generates IDocs .7.2.1 Message Control .7.2.2 Create an Output Type . .7.2.3 Assign Output Type to a Procedure .7.2.4 Condition Records .24324424524625226427427627928328610871 Book.indb 1010/8/13 1:03 PM

Contents7.387.2.5 The Outbound Partner Profile with Message Control . .7.2.6 EDI Outbound Reference Data .7.2.7 The SAP EDI Outbound Process Flow . .Summary .292296300308Custom IDocs and IDoc Extensions . 3098.18.28.38.4IDoc Development and Configuration Tools . .8.1.1 Transaction SE11—Data Dictionary .8.1.2 Transaction WE31—Segment Editor .8.1.3 Transaction WE30—IDoc Type Editor .8.1.4 Transaction WE81—Logical Messages .8.1.5 Transaction WE82—Message to Basic Type Link .8.1.6 Transaction SE37—Function Editor: Function Groups .8.1.7 Transaction SE37—Function Editor: Function Modules .8.1.8 Transaction SMOD—SAP Enhancements .8.1.9 Transaction CMOD—Project Management for SAPEnhancements . .8.1.10 Transaction WE57—Link Function to Message andBasic Type .8.1.11 Transaction BD51—Define IDoc Attributes .8.1.12 Transaction WE42—Inbound Process Code .8.1.13 Transaction WE41—Outbound Process Code .Building a Custom IDoc: Inbound Inventory Report .8.2.1 Custom IDoc Development Workflow .8.2.2 Building the IDoc Interface .Extending an IDoc: Outbound PO with BOMs .8.3.1 IDoc Outbound Development Workflow . .8.3.2 Create Segment Z1EDP01 .8.3.3 Build Extension ZORDRS01 .8.3.4 Link Message to Basic and Extended Types .8.3.5 Create the Modification Project .8.3.6 Coding the Exit .8.3.7 Customize Message Control .8.3.8 Build Outbound Partner Profile .Summary 2634134134834835035035335535936311871 Book.indb 1110/8/13 1:03 PM

ContentsACT III9Realizing the Dream—Building Acme’s SAP EDI SystemGenerating the PO for Replication Services . . 3679.19.29.39.49.59.69.7Technical Overview of the Interface .Functional Specifications .9.2.1 Process Overview .9.2.2 Requirements . .9.2.3 Dependencies .9.2.4 Assumptions .9.2.5 Data That Will be Passed to an Outbound PurchaseOrder .9.2.6 Custom Enhancements .9.2.7 Reconciliation Procedure .9.2.8 Errors and Error Handling .Generating the ORDERS PO with Message Control .9.3.1 Message Control Configuration for the ORDERSMessage . .9.3.2 Overview of the End-to-End Process Flow . .Technical Specifications .9.4.1 Technical Requirements .9.4.2 Dependencies .9.4.3 Assumptions .Mapping Specifications . .EDI Configuration in SAP .9.6.1 EDPAR Entries: Transaction VOE4 .9.6.2 ZEDIXREF Entries .9.6.3 Partner Profiles: Transaction WE20 .Summary 8338438838838839039210 The Inbound Goods Receipt . 39510.1 Technical Overview of Interface .10.2 Functional Specifications .10.2.1 Process Overview .10.2.2 Requirements . .10.2.3 Dependencies .10.2.4 Assumptions .10.2.5 Data That Will Post to a Material Document .39639839839839940040012871 Book.indb 1210/8/13 1:03 PM

Contents10.310.410.510.610.710.2.6 Reconciliation Procedure .10.2.7 Enhancements to the Process .10.2.8 Errors and Error Handling .End-to-End Process Flow .Technical Specifications .10.4.1 Technical Requirements .10.4.2 Dependencies .10.4.3 Assumptions .Mapping Specifications . .EDI Configuration in SAP .10.6.1 EDPAR Entries: Transaction VOE4 .10.6.2 ZEDIXREF Entries .10.6.3 Partner Profile: Transaction WE20 . .Summary .40140240240240640640640740740940940941041111 Processing the Incoming Supplier Invoice . 41311.1 Technical Overview of Interface .11.2 Functional Specifications .11.2.1 Process Overview .11.2.2 Requirements . .11.2.3 Dependencies .11.2.4 Assumptions .11.2.5 Data That Will Post to an Inbound Supplier Invoice .11.2.6 Reconciliation Procedure .11.2.7 Configuring Logistics Invoice Verification .11.2.8 Enhancements to the Process .11.2.9 Errors and Error Handling .11.3 End-to-End Process Flow .11.4 Technical Specifications .11.4.1 Enhancements to the Process .11.4.2 Technical Requirements .11.4.3 Dependencies .11.4.4 Assumptions .11.5 Mapping Specifications . .11.6 EDI Configuration in SAP .11.6.1 Extending Process Code INVL .11.6.2 EDPAR Entries: Transaction VOE4 3143143543543613871 Book.indb 1310/8/13 1:03 PM

Contents11.6.3 ZEDIXREF Entries .11.6.4 Partner Profile: Transaction WE20 . .11.7 Summary .43643643812 The Inbound Customer Purchase Order . 44112.1 Technical Overview of Interface .12.2 Functional Specifications .12.2.1 Process Overview .12.2.2 Requirements . .12.2.3 Dependencies .12.2.4 Assumptions .12.2.5 Data That Will Post to an Inbound Sales Order .12.2.6 Reconciliation Procedure .12.2.7 Enhancements to the Process .12.2.8 Errors and Error Handling .12.3 End-to-End Process Flow .12.3.1 VMI Processing .12.3.2 EDI 850 Processing .12.3.3 VMI and EDI Processes Merge .12.4 Technical Specifications .12.4.1 Technical Requirements .12.4.2 Dependencies .12.4.3 Assumptions .12.5 Mapping Specifications . .12.5.1 Structure of the 850 to IDoc Build Array .12.5.2 Mapping the Build Array to the Target IDoc . .12.6 SDQ Processing Program Logic .12.7 Duplicate Checking Enhancement . .12.7.1 Create Error Message .12.7.2 Create Modification Project .12.7.3 Program Flow .12.8 EDI Configuration in SAP .12.8.1 EDPAR Entries: Transaction VOE4 .12.8.2 EDSDC Entry: Transaction VOE2 .12.8.3 ZEDIXREF Entries .12.8.4 Partner Profile: Transaction WE20 . .12.9 Summary 71 Book.indb 1410/8/13 1:03 PM

Contents13 Building the Outbound Order Confirmation . 48113.1 Technical Overview .13.2 Functional Specifications .13.2.1 Process Overview .13.2.2 Requirements . .13.2.3 Dependencies .13.2.4 Assumptions .13.2.5 Data That Will Pass to an Outbound OrderConfirmation . .13.2.6 Custom Enhancements .13.2.7 Reconciliation Procedure .13.2.8 Errors and Error Handling .13.3 Generating the ORDRSP with Message Control .13.3.1 Message Control Configuration for the ORDRSP .13.3.2 Overview of the End-to-End Process Flow . .13.4 Technical Specifications .13.4.1 Technical Requirements .13.4.2 Dependencies .13.4.3 Assumptions .13.4.4 Extended IDoc Type ZORSDQ01 .13.4.5 Creating the Extended IDoc Type .13.4.6 SDQ Bundling and IDoc Output Program .13.5 Mapping Specifications . .13.6 EDI Configuration in SAP .13.6.1 EDPAR Entries: Transaction VOE4 .13.6.2 ZEDIXREF Entries .13.6.3 Partner Profiles: Transaction WE20 .13.7 Summary 0050150150953453853853853954414 Sending a Shipping Order to the Supplier . 54714.1 Technical Overview of Interface .14.2 Functional Specifications .14.2.1 Process Overview .14.2.2 Requirements . .14.2.3 Dependencies .14.2.4 Assumptions .54854955055155255315871 Book.indb 1510/8/13 1:03 PM

Contents14.314.414.514.614.714.2.5 Data That Will Pass to an Outbound Ship Order .14.2.6 Enhancements to the Process .14.2.7 Reconciliation .14.2.8 Errors and Error Handling .Generating a SHPORD IDoc with Message Control .14.3.1 Configuring Message Control .14.3.2 Overview of the End-to-End Process Flow . .Technical Specifications .14.4.1 Technical Requirements .14.4.2 Dependencies .14.4.3 Assumptions .Mapping Specifications .EDI Configuration in SAP .14.6.1 EDPAR Entries: Transaction VOE4 .14.6.2 ZEDIXREF Entries .14.6.3 Partner Profiles: Transaction WE20 .Summary 7315 The Inbound Shipping Confirmation . 57515.1 Technical Overview of the Interface .15.2 Functional Specifications .15.2.1 Process Overview .15.2.2 Requirements . .15.2.3 Dependencies .15.2.4 Assumptions .15.2.5 Delivery Document Data after Ship Confirm Update . .15.2.

5 Real-World Business Process Integration with EDI . 149 6 EDI Architecture in SAP: IDoc Basics . 209 7 Configuring IDocs in SAP for EDI Exchange . 243 8 Custom IDocs and IDoc Extensions . 309 ACT III Realizing the Dream—Building Acme's SAP EDI System