Just want to know is there any standard way of getting parent component name/view name ,if my control is in embedded view name at run time.
For eg : Consider embedded component as BP_DATA , so while accessing any view of BP_DATA( Relationships OV) , i need to find out whether this component is embedded within BP_HEAD ( Account screen ) or within BP_CONT(Contact Screen). I can see the parent_view name from outer_rep_view of the window( BP_DATA/Relationships) in debug mode. But those are protected and cannot be accessed.
Edited by: nithish P on Mar 4, 2012 12:19 AM
I can get the window controller ( BP_DATA/Relationships) from view BP_DATA/RelationshipOV through code
But from window controller I am not able to fetch the parent component name , such as BP_CONT or BP_HEAD.
Could you please let me know from which attribute of the window controller can i get the parent view name or component name?
Even if we create get_outer_rep_view method in window class, how to access outer_rep_view attribute . Its defined as private in standard window class, so even after enhancing my widow class I wont be able to get it.
Is there any other path or logic to get the outer_rep_view if i create a new method in my window class?
The attribute OUTER_REP_VIEW is defined as protected, not private.
You can access it in the view/window controller class like this.
You can refer the Class CL_AGROE_SEARCHWINDOW_IMPL Method GET_OUTER_REP_VIEW.
From the view/context node, you can access like this.
if ME->WINDOW->OUTER_REP_VIEW is bound. LV_PARENT_REP_VIEW = ME->WINDOW->OUTER_REP_VIEW->GET_PARENT( ). LV_WINDOW = GET_PARENT_WINDOW( ). ME->REP_VIEW = ME->WINDOW->OUTER_REP_VIEW.