Skip to Content
0
Former Member
Oct 01, 2013 at 10:22 PM

FI Validation

30 Views

Hello all,

I am trying to write validation but have run into some issue. The requirement is to allow postings to WBS when using certain tcodes
(e.g. GJ03, GJ04, etc). A 2nd requirement is the ability to post to WBS when tcode is FB01 and BSEG-BLART is XX or XY. I have maintained a set for the list of tcodes (SET1-TCODES)another set for Doc types (SET2-DOCTYPE)

I wanted to put this as one validation but could not get it to work so I am breaking it up into 2 validation steps.

This is what I have currently for Step 1:

Prerequiste:

( NOT SYST-TCODE
IN SET1-TCODES AND BSEG-PROJK <> '' )

Prerequiste::

FALSE

Message:

Not allowed

This is what I have currently for Step 2:

Prerequiste:

( NOT SYST-TCODE = 'FB01' AND BKPF-BLART IN SET2-DOCTYPE AND BSEG-PROJK <> '' )

Check:

FALSE

Message:

Error

Step 1 seems to work fine but Step 2 does not work. When I use doc type XX or XY in FB01 and put a WBS, I get an error not allowing me to post. However, that combination should work. Step 2 should only fail if user uses a doc type that is NOT in SET2-DOCTYPE and tries to post to a WBS using FB01.

Can someone point out what I am doing wrong with my validation? Also is it possible to have the validation in 1 step rather than splitting it into two?

Appreciate any help.