cancel
Showing results for 
Search instead for 
Did you mean: 

Validations using OB28 is not working for GL posting using FB01

Former Member
0 Kudos
739

Hi Experts,

Validations using OB28 for posting using FB01 is not working.

My requirement is after entering a line items and click post validations should be triggerd.

i want to block a posting based on document type.

i have maintained as below..

Prerequisite.

( BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'FB01' ) AND (

BKPF-BUKRS = '1000' OR BKPF-BUKRS = '0001' OR

BKPF-BUKRS = '0002' ) AND BKPF-BLART = 'XX'.

check.

Used userexit to check sy-ucomm = 'BU' (for posting).

entries are maintained in OB28 for relevant company codes.

it is working for FB50 but not FB01.

same thing i tried to maintain at header level as well as item level. but it is working only for FB50 but for FB01.

Please help me.

Regards.

Venu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Simply make validation as below in GGB0

Preq

-


BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'FB01'

Check

-


BKPF-BLART <> 'XX'. (XX referred Document type that you want to be blocked)

Message

-


Message type : E

Message Class : XXX

Message Number : XXX

After you make above validation, assign this validation to company code using OB28

CoCd :1000/0001/0002

CallPnt : 0001

Validation : Validation name

Activation Level : 1

Answers (2)

Answers (2)

Muralinag14
Active Contributor
0 Kudos

please mention sys-tcode instead of BKPF-TCODE and try.

former_member220489
Active Contributor
0 Kudos

Hi Venu,

Go to GGB0 and expand the navigation till you reach the validation name of line item level and choose menu item *Validation -> Simulate.

Here you can enter the inputs, those you are entering while doing FB01 and execute it.

Then in the results, you will have the log for each step of your total validation of line item level.

Check , whether your questioned STEP's pre requisite is met and check is not fullfilled.

Accordingly you can make the changes to the STEP.

This info may help you.

Regards,

Srinivas

Former Member
0 Kudos

It's is working.. thank you all for your valuable inpus.