Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dropdown & collapse in dial program

Former Member
0 Likes
446

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

3 REPLIES 3
Read only

Former Member
0 Likes
407

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.

Read only

0 Likes
407

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

Read only

athavanraja
Active Contributor
0 Likes
407

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