<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: expand/collapse button functionality on module pool screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748096#M1302725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed, this is a special technique which requires subscreens. To create something similar to ME21N do the following: &lt;/P&gt;&lt;P&gt;- first create a blank main screen i.e 100 - this will be a main screen &lt;/P&gt;&lt;P&gt;- create three &lt;EM&gt;subscreen areas&lt;/EM&gt; on it - these will be used to store your subscreens dynamically - now create 6 subscreens i.e. 201, 202 - (top subscreens) 301, 302 (middle subscreens), 401, 402 (bottom subscreens). Now subscreens 201,301,301 will hold actual data which is your alvs during runtime. On each of them place a button with icon &lt;EM&gt;ICON_DATA_AREA_COLLAPSE&lt;/EM&gt; and a custom container next to it (so that the button's top base line fits top base line of container). This is how your subscreen will look like when expanded. Next, subscreens 202,302,402 must only hold a pushbutton &lt;EM&gt;ICON_DATA_AREA_EXPAND&lt;/EM&gt; . &lt;/P&gt;&lt;P&gt;When you collapse your subsreen you just display an empty screen with only pushbutton on its (this one), which subsequnetly results in collapsing whole area. &lt;/P&gt;&lt;P&gt;For screen 100 in flow logic write &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
PROCESS BEFORE OUTPUT. 
MODULE docking_container. 
CALL SUBSCREEN top_area INCLUDING sy-repid dynnr_top. "here you top subscreen area and respecitive subscreen is processed either 201, 301 or 401
CALL SUBSCREEN middle_area INCLUDING sy-repid dynnr_middle. "for subscreens 202, 302,402
CALL SUBSCREEN bottom_area INCLUDING sy-repid dynnr_bottom. "here subscreens 203 ,303 ,403

PROCESS AFTER INPUT. 
CALL SUBSCREEN top_area. 
CALL SUBSCREEN middle_area.
CALL SUBSCREEN bottom_area.
MODULE pai_0100. 

"in ABAP program define such data objects 
data: dynnr_top(4) type n value '0201', 
dynnr_middle(4) type n value '0301',
dynnr_bottom(4) type n value '0401'. "by defauls set those not empty screens 

"in PAI module you change your subscreen assignment depending on pusbutton state 
MODULE pai_0100 INPUT. 
MOVE ok_code TO save_ok. 
CLEAR ok_code. 
CASE save_ok. 
   WHEN 'COLLAPSE_TOP'. "function code of top button 
     dynnr_top = '0202'. "set screen to empty 
   WHEN 'EXPAND_TOP'.
     dynnr_top = '0201'. "set screen with data 

   "do the same for MIDDLE and BOTTOM
...
ENDMODULE. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;- moreover you need a PBO modules in subscreens 201,301,401. they should be responsible for creating respecitve GUI containers and ALVs.&lt;/P&gt;&lt;P&gt;On the left hand side there it also used &lt;EM&gt;docking container&lt;/EM&gt; . To create such use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; create object r_docking_container ... side = cl_gui_docking_container=&amp;gt;dock_at_left &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2009 17:02:50 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2009-05-27T17:02:50Z</dc:date>
    <item>
      <title>expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748093#M1302722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to design a module pool screen with a expand/collapse button on it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The desired functionality associated with this button would be something similiar to that available in ME21N screen. When the expand button is clicked it should open up a section of screen that allows the user to enter some parameter. Based on this parameter some selections from DB can be perfomed and then displayed below it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers on how to achieve this? Any kind of help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards-&lt;/P&gt;&lt;P&gt;Harmeet Singh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 15:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748093#M1302722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-27T15:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748094#M1302723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to create subscreen areas, and attach the desired Subscreen on respective event. &lt;/P&gt;&lt;P&gt;Check transaction BIBS.&lt;/P&gt;&lt;P&gt;Look for the Collapsible Area example in the left pan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 15:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748094#M1302723</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-05-27T15:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748095#M1302724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harmeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your requirement you need to create a Push Button in the Screen and need to process the User Action in the Process After Input Event. Assign a function code to the push button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at the following demo code for an over of the subscreen toggle functionality. Report Name : DEMO_DYNPRO_SUBSCREENS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 15:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748095#M1302724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-27T15:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748096#M1302725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed, this is a special technique which requires subscreens. To create something similar to ME21N do the following: &lt;/P&gt;&lt;P&gt;- first create a blank main screen i.e 100 - this will be a main screen &lt;/P&gt;&lt;P&gt;- create three &lt;EM&gt;subscreen areas&lt;/EM&gt; on it - these will be used to store your subscreens dynamically - now create 6 subscreens i.e. 201, 202 - (top subscreens) 301, 302 (middle subscreens), 401, 402 (bottom subscreens). Now subscreens 201,301,301 will hold actual data which is your alvs during runtime. On each of them place a button with icon &lt;EM&gt;ICON_DATA_AREA_COLLAPSE&lt;/EM&gt; and a custom container next to it (so that the button's top base line fits top base line of container). This is how your subscreen will look like when expanded. Next, subscreens 202,302,402 must only hold a pushbutton &lt;EM&gt;ICON_DATA_AREA_EXPAND&lt;/EM&gt; . &lt;/P&gt;&lt;P&gt;When you collapse your subsreen you just display an empty screen with only pushbutton on its (this one), which subsequnetly results in collapsing whole area. &lt;/P&gt;&lt;P&gt;For screen 100 in flow logic write &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
