Skip to content

feat: add CDS and RAP examples#3

Open
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
gt/shadow/39bc1247
Open

feat: add CDS and RAP examples#3
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
gt/shadow/39bc1247

Conversation

@kilo-code-bot
Copy link
Copy Markdown

@kilo-code-bot kilo-code-bot bot commented Apr 4, 2026

Summary

Add Core Data Services (CDS) and RESTful ABAP Programming (RAP) examples to the repository.

CDS Examples

  • ZAGE_CDS_SAMPLE: Basic CDS view with virtual element
  • ZAGE_CDS_PROJECTION: CDS projection view
  • ZAGE_DDLX_SAMPLE: CDS metadata extension with UI annotations

RAP Examples

  • ZAGE_RAP_SAMPLE: RAP behavior definition with CRUD operations
  • ZAGE_C_RAP_SAMPLE: RAP projection view (consumption view)
  • ZCL_AGE_RAP_SAMPLE: RAP behavior implementation class

@kilo-code-bot
Copy link
Copy Markdown
Author

kilo-code-bot bot commented Apr 4, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 2
WARNING 0
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src/rap/zage_rap_sample.bdef.asbdef 8 ETag field LocalLastChangedAt is not defined in CDS views - will cause runtime error
src/rap/zage_rap_sample.bdef.asbdef 18 Validation validateData is not implemented in ZCL_AGE_RAP_SAMPLE class
Other Observations (not in diff)

Issues found in related files that are part of this PR but cannot receive inline comments:

File Issue
src/ddic/ddls/zage_cds_sample.ddls.asddls Line 7 uses mandt (obsolete client field) which doesn't exist in base table ZAGE_TABL - should reference CLIENT
src/ddic/ddls/zage_cds_projection.ddls.asddls Line 7 uses lowercase client - should match the case-sensitive field reference
src/rap/zcl_age_rap_sample.clas.abap Implementation class is empty stub - if_rap_query_provider~select just returns without any logic
Files Reviewed (14 files)
  • src/ddic/ddls/zage_cds_projection.ddls.asddls
  • src/ddic/ddls/zage_cds_projection.ddls.xml
  • src/ddic/ddls/zage_cds_sample.ddls.asddls
  • src/ddic/ddls/zage_cds_sample.ddls.xml
  • src/ddic/ddlx/zage_ddlx_sample.ddlx.asddlxs
  • src/ddic/ddlx/zage_ddlx_sample.ddlx.xml
  • src/rap/zage_c_rap_sample.ddls.asddls
  • src/rap/zage_c_rap_sample.ddls.xml
  • src/rap/zage_rap_sample.bdef.asbdef
  • src/rap/zage_rap_sample.bdef.xml
  • src/rap/zage_rap_sample.sbtt.xml
  • src/rap/zcl_age_rap_sample.clas.abap
  • src/rap/zcl_age_rap_sample.clas.xml

Note: This PR adds CDS and RAP example objects. The critical issues will cause runtime errors when the RAP behavior is executed. The etag field must be added to the CDS views, and the validation method must be implemented.


Reviewed by minimax-m2.5-20260211 · 248,907 tokens

Shadow (gastown) added 2 commits April 4, 2026 23:25
- Fix CDS view to use 'key client as Client' instead of 'key mandt as Client'
- Add Name and Description fields to table and CDS views for meaningful RAP example
- Implement validation method for validateData in behavior definition
- Implement if_rap_query_provider~select with actual query logic
- Add business data fields (Name, Description) to RAP projection view
- Add field control modifiers to behavior definition
- Remove unnecessary 'internal constructor' and 'with additional save'
- Add LocalLastChangedAt field for RAP etag support
- Add trailing newlines to all files

Refs: 23e862e7
…ow/23e862e7

# Conflicts:
#	src/ddic/ddls/zage_cds_projection.ddls.asddls
#	src/ddic/ddls/zage_cds_sample.ddls.asddls
#	src/rap/zage_c_rap_sample.ddls.asddls
#	src/rap/zage_rap_sample.bdef.asbdef
#	src/rap/zcl_age_rap_sample.clas.abap
@kilo-code-bot
Copy link
Copy Markdown
Author

kilo-code-bot bot commented Apr 4, 2026

Rework Changes Addressed

All code review feedback has been addressed:

1. Table structure mismatch (Fixed)

  • Changed key mandt as Client to key client as Client in zage_cds_sample.ddls.asddls
  • Added NAME and DESCRIPTION fields to the table for meaningful business data

2. Missing validation method (Fixed)

  • Added validate_data method to zcl_age_rap_sample.clas.abap
  • Changed validation to use field Name instead of field Client (more meaningful)

3. Empty query provider (Fixed)

  • Implemented if_rap_query_provider~select with actual SELECT logic on zage_tabl

4. RAP projection missing data fields (Fixed)

  • Added Name and Description fields to the RAP projection view

5. Behavior definition improvements (Fixed)

  • Added field ( readonly ) IsActiveEntity
  • Added field ( mandatory : create ) Name
  • Added strict ( 2 ) for enhanced strict typing
  • Removed unnecessary internal constructor and with additional save
  • Added Name and Description to mapping

6. Style/consistency (Fixed)

  • Added trailing newlines to all modified files
  • Added LOCALLASTCHANGEDAT field to table for RAP etag support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants