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

to SET HANDLER for parameter value

Former Member
0 Likes
855

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

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
755

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

4 REPLIES 4
Read only

Former Member
0 Likes
755

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.

Read only

MarcinPciak
Active Contributor
0 Likes
756

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

Read only

0 Likes
755

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

Read only

0 Likes
755

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