Skip to Content

Check Kna1 field before save

Hi,

I have been asked to create a validation of the VAT number before we save the data customer,

In Portugal the VAT number must obey to a some rules and we need to checked in runtime at the time as the user save the data

I tryed exit EXIT_SAPMF02D_001 with no results

BTE SAMPLE_INTERFACE_00001320 with good results if i check changes (xd02) but not if i am creating (xd01)

I tryed also BADI CUSTOMER_ADD_DATA but it is suitable to extra fields in Customer Master Data.

can someone give me the opinioon for the right way? Some sample code will be great.

What about SAMPLE_INTERFACE_00001321. It is suitable?

Thank you and best regards

João Lages Fernandes

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Aug 11, 2015 at 09:50 AM

    Use the inlcude exit ZXF04U01

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 10, 2015 at 05:56 PM

    Hi Joao,

    Can you please check with your functional consultant again, if this validation is really required? There is a standard function module STCEG_CHECK and is called based on the country settings in T005 table.

    This rule can be set using customization by the functional consultant.

    Thanks,

    Juwin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2015 at 05:40 PM

    I suppose EXIT_SAPMF02D_001 should have suffice but not.

    Can you explain in detail the validations you are trying to put on STCEG field (VAT number).

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 11, 2015 at 01:27 PM

    Hi,

    Thank you all.

    I had an error on the code so because that i get not results.

    The good news are that all the 3 ways work fine.

    Thank you and best regards

    Add comment
    10|10000 characters needed characters exceeded