PROCESS BEFORE OUTPUT. 
MODULE docking_container. 
CALL SUBSCREEN top_area INCLUDING sy-repid dynnr_top. "here you top subscreen area and respecitive subscreen is processed either 201, 301 or 401
CALL SUBSCREEN middle_area INCLUDING sy-repid dynnr_middle. "for subscreens 202, 302,402
CALL SUBSCREEN bottom_area INCLUDING sy-repid dynnr_bottom. "here subscreens 203 ,303 ,403

PROCESS AFTER INPUT. 
CALL SUBSCREEN top_area. 
CALL SUBSCREEN middle_area.
CALL SUBSCREEN bottom_area.
MODULE pai_0100. 

"in ABAP program define such data objects 
data: dynnr_top(4) type n value '0201', 
dynnr_middle(4) type n value '0301',
dynnr_bottom(4) type n value '0401'. "by defauls set those not empty screens 

"in PAI module you change your subscreen assignment depending on pusbutton state 
MODULE pai_0100 INPUT. 
MOVE ok_code TO save_ok. 
CLEAR ok_code. 
CASE save_ok. 
   WHEN 'COLLAPSE_TOP'. "function code of top button 
     dynnr_top = '0202'. "set screen to empty 
   WHEN 'EXPAND_TOP'.
     dynnr_top = '0201'. "set screen with data 

   "do the same for MIDDLE and BOTTOM
...
ENDMODULE. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;- moreover you need a PBO modules in subscreens 201,301,401. they should be responsible for creating respecitve GUI containers and ALVs.&lt;/P&gt;&lt;P&gt;On the left hand side there it also used &lt;EM&gt;docking container&lt;/EM&gt; . To create such use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; create object r_docking_container ... side = cl_gui_docking_container=&amp;gt;dock_at_left &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 17:02:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748096#M1302725</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-05-27T17:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748097#M1302726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;example for three pushbutton with expand collapse .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all define your push button as output field with icon tick in the pushbutton characteristick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then define this pushbutton in top_include &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
include &amp;lt;icon&amp;gt;.
data : push_a1 like icons-l4,
         push_a2 like icons-l4,
         push_a3 like icons-l4. 
data : a1 ,
         a2,
         a3.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in pai of the screen &lt;/P&gt;&lt;P&gt; suppose i had assign function code a1 ,a2 , a3 for repective pushbutton &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
module user_command_9002 input.
  okcd = ok_code.
  clear ok_code.
  case okcd.
    when 'A1'.
      if a1 is initial.
        a1 = 'X'.
      else.
        clear a1.
      endif.
    when 'A2'.
      if a2 is initial.
        a2 = 'X'.
      else.
        clear a2.
      endif.
    when 'A3'.
      if a3 is initial.
        a3 = 'X'.
      else.
        clear a3.
      endif.
  endcase.
endmodule.                 " USER_COMMAND_9002  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define three seprate screen -group for three pushbutton say a1 a2 a3&lt;/P&gt;&lt;P&gt;during pbo you can directly assign name of icon .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 if a1 is initial.
    push_a1 = icon_collapse.
  else.
    push_a1 = icon_expand.
  endif.
  if a2 is initial.
    push_a2 = icon_collapse.
  else.
    push_a2 = icon_expand.
  endif.
  if a3 is initial.
    push_a3 = icon_collapse.
  else.
    push_a3 = icon_expand.
  endif.
 loop at screen.
    if screen-group1 = 'A1'.
      if a1 = 'X'.
        screen-invisible = 1.
        screen-input = 0.
        modify screen.
      else.
        screen-active = 1.
        screen-invisible = 0.
        screen-input = 1.
      endif.
    elseif screen-group1 = 'A2'.
      if a2 = 'X'.
        screen-invisible = 1.
        screen-input = 0.
        modify screen.
      else.
        screen-active = 1.
        screen-invisible = 0.
        screen-input = 1.
      endif.
    elseif screen-group1 = 'A3'.
      if a3 = 'X'.
        screen-invisible = 1.
        screen-input = 0.
        modify screen.
      else.
        screen-active = 1.
        screen-invisible = 0.
        screen-input = 1.
      endif.
    endif.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Alpesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alpesh on May 28, 2009 10:28 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 04:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748097#M1302726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-28T04:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748098#M1302727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find an example in transaction BIBS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You when you have 2 collapsable areas, you have to create 4 dynpros and 2 subcreens. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: If Dynpro 100 has your 2 collapseable areas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0100 - both areas open&lt;/P&gt;&lt;P&gt;0110 - top area closed buttom area open&lt;/P&gt;&lt;P&gt;0120 - both areas closed&lt;/P&gt;&lt;P&gt;0130 - top area open, buttom closed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not make it this way, there wont be a smooth change between screens when you hit one of the buttons!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 08:33:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748098#M1302727</guid>
      <dc:creator>wagener-mark</dc:creator>
      <dc:date>2010-11-23T08:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748099#M1302728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find an example in transaction BIBS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You when you have 2 collapsable areas, you have to create 4 dynpros and 2 subcreens. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: If Dynpro 100 has your 2 collapseable areas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0100 - both areas open&lt;/P&gt;&lt;P&gt;0110 - top area closed buttom area open&lt;/P&gt;&lt;P&gt;0120 - both areas closed&lt;/P&gt;&lt;P&gt;0130 - top area open, buttom closed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not make it this way, there wont be a smooth change between screens when you hit one of the buttons!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 08:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748099#M1302728</guid>
      <dc:creator>wagener-mark</dc:creator>
      <dc:date>2010-11-23T08:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: expand/collapse button functionality on module pool screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748100#M1302729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem and followed ur steps, its worked like a charm thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 10:52:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/expand-collapse-button-functionality-on-module-pool-screen/m-p/5748100#M1302729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-04-14T10:52:25Z</dc:date>
    </item>
  </channel>
</rss>

