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: 

Validation check for report program

0 Kudos

Hi,

I'm new to abap, can anybody tell me how to proceed with the below validation part in a report program, I need the warning message even if a single line fails validation ?

Can anyone suggest/help me with the syntax I need to use ?

Thanks,

Ayush

3 REPLIES 3

shivakrishna150
Explorer

If xref1 or xref2 or xref3 is initial.

Message 'Please check Reference fields entries' type 'W'.

endif.

  • Replace or with and, requirement is 'if all the fields are blank'
  • Add the 'is initial' for each field else syntxa error

raymond_giuseppi
Active Contributor
0 Kudos
IF <fs>-bsart = 'XT' 
AND ( <fs>-xref1 is initial AND <fs>-xref2 is initial AND <fs>-xref3 is initial ). 
  MESSAGE 'Please check Reference fields entries.'(001) TYPE 'W'.
ENDIF.

Look also at Statement IF syntax and Logical Expressions (log_exp) in online help and review your ABAP course materials.