• Fiori 动态磁贴示例


    1. 动态磁贴配置页面

    2. 服务URL

    2.1 服务URL示例(ODATA GetEntity (Read)方法)

     /sap/opu/odata/sap/ZODATA/GetEntity(par='XXX')
    /sap/opu/odata/sap/YTEST_ODATA_SRV/DynamictileSet(type='1')

    2.2 服务URL接口参数参考

    1. {
    2. “d”: {
    3. icon”: “sap-icon://travel-expense”,
    4. “info”: “Quarter Ends!”,
    5. “infoState”: “Critical”,
    6. “number”: 43.333,
    7. “numberDigits”: 1
    8. “numberFactor”: “k”,
    9. “numberState”: “Positive”,
    10. “numberUnit”: “EUR”,
    11. “stateArrow”: “Up”,
    12. “subtitle”: “Quarterly overview”,
    13. “title”: “Travel Expenses”,
    14. }
    15. }

    Parameter

    Description

    icon

    Enter an sap-icon:// URL, for example sap-icon://cart.

    You can look up the names of the available icons in tile configuration.

    For more information, see Static App Launcher Tiles.

    info

    Text to be displayed at the bottom of the tile.

    infoState

    The color of the tile is adapted according to the value of this property. The precise color depends on the theme that you have selected in UI theme designer.

    Allowed values: Negative, Neutral, Positive, Critical

    number

    Number to be displayed in the top right corner of the tile.

    numberDigits

    Number of digits to be displayed following the decimal separator (decimal point or decimal comma, depending on the language settings).

    numberFactor

    A factor for scaling numbers, for example, for displaying large numbers like 1.000.000 (-> number = 1 and numberFactor=”M”) or for percentages (number = 22.2 and numberFactor = “%”). The scaling is not done by the front end but has to be provided by the app developer.

    numberState

    The color of the number is adapted according to the value of this property. The precise color depends on the theme that you have selected in UI theme designer.

    Allowed values: Negative, Neutral, Positive, Critical

    numberUnit

    Unit to be displayed below the number, for example, USD.

    stateArrow

    Displays an arrow indicating a trend.

    Allowed values: None, Up, Down

    subtitle

    Subtitle to be displayed below the tile title.

    targetParams

    List of key-value-pairs separated by ampersands.

    When the application is lauched (by clicking on it), these parameters are passed to the application as business parameters (if semantic object-based navigation is used) or as URL parameters (if URL-based navigation is used).

    If any parameters have been entered in the Parametersfield in the tile configuration, the parameters passed by the OData service are appended to the list of parameters to be passed to the application.

    title

    Title to be displayed in the tile.

    1. type 1 Edm.String
    2. icon 0 Edm.String
    3. info 0 Edm.String
    4. infoState 0 Edm.String
    5. number 0 Edm.String
    6. numberDigits 0 Edm.String
    7. numberFactor 0 Edm.String
    8. numberState 0 Edm.String
    9. numberUnit 0 Edm.String
    10. stateArrow 0 Edm.String
    11. subtitle 0 Edm.String
    12. targetParams 0 Edm.String
    13. title 0 Edm.String

    2.3 服务URL接口代码示例

    1. METHOD xxx_get_entity.
    2. DATA: ls_entity_data TYPE xxxxxxodata_mpc=>ts_xxxxxx.
    3. DATA: ls_key TYPE /iwbep/s_mgw_name_value_pair.
    4. TRY.
    5. ls_entity_data-icon = 'sap-icon://Fiori2/F0003'.
    6. ls_entity_data-info = 'Demo Info'.
    7. ls_entity_data-infostate = 'Positive'."Negative, Neutral, Positive, Critical
    8. ls_entity_data-number = 200.
    9. ls_entity_data-numberdigits = 0.
    10. ls_entity_data-numberfactor = ''.
    11. ls_entity_data-numberstate = ''.
    12. ls_entity_data-numberunit = 'USD'.
    13. ls_entity_data-statearrow = 'Up'."None, Up, Down
    14. ls_entity_data-subtitle = 'Sub title'.
    15. ls_entity_data-targetparams = ''.
    16. ls_entity_data-title = 'Title'.
    17. CATCH /iwbep/cx_mgw_busi_exception .
    18. CATCH /iwbep/cx_mgw_tech_exception .
    19. ENDTRY.
    20. er_entity = ls_entity_data.
    21. ENDMETHOD.

    3. 效果

  • 相关阅读:
    Topaz Photo AI 3.0.0 (macOS Universal) - AI 图片修复工具
    【Jenkins】pipeline流水线
    搜索多种格式文件工具
    hive-学习搜狗日志分析
    OpenStack云计算平台实战-----创建空白虚拟机
    思科模拟器
    机器学习(二):线性回归
    三、安全工程练习题(CISSP)
    NetSuite Plug-In 101
    网络的下一次迭代:AVS 将为 Web2 带去 Web3 的信任机制
  • 原文地址:https://blog.csdn.net/xiefireworks/article/details/126111956