2010 Feb 09 2:42 PM
Hi Folks,
I have a requirement where on the output screen I have two buttons "Calculate" and "POST".
I need to enable the "post" button once the processing through calculate button is being done.
Please let me know how?
vishal
2010 Feb 09 2:46 PM
Hi
U should say us what the button CALCULATE does, anyway u can set a FLAG in order to be enable the button POST.
IF CALCULATE_RUN = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'POST'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Max
Hi
U should say us what the button CALCULATE does, anyway u can set a FLAG in order to be enable the button POST.
IF CALCULATE_RUN = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'POST'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Max
2010 Feb 09 2:46 PM
Hi
U should say us what the button CALCULATE does, anyway u can set a FLAG in order to be enable the button POST.
IF CALCULATE_RUN = 'X'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'POST'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.Max
2010 Feb 09 2:47 PM
Hi,
You can use export/import logic.
In PAI of the screen validate like this.
IF sy-ucomm EQ 'CALC'. " Clicked on calculate.
Do your processing...
.
.
.
.
MOVE 'CALC' to l_calc.
EXPORT l_calc TO MEMORY ID 'CALC'.
CLEAR l_calc.
ENDIF.
ENDIF.
IF sy-ucomm EQ 'POST'. " Clicked on post.
IMPORT l_calc FROM MEMORY ID 'CALC'.
IF sy-subrc IS INITIAL.
Process your posting logic.
ELSE.
MESSAGE 'Calculate has not happened' TYPE 'E'.
ENDIF.
ENDIF.
Thanks,
Vinod.
2010 Feb 09 2:48 PM
Hi,
You can manage a global variable (flag) to know when the "calculate" button has been pressed. And in the PBO you can desactive the "post" button if the flag is not ticked.
IF gv_flag_calculate IS INITIAL.
LOOP AT SCREEN.
IF screen-name = 'POSTBUTTON'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Hope this help
2010 Feb 09 2:48 PM
hi,
in your PBO write the code like this.
if ok_code = 'CALCULATE' "capture sy-ucomm for calculate button.
loop at screen.
screen-name = name of the push button for POST.
screen-active = 1.
modify screen.
endloop.
else.
loop at screen.
screen-name = name of the push button for POST.
screen-active = 0.
modify screen.
endloop.endif.
regards,
sakshi
2010 Feb 09 2:55 PM
Hi,
IN PBO,
module check_calc.
module check_calc.
if chk_calc = 'X'. if Calculations are done then Enable POST button
LOOP AT SCREEN.
IF screen-name = 'POST'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
else.
if Calculations are not done then Disable POST button
LOOP AT SCREEN.
IF screen-name = 'POST'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
endmodule.
IN PAI.
ok_code = sy-ucomm.
case ok_code.
when 'CALCULATE'.
Do you processing and after that enable the post button.
chk_calc = 'X'.
endcase.
hope it helps you,
Regards,
Abhijit G. Borkar
2010 Feb 10 6:04 AM
Thanks folks for replying. It helps me to resolve the issue.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |