cancel
Showing results for 
Search instead for 
Did you mean: 

Changing postal code and city in customer adresses

Former Member
0 Kudos

Hi,

I have a portal application in JSP dynpages, which calls several BAPIs in the SAP backend.

There are two BAPIs for creation and change of customer information. They are both developed in batch input/call transaction. Now we have the issue, that there can be more then one cities to one postal code, which means, that you get a popup in the sap transaction to choose the city to the postal code.

I have now tried to fix the batch input that this works also in the portal application, but it's not possible to use these transactions anymore. Always the first city to the postal code will be changed.

So I have used the BAPI "BAPI_ADDRESSORG_CHANGE" to change the postal code and the city, and when I check the changed customer in XD02/XD03, the postal code and the city have been changed successfully. But the changes haven't een done in KNA1. And as the portal function, which is used for displaying customer information, reads the customer data from KNA1, these values are still wrong.

Does anybody know how I can change also the values in KNA1? It can't be right to have different values in KNA1 and the customer address now...

Thank you!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

U can use "BAPI_ADDRESSORG_SAVEREPLICA" BAPI to chab=nge postal code and city in customer address.

Regards,

Sayali

Former Member
0 Kudos

Hi,

As it was suggested in different threads, you may think to continue updating the address with the BAPI_ADDRESS** and right after the commit, simply trigger XD02 transaction in batchinput + ensuring that ZAV_FLAG is checked in the initial screen then save. This would re-synchronise the master data with the address.

An alternative in one step would be to trigger class CMD_EI_API directly with one of the MAITAIN methods.

Additionallly, SD_CUSTOMER_MAINTAIN_ALL is used in standard during the maintenance of a consumer using the standard customer master data transaction XD01 & XD02.

It is not intended to be used out of the transaction and in no case it should be used out of its original context. Due to the specificity of the function module, out of the original context we may face limitations and data inconsistencies.

This is precisely what you face in your case.

For the maintenance of customers, there is NO BAPI and NO direct function module.

There are some functions modules like the one above where the name is looking nice. But these should not be used.

  • Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See note 384462

  • Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API

Hope this helps

BR

Alain

Former Member
0 Kudos

have you call the FM: BAPI_TRANSACTION_COMMIT after the your BAPI is called, check this just in case...

or try to use the FM: SD_CUSTOMER_MAINTAIN_ALL

Edited by: srinivas reddy on Feb 17, 2010 8:57 AM