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: 

field validation

Former Member
0 Kudos

hi

I have to validate a field that is vbeln. if vbeln, bukrs,lifnr and fkdat all these three are in table I sshould throw some error else I would allow..

(All the four fields are in y table)

4 REPLIES 4

Former Member
0 Kudos

use the Chain ... Endchain for validating all the fields.

CHAIN.
    FIELD: your_field
      MODULE validation.
  ENDCHAIN.

0 Kudos

or else in select query or if condition cant we do?

Former Member
0 Kudos

Hi,

Try like this:

at selection-screen on vbeln.

select vbeln

bukrs

lifnr

fkdat

from <table name>

into table <internal table>

where vbeln = vbeln.

if sy-subrc eq0.

message.

endif.

Regards,

Bhaskar

former_member156446
Active Contributor
0 Kudos
loop at table itab_y into <fs_y>.
if <fs_y>-vbeln or <fs_y>-bukrs....is intial.
error message...
endif.
endloop.