Custom Fields & Business Contexts
Extend SAP S/4HANA standard documents with custom fields using the Key User Extensibility Framework — no ABAP coding required. Custom Fields appear automatically in Fiori UIs, OData APIs, and output forms.
Custom Field Lifecycle
Executive Summary
Custom Fields extend standard S/4HANA business objects (Sales Order, Purchase Order, Customer, Material, and more) with additional data fields defined entirely by business users inside Fiori App F1481 — no ABAP developer involvement required. These fields integrate automatically into Fiori UIs, OData V4 APIs, and Output Management. Business Contexts define which standard business objects support Custom Fields — SAP provides 40+ Business Contexts out of the box, covering all major document types across Finance, Logistics, and Procurement.
Major Business Contexts
| Business Context | Standard Object | Custom Field Examples |
|---|---|---|
| SalesOrderHeader | I_SalesOrder | Project Code, Approval Level, VAT Category |
| SalesOrderItem | I_SalesOrderItem | DEWA Material Group, Special Handling |
| PurchaseOrderHeader | I_PurchaseOrder | DEWA Cost Center, Procurement Category |
| Customer | I_BusinessPartnerBasic | Customer Tier, UAE TRN Number |
| Supplier | I_SupplierBasic | Supplier Grade, Local Content % |
| BillingDocumentHeader | I_BillingDocument | Invoice Routing Code |
| PlantBasic | I_PlantBasic | DEWA Region Code, Plant Type |
| MaterialBasic | I_ProductBasicText | DEWA Item Category, Asset Class |
Custom Field Types
Free text or dropdown with fixed values. Supports length 1–1333 characters.
Decimal with automatic currency reference field linkage.
Decimal with unit of measure linkage (UoM field auto-created).
Date picker with optional range validation rules.
Checkbox field — displayed as toggle in Fiori Elements.
Reference to a maintained value list (configuration table). Enforces data quality.
Custom Field Logic — Rule Builder
Reading Custom Fields in ABAP Cloud
Custom fields are accessible in ABAP Cloud code via the standard released CDS views. The YY1_ prefix fields are automatically included in the CDS view entity.
" Reading Custom Fields in ABAP Cloud context
" Custom fields are available via the standard CDS view entity
SELECT SINGLE
SalesOrder,
SoldToParty,
TotalNetAmount,
yy1_approvalrequired_sdh AS approval_required, " Custom field
yy1_dewaprojectcode_sdh AS dewa_project_code, " Custom field
yy1_vatcategory_sdh AS vat_category " Custom field
FROM I_SalesOrder
WHERE SalesOrder = @lv_sales_order
INTO @DATA(ls_so).
" Custom fields are also available in CDS view extensions:
" extend view entity C_SalesOrderTp with {
" SalesOrder.YY1_ApprovalRequired_SDH,
" SalesOrder.YY1_DEWAProjectCode_SDH
" }
" In OData V4: automatically exposed as
" GET /sap/opu/odata4/sap/api_salesorder/srvd/sap/api_salesorder/0001/SalesOrder?
" $select=SalesOrder,YY1_ApprovalRequired_SDHOData V4 API Exposure
Custom fields are automatically exposed in the released SAP OData V4 APIs without any additional configuration. They appear as YY1_-prefixed properties on the entity.
// Custom fields automatically available in released OData API
// GET https://s4h-system/sap/opu/odata4/sap/api_salesorder/srvd/...
// /SalesOrder(SalesOrder='0000000001')?$select=SalesOrder,YY1_DEWAProjectCode_SDH
{
"@odata.context": "...",
"SalesOrder": "0000000001",
"SoldToParty": "CUST001",
"TotalNetAmount": "750000.00",
"TransactionCurrency": "AED",
"YY1_DEWAProjectCode_SDH": "PRJ-2025-WATER",
"YY1_ApprovalRequired_SDH": true,
"YY1_VATCategory_SDH": "S"
}DEWA Enterprise Implementation
- Custom Fields Implemented
- 23
- Business Contexts Used
- 8
- Fields via Sales Order Header
- 3
- Fields via Purchase Order Header
- 3
- Fields via Business Partner
- 2
- All fields in standard Fiori apps
- Yes
Best Practices
Prefix all custom fields with YY1_ — the SAP-standard customer namespace that guarantees upgrade safety across all S/4HANA releases.
Keep to 5–6 custom fields per UI section to avoid cluttering standard Fiori apps. Group related fields into named sections.
Use dropdown Code Lists wherever possible to enforce data quality and enable consistent reporting. Free text fields are hard to report on.
Document every custom field in a central Extension Register (Cloud ALM or spreadsheet): field name, business context, owner, purpose, and data classification.
Verify each custom field appears correctly in all relevant OData V4 API calls, including $select and $filter operations, before transporting to production.