Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: when click on button will shows the assignment block

$
0
0

Hi nagendra,

 

you want to display second assignment block based on first assignment block and both views are attached into viewset right in this case

fallow this procedure.

 

step 1.

create one flag type static/instance variable in view1 implementatin class.

like gv_flag static attribute type abap_bool default is abap_false.

 

step 2.

in your case insert event you have to set the flag = 'X'.

step3.

go to view set.htm page get the first view instance by using get_subcontroller_by_viewname.

 

write the logic like this.

<%

   DATA: lv_FLAG TYPE ABAP_BOOL,

   lr_view_controller type ref to ZL_ZTEST_WO_TAB1_IMPL.  "this is first view impl class.

   lr_view_controller ?= controller->get_subcontroller_by_viewname( 'ZTEST_WORK/tab1' ).

   if lr_view_controller is bound.

   lv_FLAG = lr_view_controller->GV_FLAG.

   ENDIF.

%>

<thtmlb:grid cellSpacing = "1"

              columnSize  = "1"

              height      = "100%"

              rowSize     = "2"

              width       = "100%" >

   <%

   IF LV_FLAG = ABAP_FALSE .

   %>

   <thtmlb:gridCell colSpan     = "1"

                    columnIndex = "1"

                    rowIndex    = "1"

                    rowSpan     = "1" >

     <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'tab1' ) %>"

               url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'tab1' ) %>" />

   </thtmlb:gridCell>

   <%

   ELSE.

   %>

   <thtmlb:gridCell colSpan     = "1"

                    columnIndex = "1"

                    rowIndex    = "2"

                    rowSpan     = "1" >

     <bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'tab2' ) %>"

               url     = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'tab2' ) %>" />

   </thtmlb:gridCell>

</thtmlb:grid>

<%

   clear lr_view_controller->GV_FLAG.

   ENDIF.

%>.


let me know if you have any queries..


Thanks & Regards,

Srinivas


Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>