‎2008 Feb 29 5:48 AM
hi,
i hav two radiobuttons on selection screen.
1 for alv list display & 2 nd for grid display.
can i hv cod for defining and handling this.
‎2008 Feb 29 5:54 AM
Hi,
try like below......
PARAMETERS : rb1 RADIOBUTTON GROUP rad USER-COMMAND com,
rb2 RADIOBUTTON GROUP rad.
START-OF-SELECTION.
CASE 'X'.
WHEN rb1.
PERFORM grid_display.
WHEN rb2.
PERFORM list_display.
ENDCASE.
form grid_display .
*******write ur code here for grid***********
endform. " grid_display
form list_display .
*******write ur code here for list***********
endform. " list_displayCheers,
jose.
‎2008 Feb 29 5:55 AM
Hi..!
here is the code you requested.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : ALV RADIOBUTTON GROUP DISP USER-COMMAND U1 DEFAULT 'X',
GRID RADIOBUTTON GROUP DISP.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
IF ALV = 'X'.
**************DO ALV REPORTING*******
ELSE
**************DO GRID REPORTING*******
ENDIF.
regards
Nandha Kishore.K
Edited by: Nandha Kishore K on Feb 29, 2008 6:56 AM
‎2008 Feb 29 5:55 AM
Hi,
put a condition for displaying the reports.
IF rbt1 eq 'X'
perform display_alv_list_display.
else.
perform display_alv_grid_display.
endif.
here rbt1 is the name of the Radiobutton and = 'X' means if that radio button is selected then list display report will be executed Else Grid Display report Will be Executed.
HTH,
Regards,
Dhruv Shah
‎2008 Feb 29 5:57 AM
Hi Sangeetha,
Its very simple.
If RB_1 eq 'X'.
populate all the relevant structure like layout, fieldcatelog as per LIST
Call FM for List display.
elseif RB_2 eq 'X'.
populate all the relevant structure like layout, fieldcatelog as per GRID
Call FM / method for Grid display.
endif.
Hope this helps.
Manish
‎2008 Feb 29 5:58 AM
Hi sangeetha,
First store the data into your internal table by select from database table.
In your selection screen place the two radio buttons like this.
Parameters:
list radiobutton group rad1 default 'X',
Grid radiobutton group rad1.After that write the code like this.
AT SELECTION-SCREEN.
if list eq 'X'.
give your internal table to list display function module.
else.
if gird eq 'X'.
give your internal table to grid display function module.
endif.
endif.Reward if it is useful,
Mahi.