cancel
Showing results for 
Search instead for 
Did you mean: 

back dated entries restriction based on User IDs

former_member193801
Participant
0 Kudos

Dear Gurus,

I have build the Validation rule by using the Set for restricting the back dated entries to be posted for the specific users.

It is as follows: ZABCD-SET with user id's whom i am want to restrict.

Validation rule as follows:

PREREQUISITE: Company Code = 'XXXX AND User name IN ZABCD

CHECK: Posting Date >= Entered on

MESSAGE: Back Dated Entries not allowed.

Still i am able to post the back dated documents by the user ID given in the Set.

Any Help on this really appreciated.

Regards,

RR

Accepted Solutions (1)

Accepted Solutions (1)

coleti
Active Contributor
0 Kudos

Dear Raj,

Two mistakes in there:

1) Your CHECK verification should be "Posting Date < Entered on"... that means that your posting date is before today... than you give the message error.

2) The Entered on and Entered at fields BKPF-CPUDT and BKPF-CPUTM are not yet define in the validation rule.

You should compare with the Current Date: ABAP System Fields >>> Current Date

Best regards,

Gabriel Coleti

former_member193801
Participant
0 Kudos

Dear Gabriel,

Thanks for your valuable inputs. I have written the validation as below:

Check: BKPF-BUDAT >= SYST-DATUM. I have tested couple of scenarios and it is working fine.

If you feel any correction to be done. Please clarify.

But the requirement is the validation should be applicable for the user id's other the the configured in the Sets.

So, Help on this really appreciated.

Regards,

RR

coleti
Active Contributor

Sure, you just have to create the set thru GS01 and add this set on your validation logic.

There are many postings in the SCN how to create validation with sets.

Best regards,

Gabriel Coleti

Answers (0)