Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add partner while creation of sales document

Former Member
0 Kudos

Hi All,

I have a requirement in which I need to add a PARTNER FUNC (forwarding agent) to the partners tab in sales order (VA01). The partner is determined from a custom table based on shipping conditions, transportation group,landing zone and country. I have chosen USEREXIT_MOVE_FIELD_TO_VBAK ( MV45AFZZ) to put my logic in. After I enter item details and hit enter and go to header->partners I see a new entry partner function (Forwarding agent) and the Partner fields populated correctly. But the address fields (Name1, City, Street etc) are empty even though the address is maintained in the master data. Once I save the document and come back in change mode even the partner field is showing '0'. The VBPA table is properly populated, I am not able to figure out why its not visible on screen. Any input is greatly appreciated.

I tried USEREXIT_SAVE_DOCUMENT but it doesn't even populate the partner function.

Thanks,

Giri..

2 REPLIES 2

Former Member
0 Kudos

You can write the code under form routine(MV45AFZZ) :

FORM USEREXIT_SAVE_DOCUMENT_PREPARE.

ENDFORM.

if you update the address in VBPA,it will not update centrally,you should update ADRC Table,then it effects into centrally

Thanks

Seshu

0 Kudos

Hi,

I have the same problem when I place the code in USEREXIT_SAVE_DOCUMENT_PREPARE. Actually I am not chaning any address in VBPA. I am just populating the partner field in partners tab. When I go back to VBPA (partners table for a sales document) I see the entry as desired but I cannot see the partner on the screen. Am i missing any thing?

Thanks,

Giri..