cancel
Showing results for 
Search instead for 
Did you mean: 

FI Validation

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Try this way in single step.

Prerequisite: (Validation is executed if WBS element is entered)

BSEG-PROJK <> ''

Check:

( SYST-TCODE IN SET1-TCODES )

OR ( SYST-TCODE = 'FB01' AND BKPF-BLART IN SET2-DOCTYPE )

Check is successful if tcode is in SET1 or Tcode is FB01 and doc type is in SET2.

Check fails and error message is thrown if both conditions fails.

Message:

Error Message

Thanks,

Vinod.

Former Member
0 Kudos

Thanks. That worked.

Answers (0)