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

No values from selection screen

Former Member
0 Likes
1,899

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,297

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.

5 REPLIES 5
Read only

Former Member
0 Likes
1,297

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

Read only

Former Member
0 Likes
1,298

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.

Read only

viquar_iqbal
Active Contributor
0 Likes
1,297

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!

Read only

Former Member
0 Likes
1,297

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

Read only

Former Member
0 Likes
1,297

Hi,

Use At Selection-Screen event.

Regards,

Jyothi CH.