2023 Sep 27 5:28 AM
Hi,
Please find attached a screenshot adrv-fetching-issue.png.
After deleting the existing plant from V_T001W, a new plant is recreated with the same name. Now when trying to change the address of a newly created Plant using BAPI_ADDRESSORG_CHANGE, it updates the address in the ADRNR of the deleted plant instead of the ADRNR of the new plant.
On further debugging BAPI_ADDRESSORG_CHANGE, I found that /FTI/ORG_ADDRESS_CALLBACK_GEN always fetches the first row from the ADRV table which is ADRNR of the deleted Plant. Ideally, the select query on ADRV should have a filter on ADDRESS_GROUP = 'CA01' to fetch the correct ADRNR.
Please help. Thank you.