cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding OTR Text in Webdynpro

Former Member
0 Kudos

Hi all,

Actually my requirement is I want to navigate from one iview to another iview so i am doing portal navigation instead of hardcoding the value i have created one OTR text with object type Webdynpro view(WDYV) and i am using that text in my webdynpro application.

My OTR text is this,

'ROLES://portal_content/Sri/navigation2'.

my problem is if i change the OTR text in runtime(Debugging)

'ROLES://portal_content/Sri/navigation2'.

to

'pcd://portal_content/Sri/navigation2'. means it is working fine.

So again i have created the OTR text 'pcd://portal_content/Sri/navigation2'.

and again if i change

'pcd://portal_content/Sri/navigation2'

to

'ROLES://portal_content/Sri/navigation2'. means it is working fine.

If i change the text in runtime only it is working otherwise it is giving error.

kindly give me a solution without changing the text in runtime.

Below is my webdynpro abap code.

TYPES: BEGIN OF navigation,

target type string,

mode type string,

features type string,

window type string,

history_mode type string,

target_title type string,

context_url type string,

end of navigation.

data: wa_navigation type navigation.

data: lr_compcontroller type ref to ig_componentcontroller,

l_component type ref to if_wd_component.

data lr_port_manager type ref to if_wd_portal_integration.

lr_compcontroller = wd_this->get_componentcontroller_ctr( ).

l_component = lr_compcontroller->wd_get_api( ).

lr_port_manager = l_component->get_portal_manager( ).

data: otext type string.

CALL METHOD CL_BSP_RUNTIME=>GET_OTR_TEXT

EXPORTING

ALIAS = 'Z_173797/ZPORTALNAVIGATION'

RECEIVING

TEXT = otext

.

wa_navigation-target = otext.

wa_navigation-mode = '0'. "0 = INTERNAL(same page) and 1 = EXTERNAL(new page).

call method lr_port_manager->navigate_absolute

EXPORTING

navigation_target = wa_navigation-target

navigation_mode = wa_navigation-mode.

  • window_features = wa_navigation-features

  • window_name = wa_navigation-window

  • history_mode = wa_navigation-history_mode

  • target_title = wa_navigation-target_title

  • context_url = wa_navigation-context_url

  • post_parameters = ABAP_FALSE

  • use_sap_launcher = ABAP_TRUE

  • business_parameters =

  • launcher_parameters = .

endmethod.

Regards,

sunayana

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi sunayana,

Do CONCATENATE your target and OTR text and try.

DATA lr_port_manager TYPE REF TO if_wd_portal_integration.
DATA lr_componentcontroller TYPE REF TO ig_componentcontroller .
DATA l_api_componentcontroller TYPE REF TO if_wd_component.
DATA:lt_para type table of WDY_KEY_VALUE,
ls_para type WDY_KEY_VALUE.

lr_componentcontroller = wd_this->;get_componentcontroller_ctr( ).
l_api_componentcontroller = lr_componentcontroller->;wd_get_api( ).
lr_port_manager = l_api_componentcontroller->get_portal_manager( ).

target = 'ROLES://portal_content/Sri/navigation2'.
 text = 'pcd://portal_content/Sri/navigation2'.

CONCATENATE target text into target.  // something like this. try which is required portion for you.

// May be its work for you.

CALL METHOD lr_port_manager->navigate_absolute
EXPORTING
navigation_target = target.

Cheers,

Kris.

Former Member
0 Kudos

Hi Kris,

But my requirement is to get the data from OTR.

no hardcoded values in webdynpro abap.

Regards,

Sunayana

Former Member
0 Kudos

Hi sunayana,

its ok.. get you OTR text into local variable and do CONCATENATE.

and try it is work or not.

Cheers,

Kris.