2007 Jun 01 11:54 AM
Hi Friends I am new with ABAP.
I had developed a Module Pool Program at which i have many Text Box & some Push Buttons, now i have to enable & disable both as the condition occurs that means if i click on ADD Push button once, then it should get disabled & get enabled when i click the SAVE button.
When execute program input property of all the text boxes i had made input = 0. But now when i had pressed SEARCH button then all of them should get enabled for input.
hi ankur,
use loop at screen
endloop
with grouping and try your problem will be solve,
for point click on leftside Radio button
thanks
2007 Jun 01 12:03 PM
Hi,
write the logic as follows
In PAI I have:
CASE save_ok.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK' OR 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'SWITCH'.
PERFORM switch_edit_mode.
WHEN 'SAVE'.
PERFORM save_alv_update.
WHEN OTHERS.
ENDCASE.
Thi is the form:
FORM switch_edit_mode.
IF go_grid->is_ready_for_input( ) EQ 0.
SET PF-STATUS 'GS_100'.
CALL METHOD go_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ELSE.
SET PF-STATUS 'GS_100' EXCLUDING 'SAVE'.
CALL METHOD go_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
ENDIF.
ENDFORM.
PBO Module logic as follows,
MODULE PBO OUTPUT.
IF <your condition>.
SET PF-STATUS 'GS_100'.
ELSE.
SET PF-STATUS 'GS_100' EXCLUDING 'SAVE'.
ENDIF.
ENDMODULE.
and then remove the SET PF-STATUS statements from
SWITCH_EDIT_MODE subroutine..
Best way is to set a flag (a global variable) in SWITCH_EDIT_MODE and use it in PBO instead of go_grid->is_ready_for_input..
Some thing like the following,
in your SWITCH_EDIT_MODE routine,
IF gv_edit EQ 'X'.
CLEAR gv_edit.
****other code here to disable grid
ELSE.
gv_edit = 'X'.
****other code here to enable grid
ENDIF.
In your PBO module,
MODULE PBO OUTPUT.
IF gv_edit EQ space.
SET PF-STATUS 'GS_100'.
ELSE.
SET PF-STATUS 'GS_100' EXCLUDING 'SAVE'.
ENDIF.
ENDMODULE.
Hope this helps..
Regards
2007 Jun 01 12:06 PM
group all the buttons and text boxes that u want to enable/disable under a particular modification group and place the following code in the PBO of the screen
LOOP AT SCREEN.
IF SCREEN-GROUP1 = <group name>.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
2007 Jun 01 12:12 PM
to group all the buttons and text boxes that u want to enable/disable simulteneously, go to the screen attributes of each button/text box and give a 3 character value in the first field (u can find 4 fields ) beside the <b>Groups</b> text.
2007 Jun 01 12:33 PM
hi ankur,
use loop at screen
endloop
with grouping and try your problem will be solve,
for point click on leftside Radio button
thanks
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |