SAP-samples / cloud-abap-rap

This repository contains several examples how to develop with the ABAP RESTful Application Programming Model (RAP) in SAP BTP, ABAP environment.
Apache License 2.0
226 stars 62 forks source link

Managed scenario: UUID key field determination fails with key includes #33

Open attilaberencsi opened 3 months ago

attilaberencsi commented 3 months ago

Hi Andre,

when we are creating a managed UUID key based project/entity, the UUID determination fails when the key field is defined with an include structure. image

As result the UUID fields get disabled image

I did a quick debug and noticed that one of the checks/determinations is here, but the fields from the include structure despite being a keys are not recognized.

image

The corresponding table defintion looks like this:

define table /hec4/a_td_ds {

  key client      : abap.clnt not null;
  include /hec4/s_techdata_root;
  support_regions : boole_d;
  countries       : boole_d;
  include /hec4/s_admin_data;

}

If we move the UUID field to the top like You see below, the UUID field is recognized properly:

define table /hec4/a_td_ds {

  key client      : abap.clnt not null;
  key entity_key  : sysuuid_x16 not null;
  ref             : include /hec4/s_techdata_ref_keys;
  deployment_date : /hec4/de_deployment_date;
  deployed        : /hec4/de_techdata_deploy_stat;
  support_regions : boole_d;
  countries       : boole_d;
  include /hec4/s_admin_data;

}

Started to analyze Your great tool, but I would need have more time to be able to create a proper pull request which is correct fix to this across the solution, and does not harm anything at the same time. I'd like rather to ask You to have a look on this.

Thank you !