Building hana-opensap-cloud-2020 Part 5: Cross Schema Access

Поділитися
Вставка
  • Опубліковано 7 лис 2024

КОМЕНТАРІ • 19

  • @gautamkrishnan9982
    @gautamkrishnan9982 4 роки тому +1

    Hi Thomas, what's with the quoted identifier literals '![CARRID]'? What does it mean? Why is it used?

    • @sapdevs
      @sapdevs  4 роки тому

      That's the new, recommended way to create quoted literals in CAP instead of using the quote marks. Just safer and easier to parse as quote marks are already used elsewhere in the syntax. [Thomas Jung]

    • @gautamkrishnan9982
      @gautamkrishnan9982 4 роки тому +1

      @@sapdevs So it should always be in CAPS is it? or can we use lower case letters?

  • @ramonlee
    @ramonlee 3 роки тому

    Processing "cfg/SFLIGHT.hdbgrants"...
    Error: service ServiceName_1 not found; the service definition does not exist.

  • @FreshYoungLeaves
    @FreshYoungLeaves 4 роки тому +1

    It should provide way to "create user provided service" from artefact
    Why didn't you create user provided service from single artefact without CF CLI?

    • @sapdevs
      @sapdevs  4 роки тому

      Sorry - not sure what you mean by that [Thomas Jung]

  • @ramonlee
    @ramonlee 3 роки тому

    when i run cds deploy, it generates a default-env.json from the gen folder and losing the configurations

    • @sapdevs
      @sapdevs  3 роки тому

      The multiple comments here are getting fragmented and I'm not sure I'm following. But yes using the cds deploy command currently deletes the entire gen folder and overwrites the default-env.json each time. If you are going to use secondary connections, I'd suggest changing the target to not use the /gen folder in the root but generate the results into the target folders as described here: developers.sap.com/tutorials/hana-cloud-cap-create-project.html#44564bd6-d42f-4f70-9dc3-b2cf3ec3f438 This will also make your project compatible with the new HANA tooling in the Business Application Studio as well.

  • @binpath
    @binpath 3 роки тому

    Hi Thomas, I did the CROSS ACCESS SCHEMA with VBAP replicated table, but trying to do CDS SERVE it gives me errors with OData property name: "/BEV1/SRFUND" must start with a letter or underscore, followed by at most 127 letters, underscores or digits (in entity:"VBAP"/element:"/BEV1/SRFUND"). The weird thing is that i haven't put in service.cds the entity to be exposed. What can i be doing wrong?

    • @sapdevs
      @sapdevs  3 роки тому

      You aren't using that entity in any service or view within that service; yet it throws that error? And when you created the synonym did you simplify the name of the synonym compared to the target entity? Some more details about what is in your project and what error is getting thrown and from where, it would be helpful.

    • @binpath
      @binpath 3 роки тому

      @@sapdevs No i'm not using it entity in any service yet, i just added the using syntax in the schema.cds. The question is more about hana-cli inspectTable SCHEMA VBAP it returns that attribute from the R/3.

    • @binpath
      @binpath 3 роки тому

      I'm sorry is not the VBAP that is giving me the issue is the KNA1, with the following attributes
      ![/VSO/R_PALHGT] : Decimal(13, 3) not null @title : '/VSO/R_PALHGT';
      ![/VSO/R_PAL_UL] : String(3) not null @title : '/VSO/R_PAL_UL';
      ![/VSO/R_PK_MAT] : String(1) not null @title : '/VSO/R_PK_MAT';
      ![/VSO/R_MATPAL] : String(18) not null @title : '/VSO/R_MATPAL';
      ![/VSO/R_I_NO_LYR] : String(2) not null @title : '/VSO/R_I_NO_LYR';
      ![/VSO/R_ONE_MAT] : String(1) not null @title : '/VSO/R_ONE_MAT';
      ![/VSO/R_ONE_SORT] : String(1) not null @title : '/VSO/R_ONE_SORT';
      ![/VSO/R_ULD_SIDE] : String(1) not null @title : '/VSO/R_ULD_SIDE';
      ![/VSO/R_LOAD_PREF] : String(1) not null @title : '/VSO/R_LOAD_PREF';
      ![/VSO/R_DPOINT] : String(10) not null @title : '/VSO/R_DPOINT';

    • @sapdevs
      @sapdevs  3 роки тому

      @@binpath - I see now - I think it just that the conversion tool in hana-cli isn't replacing the forward slash in the table name which is allowed in the DB but not in CAP CDS. But even just replacing the names then they won't match the underlying DB object. For the cds.persistence.exists to work the naming has to be able to match. The recommendation in this case is that you should actually build a HANA native view on top of the table with the naming conflicts and simply the names in the view. Only then will the view be compatible with CDS. cap.cloud.sap/docs/advanced/hana#context -- In this case, it’s necessary to introduce an additional database object (a synonym or a view) on top of the existing database object and construct the facade entity for this newly introduced mapping object. [Thomas Jung]

    • @binpath
      @binpath 3 роки тому

      @@sapdevs Thanks Thomas, I really appreciate it! I created the hdbview artifact and with the hana-cli inspectView I created the entity. Two QQ, the command put every attribute as key is that really necessary? Are you in the slack SAP mentors & Friends CAP channel?

  • @ramonlee
    @ramonlee 3 роки тому

    {
    "ServiceName_1": {
    "object_owner": {
    "roles": [
    "SFLIGHT_CONTAINER_ACCESS"
    ]
    },
    "application_user": {
    "roles": [
    "SFLIGHT_CONTAINER_ACCESS"
    ]
    }
    }
    }

  • @erikpalmen4565
    @erikpalmen4565 4 роки тому

    Hi Thomas great series. I wanted to create a Odata service in top of the Sflight views you created in this episode. But its seems Iam stuck with the following error.
    259
    invalid table name: Could not find table/view SFLIGHT_SFLIGHTVIEW in schema B3664A89220F4D708C8EA74872014BC: line 1 col 306 (at pos 305)
    Could you give a hint or een example of the service.cds
    thanks Erik

  • @ramonlee
    @ramonlee 3 роки тому

    "SERVICE_REPLACEMENTS": [
    {
    "key": "ServiceName_1",
    "service": "CROSS_SCHEMA_SFLIGHT"
    },
    {
    "key": "hdi-user-service",
    "service": "hana-opensap-cloud-2020-user-db"
    }
    ],