on 10-01-2013 11:22 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.