namespace SQLHANA.hanaproject.epmmodel.tableschemacreations;
@Schema: 'ZSCHEMA_NEWQ'
context ZMASTERDETAILS{
@Catalog.tableType : #COLUMN
Entity Addresses {
key ADDRESSID: String(20);
CITY: String(20);
POSTALCODE: String(5);
STREET: String(20);
BUILDING: String(20);
COUNTRY: String(3);
REGION: String(4);
ADDRESSTYPE: String(2);
LATITUDE: Double;
LONGITUDE: Double;
};
@Catalog.tableType : #COLUMN
Entity BusinessPartner {
key PARTNERID: String(5);
PARTNERROLE: String(3);
EMAILADDRESS: String(30);
PHONENUMBER: String(10);
FAXNUMBER: String(10);
ADDRESSES: Association to Addresses null;
COMPANYNAME: String(80);
CURRENCY: String(3);
};
define view BuyerView as SELECT from ZMASTERDETAILS.BusinessPartner {
PARTNERID as "Id",
EMAILADDRESS as "EmailAddress",
COMPANYNAME as "CompanyName",
ADDRESSES.CITY as "City",
ADDRESSES.POSTALCODE as "PostalCode",
ADDRESSES.STREET as "Street",
ADDRESSES.BUILDING as "Building",
ADDRESSES.COUNTRY as "Country",
ADDRESSES.REGION as "Region"
} where PARTNERROLE = 'RO1';
}
schema= "ZSCHEMA_NEWQ";
start_with= 1000000100;
maxvalue= 1999999999;
nomaxvalue=false;
minvalue= 1;
nominvalue=true;
cycles= false;
depends_on_table= "SQLHANA.hanaproject.epmmodel.tableschemacreations::ZMASTERDETAILS.BusinessPartner";
FUNCTION "ZSCHEMA_NEWQ"."SQLHANA.hanaproject.epmmodel.functions::apply_discount" (im_price decimal(15,2),
im_discount decimal(15,2) )
RETURNS result decimal(15,2)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER AS
BEGIN
result := :im_price - ( :im_price * :im_discount );
END;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |