on 2024 Nov 07 1:53 PM
Hi!
I'd like to extend my CAP model with more assotiations ( which I'll use in my custom code ).
For example something like this:
using { projects } from './projects';
@abap.ddic.table: ZPROJECTS
annotate projects with {
@ABAP.ddic: {
dataElement: {
domain: {
name: 'ZPROJECT_ID',
description: 'Project Id',
dataType: CHAR,
length: 32
}
}
}
id;
Is there a way to register a custom schema within the extension, that's how it will also see my new annotations and will enable code suggestions or enforce schema validations?
Thanks!
Request clarification before answering.
Hi @catano Peter
So i have a crazy idea to support deployment of CAP model to ABAP,
For that purpose I'd like to compile abapgit / gcts artifacts instead of hdbtable/hdbview.
I find it important to have a dedicated files with annotations.
So i do not need these annotations to be presented in the Odata metadata. Instead I would prefer if not.
What I'm going to do is to load this model with cds.load( ) and write an own compiler of abap files, which we can deploy later using corresponding tools ( abapGit or gCTS ).
However to generate ABAP DDIC artifacts we need to have certain attributes such as
- table name and its properties
- data element name and its properties
- domain name
and more..
If it works - I see how CAP would save hours of our work for data modeling. Especially with supported by AI which is text-based
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @pepl,
I see, that seems to be a good idea.
So you imagine something like cds deploy --to abap, right? I'm not familiar with the structure and data content of abapgit / gcts files, but I'm quite sure that a deterministic mapping could be created for cap schema -> abapgit / gcts. I'm not sure if it is possible to add such thing without modifing the cds library itself, but knowing that exact mapping the conversion is possible, and I can imagine a VSCode extension to do such task.
Regards, Peter
User | Count |
---|---|
77 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.