cancel
Showing results for 
Search instead for 
Did you mean: 

validation rule to prevent the user from selecting a date greater than current date or System date

Nitinshetty
Explorer
0 Kudos
195

Hello experts,

While creating validation in Manage Substitution and Validation Rules in S4Hana public cloud (2408) rule to prevent the user from selecting a date greater than current date or System date when I give Posting date in Field/Function value will show the calendar to select the date and will not take condition <= SYST-DATUM

Below are the inputs I am giving while creating validation role

 

  • Field/Function: Posting Date
  • Operator: <=
  • Value: SYST-DATUM

 

Its giving below error

The value SY-DATUM of field PostingDate has a wrong format and cannot be processed.

Kindly suggest me how to give the validation role.

View Entire Topic
Cora_Phelan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Comparing two fields with operator <= is currently not possible in the fiori UI of the Substitution/Validation app. 

a workaround is to use badi in app custom fields and logic where you could have a 

Check
 BKPF-BLDAT <= SYST-DATUM

See help documentation on BAdIs for Substitution for Journal Entries

https://help.sap.com/docs/SAP_S4HANA_CLOUD/0fa84c9d9c634132b7c4abb9ffdd8f06/6d95f6fa596646f59cfb9dd0...