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: 

User Exit to change ship to party details of delivery document

Former Member
0 Kudos
2,005

Hi Guys,

               I have a requirement to change ship party address before a delivery document is created.

Which Exit I can use, especially the structure name to change the values..?

Thanks

Sam

8 REPLIES 8

Former Member
0 Kudos
247

What is the source of new Ship-to-Party address? I mean where from you fetch this new address which needs to be get changed during Delivery?

Please provide some more details.............

Sijin_Chandran
Active Contributor
0 Kudos
247

Hi Sam ,

As per your requirement.

before a delivery document is created.

The Ship to party field can be check at the Sale Order creation time also.

Instead of changing it using program , you can make system to through an error message by checking  the Ship to party  field with other Partners such as Sold to party , Bill to party and Payer .

For the same purpose you can try with User Exit MV45AFZZ.

Inside that try to code inside

FORM USEREXIT_SAVE_DOCUMENT_PREPARE.

ENDFORM.


sujeet2918
Active Contributor
0 Kudos
247

Sam,

Write you logic in user exit "MV45AFZZ" routine "USEREXIT_SAVE_DOCUMENT_PREPARE" .

Regards,

Sujeet

0 Kudos
247

Thanks Sujeet. is this routine called for each line item in the order ?

I don't find any routine for Partner function handling.

if I use USEREXIT_SAVE_DOCUMENT_PREPARE, do I have to loop through VBPA or it will be called for each line item..?

even in that case there shd be at least 4 partners per line time..!!

Thanks

Sam

0 Kudos
247

Hello Sam ,

You can get all the Partners related to a sale document in table xvbpa , you can execute a READ statement in this table WITH KEY PARVW = 'WE' for getting the SHIP TO PARTY partner.

Former Member
0 Kudos
247

hi,

you want to change ship to party address for existing ship to party in sales order or you want to change entire ship to party with another person????

through some light on you requirement.

warm regards,

Jagadeesh

0 Kudos
247

Hi Jagadeesh,

                      I want to switch ship to party some other.

Cheers

Sam

0 Kudos
247

MV45AFZZ


USEREXIT_SAVE_DOCUMENT_PREPARE

in this create z table

fields,

Plant if u need plant wise


KUNNR1 type kunnr for sold to pary

KUNNR2 for ship to party

select query using sold to party

select single kunnr2 into <variable type kunnr> from ztable

where kunnr1 = vbak-kunnr.

your con modify VBFA ship to party


your answer is correct or not please reply