‎2009 Feb 24 3:59 AM
Hi ppl,
I have written a report program which has 3 parameters on the selection screen (Personnel number - pernr, trip number - reinr and status - abrec).
I have a subroutine to check for the validity of the personnel number entered on the screen. The other two parameters do not have any validity check.
I am using these 3 parameters in my SELECT statement. But, the problem is that when I execute it, at runtime, only the parameter for personnel number shows the value entered on the selection screen. The other two parameters show initial value at runtime though an entry has been made on the selection screen. Thus, it returns a subrc value of 4 though there are matching entries.
Has anybody face such a problem? Please advise.
Thanks.
‎2009 Feb 24 4:13 AM
Hi David,
Mentioning the event AT SELECTION SCREEN should resolve your problem.
This will ensure that the values are picked from the selection sreen for all the parameters.
(Else, if you do not use this event, your SELECT statement will not execute successfully the first time. But, if you execute your program again, it will fetch correct values.)
Hope it solves your problem.
Thanks,
Dawood.
‎2009 Feb 24 4:07 AM
Hi
Use AT SELECTION SCREEN event for the rest of the parameters as well, then your values will be populated automatically(whtever u enter on the screen )
Cheers
Ravish
‎2009 Feb 24 4:13 AM
Hi David,
Mentioning the event AT SELECTION SCREEN should resolve your problem.
This will ensure that the values are picked from the selection sreen for all the parameters.
(Else, if you do not use this event, your SELECT statement will not execute successfully the first time. But, if you execute your program again, it will fetch correct values.)
Hope it solves your problem.
Thanks,
Dawood.
‎2009 Feb 24 4:13 AM
Hi
At selection-screen.
perform pernr check.
if sy-subrc Ne 0.
message 'incorrect ' type E.
start of selection.
select statement where pernr = p_pernr ........
so the select statement wont execute when there is an incorrect value entered for pernr.
Hope this helps!
‎2009 Feb 24 4:17 AM
Hi David,
Kindly check your code, you must be changing or clearing values which entered in selection screen.
Hope it helps, ohterwise just paste your code here.
Pratik Vora
‎2009 Feb 24 4:19 AM