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

at selection screen

Former Member
0 Likes
759

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
Read only

Former Member
0 Likes
741

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
Read only

Former Member
0 Likes
741

Hi Pandu,

This should not happen,

Can you paste your whole code.

Regards,

Atish

Read only

Former Member
0 Likes
741

hi,

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

Read only

Former Member
0 Likes
741

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

Read only

Former Member
0 Likes
741

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

Read only

Former Member
0 Likes
742

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

Read only

0 Likes
741

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

regards,

pandu.

Read only

former_member404244
Active Contributor
0 Likes
741

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