I request you some solution for me in this urgent requirement.
I have to create a partner in the sales order based on some validations with repect to bill-to party and ship-to party. The validations if success, will return me the data from an 'Z' function module which i need to populate to the new partner that will be created in the sales order.
I am using the program MV45AFZZ and the userexit USEREXIT_SAVE_DOCUMENT_PREPARE.
Now after getting the data for the new partner to be added, i have done this code..
LOOP AT ws_dealer.
xvbpa-kunnr = ws_dealer-kunwe.
xvbpa-parvw = 'ZD'.
xvbadr-telx1 = ws_dealer-primaryid.
xvbadr-name1 = ws_dealer-physname.
xvbadr-stras = ws_dealer-physstreet.
xvbadr-ort01 = ws_dealer-physcity..
xvbadr-regio = ws_dealer-physstate.
xvbadr-pstlz = ws_dealer-postalcode.
xvbadr-land1 = ws_dealer-ctrycode.
xvbadr-telf1 = ws_dealer-phone.
xvbadr-telf2 = ws_dealer-fax.
xvbadr- = ws_dealer-email.
xvbadr-telbx = ws_dealer-distance.
Now i'm getting the new partner number in the partners tab in sales order, but the new address details are not getting updated and the ship-to party address is only appearing in the screen.
Also i'm finding difficulty in updating the telex, email information in the sales order.
There are cases where some sales orders are getting created through an idoc. In that case, i have to populate the values from idoc especially the address details of all the partners to the screen and update the sales order.
Apart from populating value to all the partners, the process of scenario 1 will have to be carried again to create the 'Z' partner (if validation is successful).
For this case, i do not know which userexit i need to use. and how to go about this..
This is having a very tight deadline and it is extremely urgent for me.
Please help with your valauble answers.
Your help would certainly be appreciated and rewarded.