2007 Apr 27 10:51 AM
hi ,
THIS IS VIJAY HERE, PLZ HELP ME TO SORT OUT MY ISSUE.
program sapmza_bgtype.
tables: zfit_bgtype.
data: v_open_type(1) type c.
data: i_ucomm like sy-ucomm occurs 0 with header line.
data: t_bgtype like zfit_bgtype occurs 0 with header line.
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
module user_command_0100 input.
case sy-ucomm.
when 'NEW'.
when 'BACK'.
leave program.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
module status_0100 output.
set pf-status 'BUTTONS'.
endmodule. " STATUS_0100 OUTPUT
&----
*& Module value_help INPUT
&----
text
----
module value_help input.
select bg_type from zfit_bgtype
into corresponding fields of table t_bgtype.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BG_TYPE'
value_org = 'S'
tables
value_tab = t_bgtype.
endmodule. " value_help INPUT
&----
*& Module SAVE INPUT
&----
text
----
module save input.
case sy-ucomm.
when 'SAVE'.
insert zfit_bgtype from t_bgtype.
endcase.
endmodule. " SAVE INPUT
&----
*& Module set_screen_100 OUTPUT
&----
text
----
module set_screen_100 output.
if sy-ucomm ne 'NEW'.
loop at screen.
check screen-group1 = '001'.
screen-input = '0'.
modify screen.
endloop.
endif.
endmodule. " set_screen_100 OUTPUT
&----
*& Module set_status_100 OUTPUT
&----
text
----
module set_status_100 output.
append 'SAVE' to i_ucomm.
set pf-status 'BUTTONS' excluding i_ucomm.
endmodule. " set_status_100 OUTPUT
and in module pool......................................................
process before output.
module status_0100.
module set_status_100.
module set_screen_100.
process after input.
module user_command_0100.
module change.
module save.
process on value-request.
field t_bgtype-bg_type module value_help.
with this code i m able to get the save button disabled but it is not activating when i m pressing new or change button.
and please suggest me the code for
some new functionality like when we go for value help then we can select any antry for change and when we press change button then we can change the entry and then save it.
thanks in advance
marks will b sure*
regards
vijay
2007 Apr 27 10:54 AM
&----
*& Module set_screen_100 OUTPUT
&----
text
----
module set_screen_100 output.
if sy-ucomm ne 'NEW'.
loop at screen.
check screen-group1 = '001'.
screen-input = '0'.
modify screen.
endloop.
else if sy-ucomm eq 'NEW'.
loop at screen.
check screen-group1 = '001'.
screen-input = '1'.
modify screen.
endloop.
endif.
2007 Apr 27 10:57 AM
In your PBO module..
If Sy-Ucomm = 'DISP'.
Set Pf-Status 'BUTTONS' excluding..
Else.
Set Pf-status 'BUTTONS'.
EndIf.
Santhosh
Santhosh