Update Partner Address during Sales document Creation in Exit MV45AFZZ

Hello Experts: 

ive been trying to solve this but havent found any threads so heres my issue: 

i have a requirement in which using ABAP i need to update a SHIPTO Partner’s adress, this im trying to do inside the user exit MV45AFZZ in the USEREXIT_SAVE_DOCUMENT_PREPARE specifically. 

im using ADDR_GET to fetch the information of the WE Address to get the Ship to Address.

im passing that info along with my changes with bapi ‘ADDR_UPDATE’  which gives me no errors what so ever. 

then i use ADDR_MEMORY_SAVE and to this the system gives me the Exception “Address_number_missing” and then i run ADDR_MEMORY_CLEAR

from debugging i can see 2 things: 1.- that the address im trying to change ( fetched from XVBPA and XVBADR) is the Master data but when i create manually a Sales order i can see that if i change any values to the date, it creates a separate Addres number which cointains the specific data of that partner’s address in the Sales document (VBPA) but that number is not being created when i dont change anything  to the partner’s address at the point of my User exit’s code. 

This makes me thing that i might need to create the address number or at least indicate it somehow.

 

Has anyone done anything like this or has any threads with the information i need to 
“CHANGE BUSINESS PARTNER’s ADDRESS DURING SALES ORDER CREATION’ 

 

Thanks i really appreciated. 

Scroll to Top