Skip to Content
0
Former Member
Jan 13, 2011 at 05:26 PM

Problem with DO_Dynamic_Navigation

44 Views

Hi friends,

I need to call the methods of another component and embed in my current component view container based on the embedding position.I called the method DO_DYNAMIC_NAVIGATION. when this method got executed it goes to the target component i.e where the required view exits,but it is unable to call the method.

it returns an error saying 'View V_OEL_STATS does not exist within the component /EMN/IHIS_QUANTITATIVE_CN.

where EMN/IHIS_QUANTITATIVE_CN is calling component,but the view is in EMN/IHIS_QUANTITATIVE.

I have put a break point in EMN/IHIS_QUANTITATIVE but it is unable to call the method V_OEL_STATS .

please help me in solving the below issue.

below is the sample code i have written.

DATA : node TYPE REF TO if_wd_context_node,

dl_api_main TYPE REF TO if_wd_view_controller,

l_nav_services TYPE REF TO if_wd_navigation_services,

LV_TARGET_COMPONENT TYPE STRING,

LV_TARGET_VIEW TYPE STRING,

LV_TARGET_PLUG TYPE STRING.

DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.

lo_cmp_usage = wd_this->wd_cpuse_cu_quantitative( ).

IF lo_cmp_usage->has_active_component( ) IS INITIAL.

lo_cmp_usage->create_component( ).

ENDIF.

node = wd_context->get_child_node( 'ND_VIEWS_SWITCH' ).

node->set_lead_selection_index( index ).

CASE index.

WHEN '1'."assessment groups and agents.

LV_TARGET_COMPONENT = '/EMN/IHIS_QUANTITATIVE'.

LV_TARGET_VIEW = 'V_ASSESS_GROUP_AGENT'.

LV_TARGET_PLUG = 'IP_AGENTS'.

WHEN '2'."samples

LV_TARGET_COMPONENT = '/EMN/IHIS_QUANTITATIVE'.

LV_TARGET_VIEW = 'V_SAMPLE_SHEET'.

LV_TARGET_PLUG = 'IP_SAMPLES'.

WHEN '3'."sample results

LV_TARGET_COMPONENT = '/EMN/IHIS_QUANTITATIVE'.

LV_TARGET_VIEW = 'V_SAMPLE_RESULTS_SET'.

LV_TARGET_PLUG = 'IP_RESULTS'.

WHEN '4'."sample sets

LV_TARGET_COMPONENT = '/EMN/IHIS_QUANTITATIVE'.

LV_TARGET_VIEW = 'V_SAMPLE_RESULTS_SET'.

LV_TARGET_PLUG = 'IP_SETS'.

WHEN '5'."oel

LV_TARGET_COMPONENT = '/EMN/IHIS_QUANTITATIVE'.

LV_TARGET_VIEW = 'V_OEL_STATS'.

LV_TARGET_PLUG = 'IP_OEL'.

ENDCASE.

dl_api_main = wd_this->wd_get_api( ).

l_nav_services ?= dl_api_main.

l_nav_services->do_dynamic_navigation(

source_window_name = 'W_QUANTITATIVE_CN'

source_vusage_name = 'V_MAIN_USAGE_0'

source_plug_name = 'OP_QUAN'

target_component_name = LV_TARGET_COMPONENT

target_view_name = LV_TARGET_VIEW

target_plug_name = LV_TARGET_PLUG

target_embedding_position = 'V_MAIN/VCU_GENERIC' ).

Regards,

Xavier.P

Edited by: Xavier on Jan 13, 2011 6:31 PM