Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

module pool programming

former_member190312
Active Participant
0 Likes
794

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
768

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

6 REPLIES 6
Read only

Former Member
0 Likes
768

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

Read only

0 Likes
768

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

Read only

0 Likes
768

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.

Read only

Former Member
0 Likes
769

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

Read only

0 Likes
768

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

Read only

hymavathi_oruganti
Active Contributor
0 Likes
768

clear the workarea in which u r storing the material numbers