Skip to Content
0

Fiori My Inbox - How to add a Link to open new tab in browser using Annotation

Feb 05 at 04:31 PM

99

avatar image

Hello Expert,

In My Inbox fiori application, we have a field displayed as a link in Information tab.

Currently the link works fine but it navigate to external website. I has a requirement if it could open a new tab of browser instead of navigation. Because user wants to keep current My Inbox screen.

Here is my ABAP code in the back end. An custom Odata service implemented same as Approve Travel Expense. I developed this service under component SAP FIORI FRONT-END SERVER 2.0 and FIORI ERP APPLICATIONS X1 1.0

 DATA: lo_record TYPE REF TO /iwbep/if_mgw_vocan_record,
 lo_property_value TYPE REF TO /iwbep/if_mgw_vocan_property,
 lo_function TYPE REF TO /iwbep/if_mgw_vocan_function,
 lv_value TYPE string. 

 lo_record = er_collection->create_record( iv_record_type = 'UI.DataFieldWithUrl') ##NO_TEXT.
 lo_record->create_annotation( iv_term = 'UI.Importance' )->create_simple_value( )->set_enum_member_by_name( iv_ui_importance ) ##NO_TEXT. 

 lo_property_value = lo_record->create_property( 'Value' ) ##NO_TEXT.
 lv_value = 'Click Here to Open Task'.
 lo_property_value->create_simple_value( )->set_string( lv_value ) ##NO_TEXT.
 lo_property_value = lo_record->create_property( 'Url' ) ##NO_TEXT.
 lo_function = lo_property_value->create_function( iv_function_name = 'odata.fillUriTemplate' ) ##NO_TEXT.
 lo_function->create_parameter( )->create_simple_value( )->set_path( iv_property_path ) ##NO_TEXT.

Could you please help me in this case?

Thank you in advance.
Dong.

bmxnx.png (16.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ankit Maskara
Feb 09 at 01:10 AM
0

As demonstrated by Masa(@Masayuki Sekihara) - https://blogs.sap.com/2016/05/31/my-inbox-open-task-swfvisu-configuration/ consider using the open task button instead of a link control in your info tab and your requirement will be fulfilled.

Share
10 |10000 characters needed characters left characters exceeded