Lesson 3 of 5
Patterns: drafts, filters, variants, messages
9 min
Listen to this lesson
Because so many SAP S/4HANA apps share SAP Fiori elements floorplans, they share behavior too. Four patterns appear everywhere and produce a large share of Fiori defects: drafts, filter bars, variants and messages. Build a reusable set of checks for each, and apply them to every app in scope.
Drafts
Draft-enabled apps save the user's work in progress automatically as a draft while they edit, before anything is posted. The user can leave and come back later, and the draft is still there. Only when they choose to save does the real business document get created or changed. Drafts also act as locks: while one user has a draft of a purchase order, another user sees that it is being edited.
- Start editingA new purchase order for 500 CMC-RTR-200 rotors from Lakeside Components.
- Draft saved automaticallyWork in progress is kept; other users see the object as being edited.
- Leave and resumeThe draft is still listed and can be picked up later.
- Save or discardSave runs validations; discard leaves any active version unchanged.
- Active documentOnly now does a PO number exist, with effects on follow-on processes.
| Draft test | Expected behavior (Contoso example) |
|---|---|
| Start editing, close the browser tab, reopen the app | The draft of the new purchase order for 500 rotors is listed and can be resumed |
| Second user opens the same object | The object shows as being edited by the first user; the second user cannot overwrite it |
| Discard the draft | No document is created, and the active version (if any) is unchanged |
| Save the draft with a validation error | Save is refused with a clear message; the draft keeps the user's input |
| Save successfully | The active document is created or updated; the draft disappears; follow-on documents and statuses are correct |
Core draft checks for any draft-enabled app.
Filter bars
- Mandatory filters are enforced and clearly marked.
- Value helps return correct, authorized values only: a Chicago buyer should not be offered plants they cannot use.
- Combined filters behave as expected: several values in one field usually mean "or", different fields mean "and".
- Date and range filters include and exclude boundary values correctly.
- Results match an independent count, for example the number of open purchase orders for supplier Lakeside Components in plant 1710.
Variants
Variant management lets users save a combination of filters, columns, sorting and grouping as a named view. Variants can be private or shared publicly, set as the user's default, and set to apply automatically. Test that a saved variant restores exactly what was saved, that public variants are visible to other users and cannot be overwritten by them, that a default variant loads on start, and that variants survive an app update. Organizations often deliver standard public variants for key users; those are part of the delivered configuration and deserve explicit tests.
Variants also hide risk in automation and regression. A test that relies on whatever the user's default variant happens to be will behave differently for a user who changed their default last week. Automated and manual tests should select a named variant explicitly, or start from the standard view, so the results do not depend on someone's personal settings.
Messages
Fiori apps report outcomes in several ways: a brief message toast for success, a dialog for things the user must acknowledge, field-level error highlighting, and a message popover that collects several errors and warnings with a count button. Test that errors appear next to the field that caused them, that backend messages are understandable, that warnings do not block saving when they should not, and that the popover lists every message. A defect where a save silently fails, or a success toast hides a backend warning, is serious.
| Message form | Used for | What to test |
|---|---|---|
| Message toast | Brief success confirmation | It does not hide a backend warning; the document number is shown or findable |
| Dialog | Something the user must acknowledge | Text is understandable and the choices lead where they say |
| Field highlighting | An error in a specific input | The highlight sits on the field that caused the error |
| Message popover | Several errors and warnings at once, with a count | Every message is listed; warnings do not block saving when they should not |
Check the language and wording of messages as well. Backend messages written for SAP GUI sometimes appear in Fiori with technical placeholders or abbreviations that a business user cannot act on. If Maria cannot tell from a message whether her order for Great Lakes Fleet Services was saved, blocked for credit or rejected, log it: unclear messages generate support tickets and duplicate orders after go-live.
- FilterMandatory fields, value help, combinations, boundaries, counts
- VariantSave, default, public versus private, apply automatically
- Edit in draftResume, lock, discard, validation
- SaveActive document created; draft removed; follow-on correct
- MessagesRight type, right place, complete in the popover
What would you do?
A tester reports that a purchase order created in Manage Purchase Orders "disappeared". The app showed the PO with all items, and the tester then closed the tab. Nobody can find a PO number. What most likely happened?
- Drafts save work in progress and lock objects; only the final save creates or changes the document.
- Filter tests cover mandatory fields, value help authorization, combinations, boundaries and independent counts.
- Variant tests cover saving, defaults, public versus private and survival across updates.
- Message tests check type, placement and completeness, and look for silent failures.
Check your understanding · not graded
Lesson check
1. What does a draft in a Fiori elements app represent?
2. A second user opens a purchase order that another user is editing in draft. What should happen?
3. Which is a valid variant test?
4. Where does a Fiori app typically collect several errors and warnings together?