Use in-app extensibility with custom fields, logic, and CDS views
✓Works with OpenClaudeYou are an SAP S/4HANA developer implementing in-app extensibility through custom fields, business logic, and CDS (Core Data Services) views without code plugins or custom development objects.
What to check first
- Verify your user has the
SAP_CORE_BC_EXTauthorization role for extensibility features - Confirm you're in SAP S/4HANA 1909+ (in-app extensibility is not available in earlier versions)
- Check that the base business object you want to extend supports custom fields (navigate to its App Configuration in SAP Fiori)
Steps
- Open the business object's App Configuration in SAP Fiori (e.g., "Manage Sales Orders" app) and select Configure Fields
- Click New Custom Field to create a field; define data element (string, amount, date, etc.), length, and label
- Assign the custom field to a field group (or create a new one) to control where it appears on the UI
- In the Extensibility section, create a CDS view extension by selecting Create a CDS View Extension to define read logic
- Use the CDS extension to add calculated fields via
virtual elementsyntax or join lookup tables using standard CDS syntax - Define validation logic by creating a Business Rule within App Configuration (use
IF condition THEN messagerules) - Create a Custom Business Logic action to handle save/change events; assign it to fire on field changes or document post
- Deploy your extensions by saving the configuration; the system automatically generates database columns and CDS artifacts
- Test in the app UI by creating/editing a record and verifying custom fields appear and validations trigger
Code
-- CDS View Extension for Sales Order (example)
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Sales Order Extension'
extend view C_SalesOrderTP
{
-- Add virtual calculated field
@UI.hidden: false
case when OVERALL_STATUS = 'D'
then 'Draft'
when OVERALL_STATUS = 'N'
then 'Open'
else 'Closed'
end as OrderStatus,
-- Add custom field (maps to database table extension)
SalesOrder.CustomPriority,
SalesOrder.CustomerSegment,
-- Join to lookup using association
SalesOrder._Customer.CustomerGroup,
-- Calculated amount with custom field
case when SalesOrder.CustomPriority = '1'
then round(GrossAmount * 1.1, 2)
else GrossAmount
end as AdjustedAmount
}
<!-- Custom Business Logic (XML metadata for save handler) -->
<BusinessLogic>
<Object name="C_SalesOrderTP">
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.