ERPClimb logoERPClimb
Enhancements
ABAP Developmentadvanced 7 min read

Enhancements Part 8: Switch-Controlled Enhancements (Switch Framework)

Preview · a free account unlocks the full lesson

Key takeaway

Understand how the Switch Framework controls enhancements: business functions, switches and packages (SFW1/SFW2/SFW5), why industry solutions and enterprise extensions are switched, what happens when you activate a business function, and how to use switches for your own enhancements.

In this lessonShow sections

Visual overview

Enhancements Part 8: Switch-Controlled Enhancements (Switch Framework) — learning sheetFlow: SFW5: browse active business functions in your system (display only) → SE20: open a SAP enhancement implementation and check its package and switch → For your own feature, implement a feature flag in a Z customizing table (code example). Key ideas: OBJECTS; HOW IT WORKS; WHAT HAPPENS ON ACTIVATION; CUSTOMER USE. Watch out: Activating an SAP business function is usually irreversible — test in a sandbox and check SAP documentation first.ERPClimb.com / ABAP / LESSON 8/10 / LEARNING SHEETEnhancements Part 8: Switch-Controlled Enhancements(Switch Framework)1 · HOW IT FLOWS1SFW5browse active business functionsin your system (display only)2SE20open a SAP enhancementimplementation and check its…3For your own feature,implement a feature flagin a Z customizing table…2 · KEY IDEAS EXPLAINEDObjectsSwitch (SFW1) — on/off, assigned to packages,screens, customizing.Business function (SFW2) — groups switches with abusiness meaning.How It WorksAn enhancement implementation stored in a packageassigned to a switch is active only if the switchis on. SAP's enhancement package code (e.g. new…What Happens On ActivationSwitched objects become active; database changes(new fields) may be applied; customizing andscreens appear.Many SAP business functions are not reversible.Reversible ones are marked in SFW5.Customer UseYou can create your own switches and businessfunctions for your own enhancement implementations— for example to deliver a feature to several…In practice, most customers use simpler controls:a customizing table with a feature flag checked atthe start of the enhancement, or BAdI filters.3 · REMEMBER · WATCH OUTRememberThe Switch Framework activates repository objects (includingenhancement implementations) only when their switch is on.Objects are assigned to a package, the package to a switch, switchesto business functions; SFW5 activates business functions.SAP uses it for industry solutions and enhancement packages (EHPs) —the code is installed but inactive until switched on.!Watch outActivating an SAP business functionis usually irreversible — test in asandbox and check SAP documentationfirst.4 · IN A REAL PROJECTA support team spent a day searching why a standard field for foreign trade was not visible in a new system.The screen enhancement came from an SAP enhancement package business function, which was active in the oldsystem but not in the new one. SFW5 comparison between systems revealed the difference. After checking SAP…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Parts 2 through 7 of this series showed enhancement implementations that are always active once created; the Switch Framework adds a way to control whole sets of enhancements together, activating repository objects — including enhancement implementations — only when their switch is turned on.

The objects involved are: a switch (maintained in SFW1), which is simply on or off and gets assigned to packages, screens, or customizing; a business function (maintained in SFW2), which groups switches together with a business meaning; a business function set, used for industry solutions; and SFW5, the switch framework customizing transaction, which activates business functions and shows which ones are currently active.

The mechanism works like this: an enhancement implementation stored in a package that's assigned to a switch is active only if that switch is on. This is exactly how SAP ships enhancement package code — new fields and screens, for example — with every system: the code is physically there, but stays invisible until the relevant business function is switched on.

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

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.