‎2009 Jan 09 5:00 AM
Hi Experts,
I have 5 buttons on the application toolbar and on click of each button, i need to populate difference selection parameters.
I have tried modifying the SCREEN table dynamically but maintaining SCREEN table for 5 different action seems very difficult.
Can you provide any alternate to address this scenario?
Thanks
Ankur
‎2009 Jan 09 5:04 AM
Hi ,
Go for Modulepool Programming this would surely solve your issue Else its really seems compicated.
‎2009 Jan 09 5:04 AM
draw five selection-screens and call them by defined conditions.
‎2009 Jan 09 5:17 AM
Hi,
Group all the selection fields acc to the screen on which you want to display.
Depending on the function code of the button, then active the corresponding group.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'GR1'
AND sy-ucomm = <func_code>.
screen-active = 0.
ENDIF.
IF screen-group1 = 'GR2'
AND su-ucomm = <func_code>.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
In case of any clarifications, please revert back.
Hope this will help you.
Regards
Natasha Garg
‎2009 Jan 09 5:34 AM
Hi,
in Report program, Function code doesnt get available in SY-UCOMM,
you need to look structure "sscrfields" at runtime for function code.
As suggested above to go for Module Pool program, if you want to stick to Report only then go for tab strips corresponding to each button.
Tab Strip will be easily managed and will provide you the selection corresponding to each tab.
Thank you
Depesh
‎2009 Jan 09 6:40 AM
Hi Ankur,
An easy approach do this is to go for Module Pool Programming.
To include selection screen parameters take few radiobuttons as per your requirement and then include/exclude parameters for selection using:-
loop at screen.
"code
modify screen.
endloop.
Take the function group for radiobuttons as 'CS' and function type as 'S'.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
‎2009 Jan 09 6:42 AM
hi ,
try this..
in this text boxes are displays and disapper on the selection of radio button.....
*&---------------------------------------------------------------------*
*& Report Z_TG_LOOP
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT z_tg_loop.
DATA : rb1(1) VALUE 'X',
rb2(1).
CALL SCREEN 8000.
*&---------------------------------------------------------------------*
*& Module STATUS_8000 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_8000 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
IF rb1 EQ 'X'.
LOOP AT SCREEN.
IF ( screen-group1 EQ 'ABC' ).
screen-invisible = 0.
screen-active = 1.
ELSEIF ( screen-group1 EQ 'DEF' ).
screen-invisible = 1.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF ( screen-group1 EQ 'DEF' ).
screen-invisible = 0.
screen-active = 1.
ELSEIF ( screen-group1 EQ 'ABC' ).
screen-invisible = 1.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE. " STATUS_8000 OUTPUT
*&---------------------------------------------------------------------*
*& Module MODIFY INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE modify INPUT.
IF rb1 EQ 'X'.
LOOP AT SCREEN.
IF ( screen-group1 EQ 'ABC' ).
screen-invisible = 0.
screen-active = 1.
ELSEIF ( screen-group1 EQ 'DEF' ).
screen-invisible = 1.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF ( screen-group1 EQ 'DEF' ).
screen-invisible = 0.
screen-active = 1.
ELSEIF ( screen-group1 EQ 'ABC' ).
screen-invisible = 1.
screen-active = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE. " MODIFY INPUT