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

UI Programming

sridhar_meesala
Active Contributor
0 Likes
764

Please use more informative subject in future.

Hi Every one,

I have a screen with two input fields "from" and "to", one push button, and three output only fields.

The two input fields has drop down list.

My requirement is that, when I fill the from and to fields using the drop down list and click on the push button then it should validate both the fildes and display the corresponding data in the output only fields.

I have written the following code in the PAI module but its not working.

In PAI:

CASE sy-ucomm.

WHEN 'push button'.

IF from = to.

ERR MSG.

ELSEIF from = 'a' AND to = 'b'.

o/p field 1 = 'x'.

o/p field 2 = 'y'.

o/p field 3 = 'z'.

ENDIF.

ENDCASE.

Please suggest me a solution.

thanks,

sri.

Edited by: Matt on Mar 12, 2009 10:58 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
737

Hi Sri,

Go to tcode :ABAPDOCU you can refer this sample program for your requirement

ABAP user dialogs--> Screens >Processing screens> Push buttons on screens.

Regards,

Sravanthi

8 REPLIES 8
Read only

Former Member
0 Likes
737

hi:

Slightly you have to change the code as

CASE sy-ucomm.

WHEN 'push button'.

IF not from is initial and

not to. is initial.

o/p field 1 = 'x'.

o/p field 2 = 'y'.

o/p field 3 = 'z'.

ELSE.

ERR MSG.

ENDIF.

ENDCASE.

Regards

Shashi

Read only

MarcinPciak
Active Contributor
0 Likes
737

Hi,

- check if o/p fields have corresponding data objects defined for them in the program, so data can be trasnported b/w screen and program

- check if the logic is correct (by debugging if ever condtition from = 'a' AND to = 'b' if fulfilled)

Regards

Marcin

Read only

Former Member
0 Likes
737

Hi Sri,

Please check in your screen that you have assigned the correct Function code in the field attribute of your Push button field.

If you have already assigned the function code in screen(for the push button) then the function code can not be like 'push button', it will be like 'PUSH_BUTTON'.

So please maintain it, it will work.

Best Regards,

Bhawani

Read only

Former Member
0 Likes
737

Hi,

1:First please check whether your output fields name which you have specfied in screen layout and the name you have given to them in your Top include is same or not,if not same than you have to explicitly move the values in your PBO event.

2: Check whether Function code is proper or not. Also please check whether you have assigned OK_CODE field or not to your screen attribute?This is must!!

I hope this should resolve your problem.

Regards,

Mayank

Read only

Former Member
0 Likes
737

Moved to the correct forum.

Please use an informative subject.

Rob

Read only

matt
Active Contributor
0 Likes
737

Please use more informative subject in future.

Read only

Former Member
0 Likes
738

Hi Sri,

Go to tcode :ABAPDOCU you can refer this sample program for your requirement

ABAP user dialogs--> Screens >Processing screens> Push buttons on screens.

Regards,

Sravanthi

Read only

sridhar_meesala
Active Contributor
0 Likes
737

Thanks Sravanthi.