cancel
Showing results for 
Search instead for 
Did you mean: 

regarding updation of kna1 using sd_customer_maintain_all

Former Member
0 Kudos

Hi experts,

I have an requirment for updating url where i am inserting or deleting url's for a perticular customer. using BAPI_ADDRESSORG_CHANGE i am able to insert or delete in adr 12. but if i am inserting an url with defaultflag X then it must be updated in kna1 also. using function module sd_customer_maintain_all i am not able to update it.

These are the parameters i am passing to the function module.

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'

EXPORTING

i_kna1 = ls_kna1

i_maintain_address_by_kna1 = 'X'

pi_postflag = 'X'

pi_cam_changed = 'X'

OTHERS = 1.

IF sy-subrc = 0.

COMMIT WORK AND WAIT.

ENDIF.

please suggest me .

Thanks,

Trupti.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Alain,

Thanks for your suggestion.

I am working in 4.6 version.And according to the requirement i cann't use batch input program. So is there any function module which can help me to update the url both in adr12 & kna1.

Thanks,

Trupti.

Former Member
0 Kudos

Hi Trupti,

unfortunately nothing that I'm aware of in such release.

There is an 'in between' possibility that is expected to work without the side effect of such function module.

Update the address using FM like BAPI_ADDRESSORG_CHANGE, then trigger XD02 in batchinput and populate ONLY the initial screen + jump to address screen and save.

Relative to your requirements, just to tell you that currently in your release ALL SAP maintenance of customers is done via batchinput.

CRM-> customer, ALE distribution, ...

This is CPU intensive but reliable.

Good continuation

Alain

Former Member
0 Kudos

Hi Trupti

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|https://service.sap.com/sap/support/notes/384462]

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

As an additional information, class CMD_EI_API would fully solves your question in one step. No need of a BAPI to maintain the address.

Hope this helps

BR

Alain