‎2006 Aug 17 7:23 AM
Hi all,
i want to add two 'clear' push buttons on one module pool screen.one is clear_all & the other is clear_last.
there is a field '2dbar' , on screen 100.
after 1st scan, vendor no. will come.so after 1st scan 2dbar contains .
vmotorola
after 2nd scan, material no will come to 2dbar.so 2dbar now contains
vmotorola,ptest0001
where vmotorola is vendor & ptest0001 is material.
i want to put clear_all push button to clear
all the contents of 2dbar.
& clear_last will clear the value of last scan which alrady came to 2dbar.
for example: 'ptest0001' is my last scan data.
so clear_last push button will clear ptest0001 only.
ex.
vmotorola,ptest0001,q110
here clear_last will clear 'q110' only.
plz give me the suggestion that how i can put two clear buttons on one module pool screen & the logic for clear_last push button.
thanks in advance.
Regards
pabitra
‎2006 Aug 18 4:12 AM
Hi Pabitra,
Create TWO push buttons CLEAR_ALL with FCT 'CLAL' and
CLEAR_LAST with FCT 'CLST'.
Now in the PAI,
AT USER-COMMAND.
l_OKCODE = sy-ucom.
CASE L_OKCODE.
WHEN 'CLAL'.
clear 2dbar.
WHEN 'CLST'.
l_val = 2dbar.
clear 2dbar.
2dbar = l_val+0(10). "I have assumed that 1st field has length 10
ENDCASE.
Best regards,
Prashant
‎2006 Aug 17 7:28 AM
hii pabitra
you r requiremnt is very confusing .. but i dont know y ru facing any problem regarding clearing the button .. juat clear ur variables used by clear command ..
Thanking you
rohit gupta
‎2006 Aug 18 3:40 AM
Hi,
can i put two clear push buttons on one module pool screen? i tried to put two clear push buttons--clear_all & clear_last.both having same FCT code CLR.error message is comming that u can not assign CLR two times.
is there any way?
Thanks.
pabitra
‎2006 Aug 18 4:14 AM
I was able to add two pushbuttons, CL1 and CL2. Both had the same FctCode 'CLEAR'. There should not be a problem.
But it is a bit puzzling. Surely you want to be able to act differently depending on which button is pressed. But you won't be able to do this if they have the same FC as each other.
‎2006 Aug 18 4:12 AM
Hi Pabitra,
Create TWO push buttons CLEAR_ALL with FCT 'CLAL' and
CLEAR_LAST with FCT 'CLST'.
Now in the PAI,
AT USER-COMMAND.
l_OKCODE = sy-ucom.
CASE L_OKCODE.
WHEN 'CLAL'.
clear 2dbar.
WHEN 'CLST'.
l_val = 2dbar.
clear 2dbar.
2dbar = l_val+0(10). "I have assumed that 1st field has length 10
ENDCASE.
Best regards,
Prashant
‎2006 Aug 18 12:13 PM
Hi prasanta,
thank u for ur answer.but we r using alphanumeric editor in place of screen painter.here, every push button refers to a entry in a data base table.
This data base table contains push_save,push_clr,push_back etc.so while i am putting any push button , i have to refer to this table.so only one push_clr button is there in table.
i tried to use clear_all & clear_last on my screen.both button refers to the same field(push_clr) in data base table. so while assigning clear_last,error message is comming. error is 'u can not assign one field twice on one screen'.so i am in trouble now.
is there any way? plz reply.
Regards
pabitra
‎2006 Aug 18 5:05 AM