ERPClimb logoERPClimb
IDoc
ABAP Developmentbeginner 7 min read

IDoc Part 2: Message Type, Basic Type and Extension

Preview · a free account unlocks the full lesson

Key takeaway

Distinguish the IDoc building blocks: message type (business meaning, e. g. ORDERS), basic type (technical structure, e. g. ORDERS05), segments and segment hierarchy, extension types for custom segments, and the transactions WE30, WE31, WE60, WE81 and WE82.

In this lessonShow sections

Visual overview

IDoc Part 2: Message Type, Basic Type and Extension — learning sheetFlow: WE60: display documentation of ORDERS05 and find the segment carrying the customer's material number (E1EDP19 with qualifier) → WE82: check which basic types are assigned to ORDERS → In WE02 open an ORDERS IDoc and match its segments to the WE60 documentation. Key ideas: MESSAGE TYPE (WE81); BASIC TYPE (WE30); SEGMENTS (WE31); EXTENSION (WE30 → Extension). Watch out: One message type can use several basic types (versions); partner profiles decide which one is used.ERPClimb.com / ABAP / LESSON 2/10 / LEARNING SHEETIDoc Part 2: Message Type, Basic Type and Extension1 · HOW IT FLOWS1WE60display documentation of ORDERS05and find the segment carrying the…2WE82check which basic types areassigned to ORDERS3In WE02 open an ORDERSIDoc and match itssegments to the WE60…2 · KEY IDEAS EXPLAINEDMessage Type (WE81)Describes what is exchanged: ORDERS, ORDRSP,DESADV, INVOIC, MATMAS, DEBMAS, CREMAS …Used in partner profiles and the distributionmodel to route IDocs.Basic Type (WE30)Defines segments, their order, hierarchy andmin/max occurrences.Versions: ORDERS01 … ORDERS05 — newer versionscontain more segments; usually the latest releasedone is used.Segments (WE31)Segment type (E1EDK01 — order header general data)with fields; segment definition (E2EDK01005 —versioned).In data records (EDID4) the segment name and SDATAhold the content.Extension (WE30 → Extension)Adds customer segments (Z1…) below existingsegments without modifying the basic type.CIMTYP in the control record contains theextension name.3 · REMEMBER · WATCH OUTRememberMessage type = business meaning (ORDERS = purchase/sales order, INVOIC= invoice, MATMAS = material master).Basic type (IDoc type) = technical structure with segments andhierarchy (ORDERS05, INVOIC02, MATMAS05).Extension = customer addition of segments to a basic type; messagetype + basic type + extension are linked in WE82.!Watch outOne message type can use severalbasic types (versions); partnerprofiles decide which one is used.4 · IN A REAL PROJECTA new EDI customer sent ORDERS IDocs, but the mapping team used the qualifier 002 of E1EDP19 for thecustomer's material number, while the customer used 001. Orders were created with wrong or missing materials.Using WE60 documentation and example IDocs, the team corrected the mapping: qualifier 001 carries the buyer's…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Part 1 introduced IDocs in general; this lesson explains how their structure is actually defined.

The message type carries the business meaning — ORDERS for a purchase or sales order, INVOIC for an invoice, MATMAS for a material master record — while the basic type, also called the IDoc type, is the technical structure underneath, defining the segments and their hierarchy, as in ORDERS05, INVOIC02, or MATMAS05.

An extension is a customer addition of segments on top of a basic type, and the message type, basic type, and extension together are linked through transaction WE82.

It's worth noting that one message type can actually be used with several different basic types, or versions, and it's the partner profile that decides which one gets used in a given case.

The message type, maintained in WE81, simply describes what's being exchanged — ORDERS, ORDRSP, DESADV, INVOIC, MATMAS, DEBMAS, CREMAS, and so on — and is used both in partner profiles and in the distribution model to route IDocs to the right place.

The basic type, maintained in WE30, defines the segments themselves, their order, their hierarchy, and their minimum and maximum occurrences. Versions matter here too: ORDERS01 through ORDERS05, for example, with newer versions generally containing more segments, and the latest released version usually being the one in use. WE60 shows the full documentation for a basic type, including the structure and fields of every segment, which makes it essential reading when you're mapping data.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Referenced SAP objects

Reviewed reference pages for the objects this page mentions.

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.