Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SAP IDoc SyntaxNew to Visual Studio Code? Get it now.
SAP IDoc Syntax

SAP IDoc Syntax

RustyJonez

|
1 install
| (0) | Free
Syntax highlighting, hover tooltips, qualifier translations, and status bar field info for SAP IDoc flat files and XML IDocs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SAP IDoc Syntax

Syntax highlighting and reference for SAP IDocs in VS Code. Supports both fixed-width flat files and XML.

Features

Flat-file IDocs (.txt, .idoc)

  • Syntax highlighting: For flat files, segments are highlighted and grouped (e.g. control record, header data, items, etc). Positions are also separated visually by type.
  • Hover hints: Enable to hover over a segment name (xml/ff) or position (ff) to see useful reference information. Reference the field, its value, a qualifier translation, a readable date or time, and the field's offset, length and data type.

    Note: Translations use standard SAP code lists; custom or user-defined values in your system may not be covered.

  • Auto-detect: A plain-text file whose first line starts with EDI_DC40 activates the SAP IDoc language.
  • Status bar. Shows the segment and field under the cursor and highlights that field's columns on the line.

XML IDocs

  • A file is treated as an IDoc if <IDOC or <EDI_DC40 appears in its first 10 lines.
  • Hovering a segment tag shows the segment's field list.
  • Hovering a field tag shows the same value, translation and date details as flat files. The parent segment is found automatically, including custom Z* segments that have a SEGMENT= attribute.

Hover hints on/off

Toggle hints with the IDoc Hints status bar item, Ctrl+Alt+Shift+I, or SAP IDoc: Toggle IDoc Hover Hints. The choice is saved to the user setting sapIdoc.hoverHints.enabled, so it persists across reloads and windows.

Customising colours

Each colour role can be overridden in settings.json:

"editor.semanticTokenColorCustomizations": {
  "rules": {
    "idocDate:idoc": "#DCDCAA",
    "idocTime:idoc": "#CE9178",
    "number:idoc": "#B5CEA8",
    "enumMember:idoc": "#4FC1FF"
  }
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft