cancel
Showing results for 
Search instead for 
Did you mean: 

RAP on Dynamic Condition Tables – Draft Enablement Challenge

05-27-2025 4:40 PM
ankahit Participant
1359 views 3 comments
0 Likes
SAP Managed Tags
Labels
ABAP RESTful Application Programming ModelCDSCDS ViewsCL_CSP_ACT_DRAFT_OP_ON_DBDraftFiori ElementsQueryRAP
Subscribe

Hello everyone,

I’m working on a requirement where the underlying tables are dynamic (condition tables). I need to build a RAP application on top of this setup. However, I'm facing a challenge: I can't enable draft functionality because the CDS view is a query implemented by a class, and draft is not supported in this scenario.

Draft functionality is crucial for my use case. Does anyone have experience with a similar setup or suggestions on how to handle this? Any ideas on enabling draft or dynamically handling such data in a RAP application would be highly appreciated.

Thanks in advance!

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

HenrikeGroetecke
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello,

Thank you very much for your question. I'm very sorry for the late response.

Can you please check whether the following information (GenAI was used to help generate this content) solves the issue?

When dealing with dynamic tables in a RAP application, especially when draft functionality is crucial, there are several considerations and approaches you can explore:

  1. Draft Functionality in RAP:

  2. Alternative Approaches:

    • Re-evaluate the CDS View Implementation: Consider if the dynamic nature of your tables can be handled differently. If possible, restructure the CDS view to directly expose the database tables, allowing draft functionality.
    • Custom Draft Handling: Implement custom logic to simulate draft behavior. This involves manually managing temporary data storage and retrieval, mimicking the draft operations.
    • Use of Side Effects: If draft functionality cannot be enabled, consider using side effects to update parent entries based on child entries dynamically.
  3. Considerations for Dynamic Data:

    • Dynamic Data Handling: Ensure that your application logic can handle changes in the underlying table structure. This might involve using dynamic SQL or flexible data models.
    • Testing and Validation: Thoroughly test the application to ensure that dynamic data handling does not introduce errors or inconsistencies.
  4. Consult Documentation and Community:

    • Review SAP documentation on RAP and draft functionality for any updates or alternative methods.
    • Engage with the SAP community to gather insights and experiences from other developers who might have faced similar challenges.

By exploring these approaches, you can find a suitable solution to enable draft functionality or effectively manage dynamic data in your RAP application.

Kind regards, Henrike