2008 Dec 02 5:08 AM
Dear All,
i would like to disable some 'PUSHBUTTON' s in PBO. Then after user feeds data and 'ENTERS', then data should be saved rather than when User Clicks 'SAVE' Pushbutton as of the case which is with me.
Also sir, in PBO, i would like to give Information messages in a dialog box.
Thanks in advance
2008 Dec 02 6:39 AM
Hi,
You can disable the pushbutton defined in status on some condition.
example :
MODULE status_9001 OUTPUT.
REFRESH g_t_fcode_exclude.
* setting PF-STATUS based on role of user.
* for representaive PF-STATUS will have 'submit' and 'show selections' button.
IF g_flag_role = 'R'.
SET PF-STATUS 'ZNOT2'.
ELSEIF g_flag_role = 'S'.
* for supervisor PF-STATUS will have 'submit' button only and for demand planner its only display access.
APPEND 'SHOW' TO g_t_fcode_exclude.
SET PF-STATUS 'ZNOT2' EXCLUDING g_t_fcode_exclude.
ELSE.
APPEND 'SUBM' TO g_t_fcode_exclude.
APPEND 'SHOW' TO g_t_fcode_exclude.
SET PF-STATUS 'ZNOT2' EXCLUDING g_t_fcode_exclude.
ENDIF.
SET TITLEBAR 'ZTNOT2'.ENDMODULE. " STATUS_9001 OUTPUT.
thanks.
You can use EXCLUDING statement along with pf-status to disable the icons.
Eg:
DATA: itab TYPE TABLE OF sy-ucomm.
APPEND 'DELE' TO itab.
APPEND 'PICK' TO itab.
SET PF-STATUS 'STA3' EXCLUDING itab.
And to get pop ups in module pool, you can create sub screens and use the below code,
CALL SCREEN <no> STARTING AT x1 y1 ENDING AT x2 y2.
Regards
Sam
2008 Dec 02 5:19 AM
Hi,
You can hide the fields in PBO
loop at screen
if screen-name = 'PUSHBUTTON'
SCREEN-INVISIBLE = 1
ENDIF.'
MODIFY SCREEN
endloop.
and you can save data on any user command even on ENTER it need not be with SAVE
better write your dialog box in PAI as you want to give some advice to the users before you process the screen so it is always suggested to use the DIALOG screens in PAI only
Regards
Ramchander Rao.K
2008 Dec 02 5:53 AM
Dear Sir,
In PBO, i disabled the pushbutton 'SAVE'. But in the PAI if i want to again Enable it?
I have just one Screen 0100.
Thanks in Advance
2008 Dec 02 6:32 AM
Hi
If you want to enable it based on some conditiaon you can enable it in PBO only
not in PAI
if some_condition
SET PF STATUS EXCLUDING
ENDIF
Please go through the KEY word documentaion of SET PF-STATUS
regards
Ramchander Rao.K
2008 Dec 02 5:38 AM
You can use EXCLUDING statement along with pf-status to disable the icons.
Eg:
DATA: itab TYPE TABLE OF sy-ucomm.
APPEND 'DELE' TO itab.
APPEND 'PICK' TO itab.
SET PF-STATUS 'STA3' EXCLUDING itab.
And to get pop ups in module pool, you can create sub screens and use the below code,
CALL SCREEN <no> STARTING AT x1 y1 ENDING AT x2 y2.
Regards
Sam
2008 Dec 02 5:57 AM
Hi,
U want to deactivate or disable some "pushbutton"....
For this....
In PBO ...
loop at screen
if screen-name = 'PUSHBUTTON Name'
SCREEN-INPUT = 0
ENDIF.'
MODIFY SCREEN
endloop.
SCREEN-INPUT = 0 for Deactivate.
SCREEN-INPUT = 1 for Activate
save the data when user press enter so find out enter button OK-CODE it is useful ....
2008 Dec 02 6:37 AM
loop at screen.
IF screen-name = ''PUSHBUTTON Name'.
screen-input = 0.
modify screen .
endif.
endloop.
2008 Dec 02 6:39 AM
Hi,
You can disable the pushbutton defined in status on some condition.
example :
MODULE status_9001 OUTPUT.
REFRESH g_t_fcode_exclude.
* setting PF-STATUS based on role of user.
* for representaive PF-STATUS will have 'submit' and 'show selections' button.
IF g_flag_role = 'R'.
SET PF-STATUS 'ZNOT2'.
ELSEIF g_flag_role = 'S'.
* for supervisor PF-STATUS will have 'submit' button only and for demand planner its only display access.
APPEND 'SHOW' TO g_t_fcode_exclude.
SET PF-STATUS 'ZNOT2' EXCLUDING g_t_fcode_exclude.
ELSE.
APPEND 'SUBM' TO g_t_fcode_exclude.
APPEND 'SHOW' TO g_t_fcode_exclude.
SET PF-STATUS 'ZNOT2' EXCLUDING g_t_fcode_exclude.
ENDIF.
SET TITLEBAR 'ZTNOT2'.ENDMODULE. " STATUS_9001 OUTPUT.
thanks.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |