on 2021 Jun 21 8:30 PM
Hi,
Using the SAP HANA Academy series by philip.mugglestone on Building Extensions for S/4HANA Cloud using APIs and Events and I get errors after creating the extension app in BAS, using the provided Yeoman generator.
Not sure if this is due to the BAS on the BTP trial as I had other issues with getting the Extension installed. Anyone else had this issue?
-Phillip
Request clarification before answering.
Hi Phillip,
Thanks for watching the SAP HANA Academy video tutorials and reporting the issue.
It seems that CAP no longer allows the using statement inside namespace or context blocks.
You can work around this by moving using statement(s) to the top of db/data-model.cds so that they're outside of any namespace or context blocks as follows:
using { cuid, managed } from '@sap/cds/common';
context apps4hcext.db {
entity Sales {
key ID : Integer;
region : String(100);
country : String(100);
org : String(4);
amount : Integer;
comments : String(100);
};
entity SalesOrdersLog : cuid, managed {
salesOrder : String;
incotermsLocation1 : String;
};
}
@cds.persistence.exists
@cds.persistence.calcview
entity CV_SALES {
key REGION : String(100);
AMOUNT : Integer;
}
The SAP HANA Academy yeoman generator has been updated accordingly (v0.0.30) so the issue should hopefully not occur in the future.
I also noticed in BAS when when you filter extensions on partners the SAP Partner Engineering plugins are not showing. We'll look into that. In the meantime an alternative approach is to open the Template Wizard and use the Explore and Install Generators... option (search on saphanacademy-cap).
Thanks,
Philip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Elizabeth,
Yes, using the generator.
-Phillip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phillip,
Are you using the Hana academy yoman generator?
Best Regards,
Lisi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.