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

Deactivate Buttons runtime

Former Member
0 Likes
621

Hi All,

I have created program with module pool for editing adn saving the entries from table contrl.

New requirement is that I have use the same program and new T-codes but with the display access and not allow to changes the record from the table control.

Is it possible to deactive Save button programatically or any other way ?

One method I have used is I m checking the t-code and if it is for display then I have commented the code I have written for the Save command.

Is there any other way to do this?

Thanx.

-Umesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
597

YOu have to just use the

set pf-status <your status> excluding extab.

extab should have the list of fcodes that need to be deactivated.

Regards,

ravi

5 REPLIES 5
Read only

Former Member
0 Likes
598

YOu have to just use the

set pf-status <your status> excluding extab.

extab should have the list of fcodes that need to be deactivated.

Regards,

ravi

Read only

Former Member
0 Likes
597

Hello Umesh,

You can de-activate the Save button by excluding it while setting your GUI Status. You can use the excluding addition with SET PF-STATUS.

set pf-status 'STATUS' excluding itab.

itab must contain the list of function codes to be de-activated.

For e.g:

begin of itab occurs 1,

field type sy-ucomm,

end of itab.

itab-field = 'SAVE'.

append itab.

set pf-status 'TEST' excluding itab.

Manoj

Read only

Former Member
0 Likes
597

Hello,

you may modify the properties of buttoms with:

Loop at screen.

endloop.

before call to STATUS_XX.

Also you may modify the properties of input - output of the field:

A snipet of code:

LOOP AT SCREEN.

IF FLG IS INITIAL.

SCREEN-INPUT = 0.

ELSEIF ( FLG EQ 'Y' ).

IF ( ( SCREEN-NAME = 'T_MAKT-MAKTX'

OR SCREEN-NAME = 'T_MAKT-PICK' )

AND T_CTRL-CURRENT_LINE LE LN ) .

  • Making the screen fields as editable

SCREEN-INPUT = 1.

ELSEIF ( ( SCREEN-NAME = 'T_MAKT-MATNR' )

AND T_CTRL-CURRENT_LINE LE LN ).

  • Making the screen field as uneditable

SCREEN-INPUT = 0.

ENDIF.

ENDIF.

  • Modifying the screen after making changes

MODIFY SCREEN.

ENDLOOP.

Regards.

Read only

Former Member
0 Likes
597

Hi,

check this.. I hope this will help..

**>> Display mode

WHEN 'DISP'.

PERFORM it_fcodes_1_fill.

SET PF-STATUS 'STATUS_9002' EXCLUDING it_fcodes_1.

SET TITLEBAR 'TITLEBAR_9002_SHO'.

&----


*& Form it_fcodes_1_fill

&----


  • text

----


FORM it_fcodes_1_fill.

**>> Functions to be deactivated in the display mode

REFRESH it_fcodes_1. CLEAR it_fcodes_1.

**>> Function show in display mode no meaning

it_fcodes_1-fcode = gc_fcode_show.

APPEND it_fcodes_1.

**>> Save function is not diserable

it_fcodes_1-fcode = gc_fcode_save.

APPEND it_fcodes_1.

**>> Function Abbort is not diserable

it_fcodes_1-fcode = gc_fcode_abbr.

APPEND it_fcodes_1.

ENDFORM. " it_fcodes_1_fill

Let me know if you have any problem...

Read only

Former Member
0 Likes
597

loop at screen

set flag for input

if flag = '' then

screen-input = ''

else.

screen-input = ''

endif.

modify screen.

endloop.