Updating Quotes partner function address using BAPI_QUOTATION_CREATEFROMDATA2
Something as minor as this might have been captured somewhere in the SDN blogs. But I just wanted to ensure folks get an easy way to identify this, if they run across the same issue again.
This is a pretty common function module within SAP that is used to create quotes in ECC systems.
It has got an extensive set of import parameters that serve a wide range of functionality. The trouble is, identifying the right ones.
One functionality needed was overwriting the default customer master address with an address that comes in from the source that makes this BAPI call.
In any transaction, the standard by defaults picks up the default address that is present in the customer master.
The quotation partners contain all the partner information that is to be populated into the quotes.
Within this table, there is a field for linking the additional address details that are to be provided.
This establishes the link to the table PARTNERADDRESSES in which you can pass the additional address and email details and it can update the addresses in the quote that gets created.
We just need to ensure the ADDR_NO field contains the same number. Hope this info helps to perform the same kind of update for other document types also.
BAPI_QUOTATION_CREATEFROMDATA2 is not designed to change the partner address. (It is same for BAPI_SALESORDER_CREATEFROMDATA2)
To change the address, please consider calling BAPI_CUSTOMERQUOTATION_CHANGE after quotation creation.
I will give you an example:
- PARTNERCHANGES
UPDATEFLAG U
PARTN_ROLE WE (for the ship-to party)
P_NUMB_OLD partner number you currently have
P_NUMB_NEW same as P_NUMB_OLD if you do not want to change the
partner number
ADDR_LINK some number, eg. 000001
- PARTNERADDRESSES
ADDR_NO 00001 (the value from ADDR_LINK of PARTNERCHANGES)
other fields: fill with the address data
SAP note 366265 provides more infomration on this.
Hope the information helps.
Best regards,
Hualin