cancel
Showing results for 
Search instead for 
Did you mean: 

Validation to allow few document types with 2 specific tax codes only

fanisa_1991
Explorer
0 Kudos

Hi Folks,

We have a requirement to restrict document types XX & YY and for "ABCD" and "1234" company codes to post only with "AX" and "BX" tax codes.

Validation is written this way :

Prerequisite:

BKPF-BLART IN XX_DOC_TYPES AND BKPF-BUKRS IN YY_COMPANYCODES

Check:

NOT BSEG-MWSKZ IN AB_TAX_CODE

Error Msg - Doctype is only allowed to post to AX or BX Tax codes

XX_DOC_TYPES ; YY_COMPANYCODES and AB_TAX_CODE are sets maintained.

However, it is not working as expected.

Kindly let us know if there is any correction as per the requirement.

Regards,

Fanisa.

Paulo_Vitoriano
Active Contributor

remove NOT from the check.

View Entire Topic
anand_raichura
Contributor
0 Kudos

Hi Fanisa,

Please remove NOT from check.

Regards,

Anand Raichura

fanisa_1991
Explorer
0 Kudos

Hi Paulo and Anand,

even then it's not working. As per below information in Validation, I have kept NOT there.

Kindly suggest the correct way to proceed.

Regards,

Fanisa.

anand_raichura
Contributor
0 Kudos

Hi Fanisa,

Your requirement is to have only this tax code so NOT is inappropriate for Check. Kindly check following :

1. Whether you have assigned the validation to company code and activate the same

2. Whether you have kept the message type as error

3. Check whether validation is called by selecting expert trace and breakpoint

This should help you to troubleshoot the issue.

Regards,

Anand Raichura