‎2009 Feb 17 10:46 AM
Hi All ,
i have a requirment on module pool.
i.e. keep one push button in application tollbar, if once select the push buttonn fields should be in change mode again select the same push button the fields should be in display mode.
how can it posible please tell me................
thanku,
Rohini
‎2009 Feb 17 10:47 AM
Hi,
use set pf-status 'XYZ'.
In this u can create buttons for processing.
‎2009 Feb 17 10:50 AM
Hi,
You can use SET PF-STATUS command to create your own status and you can add push buttons in that status. After adding you can place the code using AT USER-COMMAND and SY-UCOMM .
Regards
Harris
‎2009 Feb 17 10:55 AM
hi
i created set pf-status and cteated push butoton in application tool bar.
but i can use that one push button to two different actions, i.e. change and display.
that is my problem
please help on that one.
Thanks
Rohini
‎2009 Feb 17 11:03 AM
Hi,
Create two buttons CHANGE and DISPLAY
if condition
set pf-status 'XYZ' excluding 'CHANGE' immediately.
else.
set pf-status 'XYZ' excluding 'DISPLAY' immediately.
endif.
‎2009 Feb 17 10:54 AM
Hi,
Write the below code in pbo.
" Define a variable wa_fcode in top include
" Data : wa_fcode(10).
Case ok_code.
when 'FCODE'
wa_fcode = ok_code.
" This is for input Disable
loop at screen.
if screen-name = 'SCREENNAMES'.
screen-input = 0.
modify screen.
endloop.
endcase.
" This is for input enble
if wa_fcode = 'FCODE' "------function code of button in Application tool baar.
clear wa_fcode.
loop at screen.
if screen-name = 'SCREENNAMES'.
screen-input = 1.
modify screen.
endloop.
endif.Thanks & Regards
Always Learner
‎2009 Feb 17 10:55 AM
Hi,
do like this..
data:
w_flag type i value 1.
set pf-status 'GUI'.
*Just double click on GUI and crete u r own button.
at user-command.
case sy-ucomm.
when 'PushButton'.
if w_flag eq 1.
perform change.
w_flag = w_f;ag + 1.
else.
perform change.
endcase.
Regards
Kiran
‎2009 Feb 17 11:03 AM
Hi,
Try this...
Suppose the textboxes that you want to enable or diable are txt1 and txt2. Assue that when the program runs for the first time both are enabled. In the PBO of the screen under module
if sy-ucomm = 'CHANGE'.
if flag = 1.
loop at screen.
if screen-group1 = '111'.
screen-input = 0.
modify screen.
endif.
endloop.
flag = 0.
else.
loop at screen.
if screen-group1 = '111'.
screen-input = 0.
modify screen.
endif.
endloop.
flag = 1.
endif.
endif.
both the textboxes must be assigned group1 as 111 in design mode (just double click on the element and on the element attribute enter 111 in the first group box.).
When you press CHANGE it will check the value of flag and accordingly change (enable/disable) and everytime it will toggle as the value of flag is changed.
Hope this helps.
Regards,
Sachin
‎2009 Feb 17 11:11 AM
Hi,
Use the below logic,
Say for example your field name is field and fcode of pbutton is PUSHBUTTON.
CASE ok_code
when 'PUSHBUTTON'.
LOOP AT SCREEN.
IF screen-name = 'FIELD'.
IF screen-input = 1. " If it is 1
screen-input = 0. " change it to 0
ELSE. "Else if it is 0
screen-input = 1. "Change it to 1
ENDIF.
MODIFY SCREEN.
ENDIF.
...
ENDCASE.Regards,
Manoj Kumar P