Skip to Content
author's profile photo Former Member
Former Member

Validation Check

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2008 at 10:11 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2008 at 10:16 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2008 at 10:20 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2008 at 11:26 AM

    Hi,

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

    A cash journal can never be negative.

    Kind regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:34 AM

    thanks to all you..

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.