Skip to Content
0

Validation with sets

Feb 18, 2017 at 07:30 AM

127

avatar image

Dear Friends I have a requirement from our client is when T-codes: FB60, FB01, F-43 and MIRO when ever FI invoice is getting created if listed Company code and GL accounts in SETS and the partner ID (Field : VPTNR) is empty then an error message should be triggered.

Prerequisite :

SYST-TCODE = 'FB60' OR SYST-TCODE = 'FB01' OR SYST-TCODE = 'MIRO' OR SYST-TCODE = 'F-43'

Check :

BKPF-BUKRS IN ZFDC_BUKRS_HCP_ONLY AND BSEG-HKONT IN ZFDC_RDC1_GL_HCP_ONLY AND BSEG-VPTNR = ' '

I have created 2 sets

"ZFDC_BUKRS_HCP_ONLY" for company code restriction and "ZFDC_RDC1_GL_HCP_ONLY" GL account restriction. I have duly maintained few company codes and GL accounts in the respective sets.

Now the validation is triggering when conditioning is satisfied when I am trying to post an invoice using the T-codes that I listed above. On the other hand validation is also triggering for those company codes which are not listed in the set "ZFDC_BUKRS_HCP_ONLY". So please help me to get rid of this issue. I don't want the validation to be triggered when creating an invoice for the company codes that are not maintained in the set.

Thanks in Advance,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Eli Klovski
Feb 20, 2017 at 10:01 AM
0

Hi,

You should put BUKRS in 'pre-requisite' and not into 'Check'.

Regards,

Eli

Show 1 Share
10 |10000 characters needed characters left characters exceeded

I agree on this solution

0
Christian Drouin Feb 20, 2017 at 03:14 PM
0

Hello Tajdeen,

Before creating your validation, how the field Partner ID is populated? Is it derived or it’s a manual task? Or, did you refer to trading partner (VBUND)?

For your validation rule, this is my suggestion. First, create another SET for your T-code because one day, someone else will ask you to add another transaction. So, you will have 3 SET to manage into your validation rule.

Secondly, validate with the simulation mode into OB28. This can help to find the issue. Sometime, I try with another field (ex: cost center). This way, you will validate your rule and clarify that your problem is with the field Partner.

Regards

Christian

Share
10 |10000 characters needed characters left characters exceeded
Mukthar Ali Ahamed N Feb 21, 2017 at 04:50 AM
0

Hi Tajuddin,

Activate the validate for concern co.code in OB28. I think you have activated it for all co.codes.

Regards,

Mukthar

Share
10 |10000 characters needed characters left characters exceeded
Thajdeen S Feb 24, 2017 at 05:09 PM
0

Hi All thanks for your response,

Finally it is working with below logic

Prerequisite

( SYST-TCODE = 'FB60' OR SYST-TCODE = 'FB01' OR SYST-TCODE = 'MIRO' OR SYST-TCODE = 'F-43' OR SYST-TCODE = 'FV60' ) AND ( BKPF-BUKRS IN Z_BUKRS_HAP_ONLY AND BSEG-HKONT IN Z_RRC1_GL_HCP_ONLY )

Check

BSEG-VPTNR <> ''

Thanks for your support

Share
10 |10000 characters needed characters left characters exceeded