Skip to Content

Validation and substitution

Hi GURUs,

I've to maintain a simple validation at line item level for a FI for T-codes FB60/FV60/F-41/F-43/F-90/F-02 and doc type KA, KG,KN,KP,KR,KZ,ML,RA,RB,RE,RK,RL,RN,AA to restrict user to post any third party vendor payment document.

So i've maintained BKPF-BLART = 'KR' (for testing) and so on in pre-requisite and in check i've created a user exit U905 and written following code

FORM u905 USING b_result.

DATA: WA_KTOKK TYPE KTOKK.

RANGES : R_LIFNR FOR LFA1-LIFNR.

R_LIFNR-OPTION = 'BT'.

R_LIFNR-SIGN = 'I'.

R_LIFNR-LOW = '2000000000'.

R_LIFNR-HIGH = '2999999999'.

APPEND R_LIFNR.

BREAK-POINT 'JMUNSHI'.

SELECT SINGLE KTOKK INTO WA_KTOKK FROM LFA1

WHERE LIFNR = BSEG-LIFNR.

IF WA_KTOKK = 'TRUV' AND BSEG-LIFNR IN R_LIFNR AND ( BSEG-BSCHL = '25' OR BSEG-BSCHL = '31' ).

b_result = B_FALSE.

endif.

after that i've maintained Error message in message section.

in SM30 i've assigned application area GBLR for view V_T80D

now i am facing following problem. Kindly confirm or suggest the alternatives.

1) in OB28, there is already another validation is maintained for the company code and line item with active status, hence system do not allow me to maintain my validation viz. "ZVPOST". Is it not required to maintain my validation as there is already a validation defined ?

2) This validation never gets called for any transaction. (I did put a break-point in the program)

Please guide me on the above whether i am missing any steps or my ussumption on point 1 is wrong.

Thanks,

Janisar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 08, 2010 at 07:23 AM

    I got the answer. You can maintain only one validation for a Company Code and Line Item/Header etc. So add your validation as a step in the validation that is already maintained in OB28.

    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.