‎2005 Dec 08 11:18 AM
Hello All,
I have to develop similar program to CJ03. How to achieve the deopdown & collapsde? is my query.
First four columns will be same & rest will be columns from ztable.
When user dropdowns the expansion should be displayed & when collaps the summation of columns from ztable is to be displayed.
If possible kindly send some sample code.
Regards,
Dilip
‎2005 Dec 08 11:25 AM
Hi Diliip,
1. I had created the similary functionality
of collapse
in SE38 program.
2. Below is the code for understanding (Just Copy Paste)
REPORT abc.
INCLUDE icons.
DATA : iv TYPE i,
in TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETER : a(10) TYPE c MODIF ID m2.
PARAMETER : b(10) TYPE c MODIF ID m2.
PARAMETER : c(10) TYPE c MODIF ID m2.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
SELECTION-SCREEN PUSHBUTTON /1(4) p1 USER-COMMAND btn1.
SELECTION-SCREEN:
BEGIN OF LINE,
COMMENT 1(3) text-001 MODIF ID m1,
POSITION 8.
PARAMETERS:date10 LIKE rpctaxin-taxdt MODIF ID m1,
bank10(60) TYPE c MODIF ID m1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN:
BEGIN OF LINE,
COMMENT 1(3) text-001 MODIF ID m1,
POSITION 8.
PARAMETERS:date11 LIKE rpctaxin-taxdt MODIF ID m1,
bank11(60) TYPE c MODIF ID m1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
*----
INITIALIZATION.
iv = 0.
in = 1.
AT SELECTION-SCREEN OUTPUT.
IF iv = 0.
WRITE icon_collapse AS ICON TO p1(4).
ENDIF.
IF iv = 1.
WRITE icon_expand AS ICON TO p1(4).
ENDIF.
LOOP AT SCREEN.
WRITE : screen-name , screen-group1.
IF screen-group1 = 'M1'.
screen-invisible = iv.
screen-input = in.
*SCREEN-INPUT = V.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*----
AT SELECTION-SCREEN.
IF iv = 1.
iv = 0.
in = 1.
ELSE.
iv = 1.
in = 0.
ENDIF.
*----
I hope it helps.
Regards,
Amit M.
‎2005 Dec 08 11:36 AM
Hello Amit,
But my requirement is to get this in dialog along with I want to know how to read wbs elements & display them as they are displayed in CJ03.
Regards,
Dilip
‎2005 Dec 10 11:54 AM
this is not exactly the same as in CJ03 (where it is implemented inside a tablecontrol)
but you can look at the sample program for similar functionality using class
CL_GUI_ALV_TREE
and the demo program is
BCALV_TREE_DEMO
Regards
Raja