且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SAP Cloud Platform上Fiori launchpad tile的读取原理

更新时间:2022-08-25 11:04:05

SAP Cloud Platform上Fiori launchpad tile的读取原理

SAP Cloud Platform上Fiori launchpad tile的读取原理SAP Cloud Platform上Fiori launchpad tile的读取原理

{
"ID": "70c4b7f1-5579-4517-bc09-e7231f5add96-1426085327112",
"packageID": "",
"objectName": "",
"type": "chips.tiles.applauncherdynamic.DynamicTile",
"templateProperties": [
{
"key": "navigation_target_url",
"value": "#flp-runApp?html5App=cuscrmopportunity&SAPUI5.Component=cus.crm.opportunity&url=/"
},
{
"key": "formFactor",
"value": "{"desktop":true,"tablet":true,"phone":true}"
},
{
"key": "service_url",
"value": "/sap/opu/odata/sap/CRM_OPPORTUNITY/Opportunities/$count"
},
{
"key": "sap.hana.uis.flp.app.intentSemanticObject",
"value": ""
},
{
"key": "sap.hana.uis.flp.app.intentAction",
"value": ""
},
{
"key": "navigation_component_url",
"value": "/"
},
{
"key": "service_refresh_interval",
"value": "300"
},
{
"key": "navigation_component_name",
"value": "cus.crm.opportunity"
},
{
"key": "allow_unknown_parameters",
"value": "true"
},
{
"key": "tile_size",
"value": "1x1"
},
{
"key": "html5_application_name",
"value": "cuscrmopportunity"
},
{
"key": "sap.hana.uis.flp.app.type",
"value": "SAP_UI5_Component"
},
{
"key": "display_icon_url",
"value": "sap-icon://Fiori2/F0012"
},
{
"key": "display_title_text",
"value": "My Opportunities"
}
]
},

SAP Cloud Platform上Fiori launchpad tile的读取原理

SAP Cloud Platform上Fiori launchpad tile的读取原理

SAP Cloud Platform上Fiori launchpad tile的读取原理

SAP Cloud Platform上Fiori launchpad tile的读取原理

CREATE PROCEDURE UIS.GET_APPSITE(IN PACKAGE_ID NVARCHAR(256), IN OBJECT_NAME NVARCHAR(256), OUT APPSITE_DATA GET_APPSITE_TABLE_TYPE)
LANGUAGE SQLSCRIPT
SQL SECURITY DEFINER
DEFAULT SCHEMA UIS
READS SQL DATA AS
internal_site_id integer;
ws_count integer;
session_usr varchar(256);
locale nvarchar(256);
BEGIN
internal_site_id := -1;
SELECT count(*) into ws_count FROM "_SYS_RT"."_UIS_APPSITES" WHERE PACKAGE_ID LIKE :package_id AND OBJECT_NAME LIKE :object_name;
IF :ws_count > 0 THEN
SELECT INTERNAL_SITE_ID INTO internal_site_id FROM "_SYS_RT"."_UIS_APPSITES" WHERE PACKAGE_ID LIKE :package_id AND OBJECT_NAME LIKE :object_name;
END IF;
select session_context('LOCALE') INTO locale from SYS.dummy;
session_usr := SESSION_USER;
    APPSITE_DATA =
        SELECT
            site_name,
            site_layout,
            pg_layout_id,
            pg_id,
            pg_name,
            pg_layout,
            wg_layout_id,
            wg_id,
            wg_name,
            src,
            icon,
            type as wg_type,
            key,
            value,
            parent_page_id,
            'site' as record_type
        FROM "UIS"."sap.hana.uis.db::UIS_APPSITES_DATA_VIEW"
        WHERE INTERNAL_SITE_ID = :internal_site_id


        UNION ALL

        select
            NULL as site_name,
            NULL as site_layout,
            NULL as pg_layout_id,
            NULL as pg_id,
            NULL as pg_name,
            NULL as pg_layout,
            NULL as wg_layout_id,
            wg_id,
            NULL as wg_name,
            NULL as src,
            NULL as icon,
            NULL as wg_type,
            key,
            value,
            NULL as parent_page_id,
            'userwidgetprops' as record_type
        FROM "_SYS_RT"."_UIS_USER_WIDGET_PROPERTIES"
        WHERE INTERNAL_SITE_ID like :internal_site_id AND USER_NAME LIKE :session_usr

        UNION ALL

        select
            NULL as site_name,
            NULL as site_layout,
            NULL as pg_layout_id,
            NULL as pg_id,
            NULL as pg_name,
            NULL as pg_layout,
            NULL as wg_layout_id,
            NULL as wg_id,
            NULL as wg_name,
            NULL as src,
            NULL as icon,
            NULL as wg_type,
            text_id as key,
            content as value,
            NULL as parent_page_id,
            'translations' as record_type
            from _SYS_REPO.TEXT_ACCESSOR(:package_id, :object_name, 'xsappsite', :locale);


END;