cancel
Showing results for 
Search instead for 
Did you mean: 

Getting current wondow name in a View method

Former Member
0 Kudos

Hi,

  I am working with WD components FITE_UI_RECEIPT_DETAILS and FITE_VC_RECEIPTS for the Travel and Expense module. Standard logic is creating a pop-up using the window ITEMIZE_CREATE_WINDO of FITE_VC_RECEIPTS. They have embedded the view DETAILS_VIEW of FITE_UI_RECEIPT_DETAILS inside window ITEMIZE_CREATE_WINDO. I need to hide a custom field on DETAILS_VIEW only when this pop up window is generated. The view DETAILS_VIEW is used at other places also. Hence I want to write some logic in WDDOMODIFYVIEW of DETAILS_VIEW to hide the field when it's created as a pop up. How can I do this? Is there a way to get the name of the embedding window at run time in method WDDOMODIFYVIEW? Please help.

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Mahesh,

Give this a try.

 DATA lo_view_usage TYPE REF TO if_wd_rr_view_usage.
 DATA lo_window TYPE REF TO if_wd_rr_window.
 DATA lv_window_name TYPE string.

 lo_view_usage = view->get_view_usage( ).
 lo_window = lo_view_usage->get_window( ).
 lv_window_name = lo_window->get_name( ).

Cheers,

Amy

Former Member
0 Kudos

Hello Amy,

  Thank you for throwing some light into this. But unfortunately, this method is returning the name of the original wondow. I want the name of the window which embeds the view when this is rendered as a pop up. As I said before, the view DETAILS_VIEW is used by few other windows. Hence I am looking for the name of the window which currently embeds this view. Thanks again for your help!

Answers (0)