Custom Fields
F1481
No-Code
YY1

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

Custom Field Extension Lifecycle
Rendering diagram…

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 ContextStandard ObjectCustom Field Examples
SalesOrderHeaderI_SalesOrderProject Code, Approval Level, VAT Category
SalesOrderItemI_SalesOrderItemDEWA Material Group, Special Handling
PurchaseOrderHeaderI_PurchaseOrderDEWA Cost Center, Procurement Category
CustomerI_BusinessPartnerBasicCustomer Tier, UAE TRN Number
SupplierI_SupplierBasicSupplier Grade, Local Content %
BillingDocumentHeaderI_BillingDocumentInvoice Routing Code
PlantBasicI_PlantBasicDEWA Region Code, Plant Type
MaterialBasicI_ProductBasicTextDEWA Item Category, Asset Class

Custom Field Types

Text (String)

Free text or dropdown with fixed values. Supports length 1–1333 characters.

Amount

Decimal with automatic currency reference field linkage.

Quantity

Decimal with unit of measure linkage (UoM field auto-created).

Date

Date picker with optional range validation rules.

Boolean

Checkbox field — displayed as toggle in Fiori Elements.

Code List

Reference to a maintained value list (configuration table). Enforces data quality.

Custom Field Logic — Rule Builder

No ABAP Required
The Rule Builder is a visual, no-code environment inside Fiori App F1481. Business users define condition-action rules without any ABAP syntax.
Conditional required
IF YY1_ContractType = 'EXTERNAL' THEN YY1_VendorRef.REQUIRED = TRUE
Validation with error
IF YY1_ContractValue > 500000 THEN raise error 'Requires Director Approval'
Default value
IF Country = 'AE' THEN YY1_Currency = 'AED'
Field visibility
IF YY1_ProcCategory = 'LOCAL' THEN YY1_LocalContent.VISIBLE = TRUE

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.

abap
" 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_SDH

OData 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.

json
// 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
Sales Order Header
YY1_ProjectCode (DEWA Project Code), YY1_VATTreatment, YY1_ApprovalStatus
Purchase Order Header
YY1_CostCenter (DEWA Cost Center), YY1_ProcCat, YY1_LocalContent (%)
Business Partner
YY1_TradeLicense (UAE Trade License Number), YY1_TRNNumber (UAE VAT TRN)

Best Practices

Use the YY1_ namespace

Prefix all custom fields with YY1_ — the SAP-standard customer namespace that guarantees upgrade safety across all S/4HANA releases.

Limit fields per Business Context

Keep to 5–6 custom fields per UI section to avoid cluttering standard Fiori apps. Group related fields into named sections.

Prefer Code Lists over free text

Use dropdown Code Lists wherever possible to enforce data quality and enable consistent reporting. Free text fields are hard to report on.

Maintain an Extension Register

Document every custom field in a central Extension Register (Cloud ALM or spreadsheet): field name, business context, owner, purpose, and data classification.

Test OData exposure before go-live

Verify each custom field appears correctly in all relevant OData V4 API calls, including $select and $filter operations, before transporting to production.

Common Pitfalls

Duplicating standard fields
Creating custom fields for data already available in S/4HANA standard (e.g. adding "Customer Country" when it already exists on the BP). Always check standard fields first.
Wrong Business Context selected
Choosing the wrong Business Context causes the field to appear on the wrong document type or not at all. Verify the Business Context maps to the exact Fiori app and OData entity you intend.
Field defined but not visible in UI
A custom field must be explicitly assigned to a UI section in the Custom Fields app. Defining the field alone does not make it appear on any Fiori screen.
Not added to output forms
Custom fields in OData do not automatically appear on printed forms or email outputs. Each output form (PDF template) must be separately updated via Output Management configuration.

Security Considerations

Data Protection
Custom Fields may contain sensitive business data (financial amounts, personal identifiers). Apply UAE PDPL classification to any field containing personal data. Restrict Fiori App F1481 access to designated Key Users only — not all business users. Custom fields exported via OData V4 inherit the standard API's authorisation checks, but additional field-level masking may be required for PDPL-sensitive fields.