‎2006 Dec 11 11:08 AM
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
‎2006 Dec 11 11:10 AM
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
‎2006 Dec 11 11:10 AM
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
‎2006 Dec 11 11:12 AM
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
‎2006 Dec 11 11:16 AM
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.
‎2006 Dec 11 11:37 AM
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...
‎2006 Dec 11 11:59 AM
loop at screen
set flag for input
if flag = '' then
screen-input = ''
else.
screen-input = ''
endif.
modify screen.
endloop.