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

field validation

Former Member
0 Likes
578

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

Former Member
0 Likes
520

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

CHAIN.
    FIELD: your_field
      MODULE validation.
  ENDCHAIN.

Read only

0 Likes
520

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

Read only

Former Member
0 Likes
520

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

Read only

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