‎2010 Mar 24 1:59 PM
Dear Gurus,
When the user enters a plant value in PARAMETER then i need to hide some of the Screen fields.
But the system has to trigger the PAI automatically
I know this can be acheived using CL_GUI_CFW but how to implement the SET HANDLER method for a parameter
I searched and found the HANDLER METHODS for ALV, TREE, TIMER etc but I want it for SELECTION-SCREEN elements.
I searched WIKI.SDN.SAP.COM and SDN and other stuff.
Please provide me sample code possibly
Please guide me.
Regards
Ramchander Rao.K
‎2010 Mar 24 2:13 PM
PAI gets triggered once user hits ENTER. Here you can code your "handler". What's wrong with that? Is it a screen field or some GUI control?
Regards
Marcin
‎2010 Mar 24 2:03 PM
for selecion screens, I have this:
PARAMETERS p_cebe TYPE char01 RADIOBUTTON GROUP grp1 DEFAULT 'X' USER-COMMAND flag.
PARAMETERS p_ceco TYPE char01 RADIOBUTTON GROUP grp1.PARAMETERS: p_kokrs LIKE cobk-kokrs DEFAULT 'CORP' MODIF ID cec,
p_gjahr LIKE cobk-gjahr MODIF ID cec.
PARAMETERS : p_rbukrs LIKE faglflexp-rbukrs MODIF ID ceb,
p_ryear LIKE faglflexp-ryear MODIF ID ceb,AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_cebe = 'X' AND screen-group1 = 'CEC'.
screen-active = '0'.
ENDIF.
IF p_ceco = 'X' AND screen-group1 = 'CEB'.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
‎2010 Mar 24 2:13 PM
PAI gets triggered once user hits ENTER. Here you can code your "handler". What's wrong with that? Is it a screen field or some GUI control?
Regards
Marcin
‎2010 Mar 24 2:24 PM
Hi Marcin,
The requirement is once the user enters plant value then i need to disable some of the Screen fields.
if it is a radio button, check box or List box assigning a FCODE will trigger the PAI subsequently PBO so using LOOP AT SCREEN the screen field can be hidden.
Since it is a PARAMETER how to handle this. as user should not get a chance to enter a value in other field for that perticular Plant.
Respond to double click will do but it is equivalent to pressing enter like only
I searched and found the SET HANDLER methods available for TREE, CONTROLS, ALV but not for PARAMETERS or screen fields.
Please guide me
Regards
Ram
‎2010 Mar 24 2:31 PM
Hi Ram,
Without pressing ENTER I believe you won't do that for normal screen field. I think tha alternative would be creating a listbox, which can have FCODE attached. So once the user selects the plant, you will get PAI triggered.
This is the only way I can think of.
Regards
Marcin