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

selection screen fields validations

Former Member
0 Likes
363

Hi all,

selaction screen validation

SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln ,

if s_vbeln-high - s_vbeln-low >20

i need to raise message ie : enter 20 documents maximum

ex: s_vbeln-high = 1250

s_vbeln-low = 1275 , diffrence is 25

now raise message: enter 20 documents maximum

Please help me.

Moderator message: welcome to SDN. This is a very basic question, please (re)search yourself before asking things here.

[Rules of Engagement|http://wiki.sdn.sap.com/wiki/x/FgQ|Make sure you read this before posting!]

locked by: Thomas Zloch on Aug 5, 2010 11:35 AM

1 REPLY 1
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
333

Incorrect approach.

TABLES: vbrk.

SELECT-OPTIONS s_vbeln FOR vbrk-vbeln.

AT SELECTION-SCREEN.
  SELECT COUNT(*)
  FROM vbrk
  WHERE vbeln IN s_vbeln.

  IF sy-dbcnt > 20.
    MESSAGE 'More than 20 Billing doc selected. Please check input'
    TYPE 'E'.
  ENDIF.

BR,

Suhas