Application Development 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: 

at selection screen

Former Member
0 Kudos
77

i have some problem in my at selection screen event.

i have written some condition like.

if plifnr gt '1000'

message w001.

else.

select single * into corresponding fields of itab from lfa1 where lifnr = plifnr.

endif.

plifnr is selection screen field..

if i give any number also its giving that message only.. its not executing properly..

can anybody tell me what is wrong in that...

thanks & regards,

pandu.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
59

Hi

PLIFNR is a paramter or select-options

If it is declared as PARAMETERS then the code is Ok

if plifnr gt '1000'

try changing it to

if plifnr gt '0000001000'.

message ...

endif.

If it is a Select-options then give

if plifnr-low gt '0000001000' .

message..

endif.

Try as above and see

<b>Reward points for useful Answers</b>

Regards

Anji

7 REPLIES 7

Former Member
0 Kudos
59

Hi Pandu,

This should not happen,

Can you paste your whole code.

Regards,

Atish

Former Member
0 Kudos
59

hi,

No need to give the number in qoutes.U have to give only the string in quotes.

Former Member
0 Kudos
59

Hello,

Check this.


PARAMETERS: P_LIFNR LIKE LFA1-LIFNR.

AT SELECTION-SCREEN ON P_LIFNR.

  IF P_LIFNR GT 1000.
    MESSAGE E999(Z48MM) WITH 'this is invalid vendor'.
  ENDIF.

Vasanth

Former Member
0 Kudos
59

hi

if statement or comparison might be wrong.

what is the data type of plifnr.?

then 1000 sould also belong to the same type.

else declare a var like plifnr.

assign 1000 to it.

and then if plifnr gt var.

proceed...

reward if useful

Former Member
0 Kudos
60

Hi

PLIFNR is a paramter or select-options

If it is declared as PARAMETERS then the code is Ok

if plifnr gt '1000'

try changing it to

if plifnr gt '0000001000'.

message ...

endif.

If it is a Select-options then give

if plifnr-low gt '0000001000' .

message..

endif.

Try as above and see

<b>Reward points for useful Answers</b>

Regards

Anji

0 Kudos
59

thank u .. i got it. but its not low. i tried with high..

regards,

pandu.

former_member404244
Active Contributor
0 Kudos
59

Hi,

Try like this

if plifnr gt 1000

message w001.

else.

select single * into corresponding fields of itab from lfa1 where lifnr = plifnr.

endif.

Regards,

nagaraj