cancel
Showing results for 
Search instead for 
Did you mean: 

Validation and substitution

janisar_munshi
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

janisar_munshi
Participant
0 Kudos

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.

Jeffrey_Holdema
Active Contributor
0 Kudos

The forum [FPM - General|; in which you originally posted your question deals mainly with the financial performance applications otherwise known as Enterprise Performance Management (EPM) carrying the BusinessObjects brand. Your question pertains to SAP [ERP Financials|; which is covered by another forum. Therefore your message has been moved. Please adjust any bookmarks you might have and post to the appropriate area in the future, that way you are assured you will have the right audience reading your posts.

Thanks and best regards,

[Jeffrey Holdeman|http://wiki.sdn.sap.com/wiki/display/profile/Jeffrey+Holdeman]

SAP Labs, LLC

BusinessObjects Division

Americas Applications Regional Implementation Group (RIG)