Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Case difference between table fields and fields in output Table type

$
0
0

Hi Experts,

     I have created a Table type through CDS. The definition is

type tt_bp_addresses {

   PartnerId : String(10);

   PartnerRole : String(3);

  EmailAddress : String(255);

  CompanyName : String(80);

  AddressId : String(10);

  City : String(40);

  PostalCode : String(10);

  Street : String(60);

};

 

When the CDS file is activated, a table type is created with all fields in UPPERCASE.

 

I have a procedure created.

 

PROCEDURE "openSAPHANA_prj1"."openSAP_Proj_1.model::get_bp_addresses_by_role_sql" (

  in PartnerRole nvarchar(3),

  out bp_addresses openSAPHANA_prj1."openSAP_Proj_1.data::datadef.tt_bp_addresses"

)

  LANGUAGE SQLSCRIPT

  SQL SECURITY INVOKER

  --DEFAULT SCHEMA <default_schema_name>

  READS SQL DATA AS

BEGIN

 

bp_addresses = Select a."PartnerId", a."PartnerRole", a."EmailAddress", a."CompanyName",

  a."AddressId", b."City", b."PostalCode", b."Street"

  from "SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::businessPartner" as a

  inner join "SAP_HANA_EPM_DEMO"."sap.hana.democontent.epm.data::addresses" as b

  on a."AddressId" = b."AddressId"

  where a."PartnerRole" = :PartnerRole;

 

END;

 

bp_address is of type tt_bp_address.

 

When I try to activate the Procedure, i get an error msg .

Could not create catalog object: return type mismatch; Attribute name "PARTNERID"  different from Attribute name: "PartnerId" : line 15 col 2 (at pos 410)

 

I understand that this has to do with the difference between the cases, but my question is can we create a Table Type in CDS with field names in mixed case. Since we cannot change the table field names, whats the solution then ?

 

Thanks in Advance,

Neeraj


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>