Skip to Content
avatar image
Former Member

There is no VAT registration number for company code XXXX country XX

Hi Gurus

I want to modify an field (IHREZ) in VBAK by function module - BAPI_SALESDOCUMENT_CHANGE.

After executing the function module, it always shows "There is no VAT registration number for company code XXXX country XX" in the RETURN table.

(The VAT Registration of XXX Company in company global parameter is NULL.)

Below are my experiments:

1. Use VA02 on the screen to modify IHREZ and VAT is NULL - Successful.

2. Maintain the VAT of Company, and use BAPI_SALESDOCUMENT_CHANGE to modify IHREZ - Successful.

Question:

I have to use function module to modify IHREZ, but I don't want to maintain VAT.

(There is a similar function - SD_SALESDOCUMENT_CHANGE, and get the same result.)

Please help me to solve it.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 12, 2017 at 08:43 AM

    In general I would expect the same behavior in VA02 and in the BAPI in regard to the error messages.

    Assuming that there is no SAP bug (not seen any relevant and new OSS note for the BAPI and for error message V1694), I would conclude that the error must be caused by insufficient data provided to the BAPI.

    Had you already debugged, once in VA02 and once from the BAPI call? If I am not mistaken then the error is issued in include FV45KF0V_VBAK_LANDTX_PRUEFEN

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yes, you are right. When I set break point in FV45KF0V_VBAK_LANDTX_PRUEFEN, BAPI will get in the break point. However, VA02 is opposite.

      With you and my colleague's help, I found the EU indicator in the country of my company code (global parameter) had been checked, but the country is not a member of EU. So, when I call the BAPI, it (FV45KF0V_VBAK_LANDTX_PRUEFEN) will check the EU indicator and whether the company code is filled with VAT, if not, error message will be shown.

      Thanks for your help again!