‎2009 Mar 10 11:52 AM
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
‎2009 Mar 16 9:18 AM
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
‎2009 Mar 10 12:19 PM
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
‎2009 Mar 10 12:27 PM
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
‎2009 Mar 11 3:51 AM
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
‎2009 Mar 11 8:23 PM
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
‎2009 Mar 11 8:40 PM
Moved to the correct forum.
Please use an informative subject.
Rob
‎2009 Mar 12 9:59 AM
‎2009 Mar 16 9:18 AM
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
‎2009 Mar 24 12:35 PM