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

Dialog progg

Former Member
0 Likes
1,085

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,058

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

7 REPLIES 7
Read only

Former Member
0 Likes
1,058

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

Read only

0 Likes
1,058

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

Read only

0 Likes
1,058

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

Read only

Former Member
0 Likes
1,058

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

Read only

Former Member
0 Likes
1,058

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 ....

Read only

Former Member
0 Likes
1,058

loop at screen.

IF screen-name = ''PUSHBUTTON Name'.

screen-input = 0.

modify screen .

endif.

endloop.

Read only

Former Member
0 Likes
1,059

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.