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

Validation check for report program

0 Likes
1,200

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

shivakrishna1507
Explorer
1,095

If xref1 or xref2 or xref3 is initial.

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

endif.

Read only

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

RaymondGiuseppi
Active Contributor
0 Likes
1,095
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.