cancel
Showing results for 
Search instead for 
Did you mean: 

Validation Check

Former Member
0 Kudos

I want to create a validation as follows:

Whenever the user posts to Cash account, the cash GL account balance should not go below zero i.e. balance should not come negative. I am not very clear about the check condition I should give. If anybody can help with the the pre-requisite & check conditions, it would be highly helpful.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There are only 2 tables for FI (BKPF and BSEG) available in the validation and I am sure that the balance will not be available at the validation area.

I would suggest that you go in for a BADI or enhancement point for this check.

Cheers.

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks to all you..

dominic_holdstock
Active Contributor
0 Kudos

Hi,

As an alternative , configure CASH Journals for your cash accounts.

A cash journal can never be negative.

Kind regards

Former Member
0 Kudos

Hi

use the following user exit.

DATA : acct_bal LIKE glt0-tsl01.

b_result = b_true.

SELECT * FROM tbsl

WHERE bschl = bseg-bschl.

IF tbsl-shkzg = 'H'. " Crediting -


Do the Checking

SELECT * FROM glt0

WHERE bukrs = bkpf-bukrs " Comp Code

AND ryear = bkpf-gjahr " Fiscal Year

AND racct = bseg-hkont " Account No.

AND rbusa = bseg-gsber " Business area

AND rpmax = '016'. " Posting periods

acct_bal = acct_bal + glt0-tsl01 + glt0-tsl02 + glt0-tsl03

+ glt0-tsl04 + glt0-tsl05 + glt0-tsl06

+ glt0-tsl07 + glt0-tsl08 + glt0-tsl09

+ glt0-tsl10 + glt0-tsl11 + glt0-tsl12

+ glt0-tsl13 + glt0-tsl14 + glt0-tsl15

+ glt0-tsl16 + glt0-tslvt.

ENDSELECT.

IF acct_bal < bseg-wrbtr.

b_result = b_false.

ENDIF.

ENDIF.

ENDSELECT.

Saurabh

Former Member
0 Kudos

Hi

Thanks for the response

Could you please tell me (1) Enhancement; (2) Name of the User Exit where I have to write the code given by you.

iklovski
Active Contributor
0 Kudos

Hi,

You should create a ZGGBR000 program, by copying from GGBR000 and put your user-exit there. The, in transaction GCX2 you link your validations to that new program. Check note 842318 for further info.

Regards,

Eli

Former Member
0 Kudos

Hi,

create the user exit in validation OB28.

Saurabh

Former Member
0 Kudos

Hi

Go to TCode:-GGB0 Click on Financial Accounting - Line Item - then click on Validation Button then create a Validation name and description, then keep ur cursor on the new validation folder and then click on step button give the validation step description, click on Prerequisite, click on Accounting document segment (right side bule colour) select BSEG-HKONT and give your GL Cash account (that is ur prerequisite) select = button (on ur right hand side), then select constant button (or ur right hand side) give ur GL cash account number.

Click on Check then give ur check condition as per the requirment and click on message give ur message as per ur requirment.

Thank you

LLVB