Your issue involves three interconnected areas: CDS annotation usage, OData metadata refresh, and SAP Analytics Cloud integration requirements.
CDS Annotation Usage for Custom Fields:
CDS view extensions require explicit analytical and OData annotations to be consumable by SAC. Your current extension lacks critical annotations:
@AbapCatalog.sqlViewAppendName: 'ZCUSTPS_EXT'
@Analytics.dataExtraction.enabled: true
@OData.publish: true
extend view I_ProjectStdWBSElement with Z_PS_Custom_Fields {
@Analytics.dimension: true
@EndUserText.label: 'Custom Status'
@UI.lineItem: [{position: 100}]
ProjectElement.ZZ_CustomStatus,
@Analytics.dimension: true
@EndUserText.label: 'Risk Level'
@UI.lineItem: [{position: 110}]
ProjectElement.ZZ_RiskLevel
}
The @Analytics.dataExtraction.enabled and @Analytics.dimension annotations are essential for SAC to recognize these as reportable fields. Without them, the fields exist in the view but aren’t exposed to analytical consumers.
OData Metadata Refresh Procedure:
Simply refreshing in /IWFND/MAINT_SERVICE isn’t sufficient for CDS extensions. Follow this complete refresh sequence:
-
Activate CDS Extension: Transaction SE80 → Activate Z_PS_Custom_Fields
-
Regenerate OData Service:
Transaction: /IWBEP/REG_SERVICE
Service: Find service for I_ProjectStdWBSElement
Action: Re-generate Runtime Objects
- Clear Metadata Cache:
Transaction: /IWFND/MAINT_SERVICE
Service: Your project CDS service
Action: ICF Node → Invalidate Cache
- Verify Metadata: Use /IWFND/GW_CLIENT to call $metadata and confirm custom fields appear in the XML response.
SAP Analytics Cloud Integration Requirements:
SAC live connections to S/4HANA require specific exposure patterns:
-
Service Exposure: The CDS view must be exposed through a proper service binding. Check transaction /IWBEP/REG_MODEL to verify your CDS view is registered with the correct model and entity set name.
-
Analytical Query Layer: For analytical scenarios, CDS views should be consumed through analytical queries. Create a query in transaction SQ01 or RSRT that includes your custom fields:
- Base it on CDS view I_ProjectStdWBSElement
- Include custom fields ZZ_CustomStatus and ZZ_RiskLevel in field selection
- Publish the query for external consumption
-
SAC Connection Configuration: In SAC, when creating the live data connection:
- Use connection type “SAP S/4HANA Live Data Connection”
- In the model creation, select “Query” as source type, not direct CDS view
- Browse to your analytical query that includes the custom fields
Technical Validation Steps:
- Test OData Exposure:
Transaction: /IWFND/GW_CLIENT
Service: Your CDS service
Entity Set: ProjectStdWBSElement
Request: GET with $select=ZZ_CustomStatus,ZZ_RiskLevel
If this returns data, OData exposure works.
-
Check Field Catalog: Transaction SE11 → Display view I_ProjectStdWBSElement → Verify custom fields are in append structure.
-
Verify Authorization: Ensure SAC technical user has S_TABU_NAM authorization for table PROJ (project system) and S_RFC for the OData function modules.
Alternative Approach - Custom Analytical Query:
If direct CDS extension doesn’t work, create a custom analytical query:
Define Query: Z_PS_WBS_CUSTOM based on I_ProjectStdWBSElement
Include: All standard fields + custom fields
Annotate with: @Analytics.query: true
Publish: Via InA protocol for SAC consumption
This gives you full control over field exposure and is the recommended pattern for complex custom reporting scenarios.
Root Cause:
Your CDS extension likely lacks @Analytics annotations required for SAC analytical consumption. Even with OData exposure, SAC’s live connection specifically looks for analytical metadata. Implement the annotated extension above, regenerate the OData service completely, and create an analytical query layer for SAC to consume. This architectural pattern ensures custom fields are properly exposed through all layers of the integration stack.
This draft is based on general SAP S/4HANA knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.