2009 May 05 1:09 PM
hi experts..
I am working in module pool programming,
I want to disable one push button on the screen depending upon some condition.
how to do that?
thanks in advance
Try something like this in PBO SECTION OF YOUR SCREEN
LOOP AT SCREEN.
IF YOUR CONTITION.
IF SCREEN-NAME = PUSHBUTTON NAME.
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
2009 May 05 1:16 PM
2009 May 05 1:16 PM
Try something like this in PBO SECTION OF YOUR SCREEN
LOOP AT SCREEN.
IF YOUR CONTITION.
IF SCREEN-NAME = PUSHBUTTON NAME.
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
2009 May 05 1:16 PM
Hi,
Try this if it on the tool bar
DATA: BEGIN OF I_PF_STATUS_TAB OCCURS 10,
FCODE(4),
END OF I_PF_STATUS_TAB.
FORM SET_PF_STATUS_POSTER.
REFRESH I_PF_STATUS_TAB.
MOVE 'PST' TO I_PF_STATUS_TAB.
APPEND I_PF_STATUS_TAB.
MOVE 'ART' TO I_PF_STATUS_TAB.
APPEND I_PF_STATUS_TAB.
SET PF-STATUS 'ZZBILSTA' EXCLUDING I_PF_STATUS_TAB.
ENDFORM.
Regards
Krishna
Edited by: Krishna Gowrneni on May 5, 2009 5:47 PM
2009 May 06 9:34 AM
hi
try this
say for example u have 2 push buttons ( PB1,PB2 )on ur screen and u want to disable one
based on some condition.
in SE51
PB0
Module status_0800.
Module hide_button.
PAI
Module user_command_0800.
Module hide_button.
if some condition = 'X'.
loop at screen.
if screen-name = 'PB1'.
SCREEN-ACTIVE = '0'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
endif.
endloop..
endif.
Endmodule.
Regards
2009 May 06 1:30 PM
2009 May 06 9:50 AM
Hi,
Refer:
Take the group1 for the screen fields that you have taken on screen as ABC and then follow code to disable fields, in PBO:-
IF <condition>. "as per your condition
IF screen-group1 = 'ABC'.
LOOP AT SCREEN.
screen-input = 0. "to disable screen fields
screen-active = 0.
ENDLOOP.
MODIFY SCREEN.
ENDIF.
ENDIF.
Now say if you want to enable fields on some condition then you may use:-
IF <condition>. "as per your condition
IF screen-group1 = 'ABC'.
LOOP AT SCREEN.
screen-input = 1. "to enable screen fields
screen-active = 1.
ENDLOOP.
MODIFY SCREEN.
ENDIF.
ENDIF.
Hope this helps you.
Regards,
Tarun
2009 May 11 2:28 PM
Tarun,
the first part is working for me but the one which u have mentioned under PAI is not working.
Can u please suggest , why it is happening so
Thanks
Chandan
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |