Trying to adapt a Standard Web Dynpro Component
Hi,
I want to change the 'Caption_1' of the WDC EHHSS_INC_ROOT_CAUSE from 'Root Causes' to 'Causal Factors'. What I did is that I have created a component configuration and made all the changes there but after this is done I don't see the changes. Please see the screen-shot. Can you help in getting this fixed. Thanks.
Tanmoy Mondal replied
Hi,
I used a pre-exit to dynamically change the captions -
CONSTANTS: lc_cafas TYPE wdy_md_translatable_text VALUE 'Casual Factors',
lc_cafa TYPE wdy_md_translatable_text VALUE 'Casual Factor'.
DATA: lo_wd_caption TYPE REF TO cl_wd_caption.
IF first_time = abap_true.
lo_wd_caption ?= view->get_element( id = 'CAPTION_1' ).
lo_wd_caption->set_text( value = lc_cafas ).
lo_wd_caption ?= view->get_element( id = 'CAPTION_3' ).
lo_wd_caption->set_text( value = lc_cafa ).
lo_wd_caption ?= view->get_element( id = 'CAPTION_6' ). .
lo_wd_caption->set_text( value = lc_cafas ).
ENDIF.
Thanks & Closing the thread