cancel
Showing results for 
Search instead for 
Did you mean: 

BAS, Path does not exist CDS error for HANA Academy series on extensions

Phillip_P
Product and Topic Expert
Product and Topic Expert
0 Kudos
392

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

Accepted Solutions (1)

Accepted Solutions (1)

PhilipMugglestone
Product and Topic Expert
Product and Topic Expert

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

Answers (2)

Answers (2)

Phillip_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Elizabeth,

Yes, using the generator.

-Phillip

Lisi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Phillip,

Are you using the Hana academy yoman generator?

Best Regards,

Lisi