2010 Feb 15 6:46 AM
Hi,
I am not able to disable button. my requirement is to disable button after clicking the same button by user. so that user will not able to click again. I tried mant SCREEN options allready but unsuccessfull.
Similar code is working fine for text-filed in my code and able to enable and disable text field on button click
Here is problamatic code.
CASE sy-ucomm .
WHEN 'B_BACK'.
leave TO SCREEN 0.
WHEN 'B_SAVE'. " --> button tcode is B_SAVE
LOOP AT SCREEN. "----
> Problem is here
IF screen-name = 'B_NAME_SAVE'. "--> name of button is B_NAME_SAVE
screen-active = '0'. "screen-invisible = 1. "screen-output = 0. "screen-active = 0.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP .
ENDCASE.
ENDMODULE.
2010 Feb 18 5:17 AM
hi,
EXIT is control break statement for loop nothing wrong to use this....whenever logic required to exit from the loop it used.
Regards
Gaurav
hi,
EXIT is control break statement for loop nothing wrong to use this....whenever logic required to exit from the loop it used.
Regards
Gaurav
2010 Feb 15 7:39 AM
hi,
declare a lflag variable. when button is clicked set the flag. in pbo disable only if the flag is set. i have added some lkines in ur logic please chek.
data: lv_flag type c.
in PAI
CASE sy-ucomm .
WHEN 'B_BACK'.
leave TO SCREEN 0.
WHEN 'B_SAVE'. " --> button tcode is B_SAVE
lv_flag = 'X'.
PBO.
LOOP AT SCREEN. "----
> Problem is here
if lv_flag = X.
IF screen-name = 'B_NAME_SAVE'. "--> name of button is B_NAME_SAVE
screen-active = '0'. "screen-invisible = 1. "screen-output = 0. "screen-active = 0.
MODIFY SCREEN.
EXIT.
ENDIF.
endif.
ENDLOOP .
ENDCASE.
ENDMODULE.
2010 Feb 15 7:41 AM
2010 Feb 15 12:18 PM
Hi Raghavendar,
thanks for prompt reply ...I got the solution.
I would also like to thanks ALEX. as I got my problem solved by some manipulation based on his reply in following link:
HI raghu ...
I was using EXT in Loop so that execution time will be shortened .......Can u guide me what is wrong by using EXIT here.
2010 Feb 18 5:17 AM
hi,
EXIT is control break statement for loop nothing wrong to use this....whenever logic required to exit from the loop it used.
Regards
Gaurav
2010 Feb 18 9:22 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |