cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Enable custom fields for Situation Handling (Service Contract Due to Expire Soon)

Ryutaro_Koizumi
Product and Topic Expert
Product and Topic Expert
0 Likes
364

We are currently implementing the Service module in Public Cloud and are facing a requirement to add custom fields to the Situation Handling described in the Help documentation below:
Service Contract Due to Expire Soon | SAP Help Portal


I would like to share the approaches we have considered and the outcomes:

1. Extending the CDS view used by the standard Situation Handling
Our analysis showed that this Situation Handling is based on the CDS view C_SrvcContrItmExpryDetsSitn. However, since this CDS view is not released for extension, adding custom fields is not possible.

2. Implementing a custom Situation Handling based on CDS view I_ServiceContractCube_2
This CDS view is useful because it provides visibility into the remaining time until contract expiration (e.g., 3 weeks before, 2 weeks before).
We attempted to implement a similar custom Situation Handling based on this view; however, the challenge is that it does not expose the “Auto Renewal” indicator. As a result, there is a risk that notifications would be triggered even for contracts that are automatically renewed.

3. Implementing a custom Situation Handling based on CDS view I_SERVICECONTRACTENHCD
This CDS view provides the contract end date, but we encountered the same limitations as in #2.
Additionally, since the date is stored as a DEC type, it is not suitable for conditions such as “NEXT 90 DAYS.”


Based on the above, I would like to ask product development or experts who may have addressed similar requirements:

  • Is there any plan to release C_SrvcContrItmExpryDetsSitn or to enable field extensibility for this CDS view in alignment with custom field extensions?

  • If not, is there a plan to provide templates or sample implementations for custom Situation Handling, similar to those available in other modules?

  • If neither is planned, are there alternative CDS views better suited for this requirement beyond the ones in #2 and #3?
    If not, and a custom CDS view is necessary, which CDS views would you recommend combining to meet this requirement?

We appreciate your support and any guidance you can provide.

Accepted Solutions (0)

Answers (1)

Answers (1)

geronasso
Product and Topic Expert
Product and Topic Expert

 

Service Contract Situation Handling Extension Options

Based on your detailed analysis, I understand the challenges you're facing with extending the standard "Service Contract Due to Expire Soon" situation handling. Let me address your questions systematically:

Current Limitations Analysis

Your assessment is accurate regarding the standard CDS view limitations:

  • C_SrvcContrItmExpryDetsSitn is not released for extension [1]
  • I_ServiceContractCube_2 lacks the Auto Renewal indicator
  • I_SERVICECONTRACTENHCD has date format limitations for time-based conditions

    Recommended Solutions

    Option 1: Custom Situation Object Creation

    Create a custom situation object using the Manage Situation Objects app [1]:

    Step 1: Design Custom CDS View

    • Combine I_ServiceContractCube_2 with contract master data views
    • Include Auto Renewal indicator from service contract header data
    • Convert date fields to appropriate formats for time-based conditions
    • Add your required custom fields

      Step 2: Configure Situation Object

      • Navigate to Manage Situation Objects app [1]
      • Create new situation object with your custom CDS view as the structure
      • Map semantic keys (Contract ID, Item Number) for unique identification
      • Configure value help services for filter conditions [1]

        Step 3: Set Up Events and Actions

        • Define workflow events relevant to contract expiration scenarios
        • Configure actions for situation handling (notifications, approvals, etc.)
        • Link navigation targets to relevant service contract apps

          Option 2: Enhanced CDS View Combination

          Recommended CDS Views to Combine:

          • I_ServiceContractCube_2 (for time calculations)
          • I_ServiceContract (for header-level Auto Renewal indicator)
          • I_ServiceContractItem (for item-level details)
          • Your custom extension fields through appropriate extension views

            Implementation Approach:

             

             
            -- Example structure for custom CDS view
            DEFINE VIEW ZC_ServiceContractExpiry AS SELECT FROM
              I_ServiceContractCube_2 AS cube
              INNER JOIN I_ServiceContract AS header
                ON cube.ServiceContract = header.ServiceContract
              INNER JOIN I_ServiceContractItem AS item
                ON cube.ServiceContract = item.ServiceContract
                AND cube.ServiceContractItem = item.ServiceContractItem
            {
              cube.ServiceContract,
              cube.ServiceContractItem,
              cube.ValidityEndDate,
              header.AutoRenewalIndicator,
              // Add custom fields here
              // Time-based calculations for expiry conditions
            }
            WHERE header.AutoRenewalIndicator = '' // Exclude auto-renewal contracts
             

            Product Development Considerations

            Regarding your specific questions:

            1. C_SrvcContrItmExpryDetsSitn Extension: While I cannot provide definitive roadmap information, consider submitting an enhancement request through SAP Influence channels for releasing this view for extension

            2. Template Availability: Custom situation handling templates are typically provided through the Manage Situation Objects app [1], which offers the framework for creating custom implementations

            3. Alternative Views: The combination approach using I_ServiceContractCube_2 with contract master views appears to be your best option currently

              Implementation Best Practices

              Custom Field Integration:

              • Ensure custom fields are properly exposed through released extension points
              • Use appropriate data types for time-based condition evaluations
              • Implement proper authorization controls for sensitive contract data

                Performance Optimization:

                • Include appropriate indexes on key fields (Contract ID, Expiry Date)
                • Consider data volume and query performance in CDS view design
                • Test with realistic data volumes before production deployment

                  Testing Strategy:

                  • Validate Auto Renewal logic thoroughly
                  • Test time-based conditions (30/60/90 days before expiry)
                  • Verify custom field display and filtering functionality



                    Detailed Implementation Guidance

                    I'd be happy to provide detailed step-by-step guidance for your Service Contract Situation Handling implementation. To give you the most relevant and actionable instructions, could you please specify which aspect you'd like me to focus on:

                    Available Implementation Paths:

                    1. Custom CDS View Creation & Combination

                    • Detailed SQL structure for combining I_ServiceContractCube_2 with master data views
                    • Field mapping and data type conversion techniques
                    • Auto Renewal indicator integration logic

                      2. Custom Situation Object Configuration

                      • Step-by-step walkthrough using Manage Situation Objects app
                      • Semantic key mapping and value help configuration
                      • Event and action setup procedures

                        3. Enhancement Request Structuring

                        • How to format and submit requests for C_SrvcContrItmExpryDetsSitn extension
                        • Required documentation and business justification templates
                        • SAP Influence channel submission process

                          4. Complete End-to-End Implementation

                          • Full development lifecycle from CDS view creation to situation object deployment
                          • Testing procedures and validation checkpoints
                          • Performance optimization and authorization setup
Ryutaro_Koizumi
Product and Topic Expert
Product and Topic Expert

Thank you for your reply.
I'll check your solution and configure the system.
I'll let you know the result!