‎2009 May 11 1:47 PM
Hi Frnds,
i am working on a complex scenario,
i want to print 3 list box.
first one i can show but the problem is with second one and third one.
first list box have three fields suppose
program
events
movies
when user will select either one , suppose he will select program
then in second listbox program releted entries should be displayed like fiction , non fiction.
and when he will select any entry then in third list box corresponding sub entries should be come.
all data i have in ztables.
i can make search help also.
any suggestion should be appreciated.
Thanks and Regards
vijay
‎2009 May 11 2:00 PM
Use this program!
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
TABLES: sscrfields.
Selection screen
List box
PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10
USER-COMMAND abc.
Radio buttons
PARAMETERS: rb1 RADIOBUTTON GROUP ab MODIF ID bl2,
rb2 RADIOBUTTON GROUP ab MODIF ID bl2,
rb3 RADIOBUTTON GROUP ab MODIF ID bl3.
INITIALIZATION.
Populate list box values
name = 'PS_PARM'.
value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
AT SELECTION-SCREEN OUTPUT.
Set list box with value
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
Control the display of screen components
LOOP AT SCREEN.
IF ps_parm = 1.
IF screen-name = 'RB1' OR screen-name = 'RB2' .
screen-invisible = 0.
ELSEIF screen-name = 'RB3'.
screen-invisible = 1.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = 2.
IF screen-name = 'RB1' OR screen-name = 'RB2' .
screen-invisible = 1.
ELSEIF screen-name = 'RB3'.
screen-invisible = 0.
ENDIF.
MODIFY SCREEN.
ELSEIF ps_parm = space.
rb1 = 'X'.
clear: rb2,rb3.
IF screen-name = 'RB1' OR screen-name = 'RB2' OR
screen-name = 'RB3'.
screen-invisible = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'ABC'.
ENDIF.
START-OF-SELECTION.
WRITE: / 'Parameter:', ps_parm.
And use:
AT-SELECTION-SCREEN on value request for p_yyyy.
if p_xxxx-key is not initial..
get the values required for second parameter...or listbox..
endif..
similarily for 3rd listbox also!
‎2009 May 11 2:05 PM
CHeck the demo program 'DEMO_DYNPRO_DROPDOWN_LISTBOX'.
Here as per your requirement you can have 3 different selects and populations to list 1, 2 & 3 respectively in PBO of teh screen.