Skip to Content
avatar image
Former Member

Validation with sets

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Feb 20, 2017 at 10:01 AM

    Hi,

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

    Regards,

    Eli

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 20, 2017 at 03:14 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 21, 2017 at 04:50 AM

    Hi Tajuddin,

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

    Regards,

    Mukthar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2017 at 05:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded