cancel
Showing results for 
Search instead for 
Did you mean: 

While creation with SD_CUSTOMER_MAINTAIN_ALL,the BADI and UserExit r not tr

Former Member
0 Kudos

Hi Friends,

During Customer creation mode with our own tcode and function module SD_CUSTOMER_MAINTAIN_ALL ,

our own defined user exit EXIT_SAPMF02D_001 and BADI CUSTOMER_ADD_DATA are not getting triggered, only BADI ADDRESS_UPDATE is getting triggered. But, during Customer change mode user exit EXIT_SAPMF02D_001 and BADI CUSTOMER_ADD_DATA along with BADI ADDRESS_UPDATE are getting triggered.

While creation of the customer master to trigger the user exit EXIT_SAPMF02D_001 and BADI CUSTOMER_ADD_DATA in the fucntion module SD_CUSTOMER_MAINTAIN_ALL

any way to do this??

Any ideas please help on this.

Thanks in advance....VM

Edited by: vm on Apr 2, 2009 4:23 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi VM,

well in fact this is no real surprise.

I'm sorry but there are NO function module NOR BAPI to maintain fully, safely and accurately customer master data.

SD_CUSTOMER_MAINTAIN_ALL, despite the name is used ONLY from the customer master data standard transaction. It is used for a very specific case which is the CONSUMER maintenance.

This is also why you face such troubles and process differences.

If you want to investigate a safe way to maintain customer master data, you should look into [note 384462|https://service.sap.com/sap/support/notes/384462].

Or, starting with ECC 2005 (6.00), a new class has been develop for a synchronisation process. It is CMD_EI_API.

This class is fully supported and can be triggered directly.

As a small remark, SD_CUSTOMER_MAINTAIN_ALL is not supported by SAP if troubles occurs when triggered directly.

BR

Alain

Former Member
0 Kudos

Hi Alain

You have mentioned that CMD_EI_APL can be used for maintaining customer master. Do you have any example std code that triggers it directly. I have a few issues with the importing parameters.

Many thanks in advance

Daniel

Former Member
0 Kudos

Hi Alain

Please ignore previous post, have sorted it.

Many thanks

Daniel

See code sample below.

REPORT ydttest01.

DATA: wa_company_code_st TYPE cmds_ei_company,

wa_company_code TYPE cmds_ei_cmd_company,

wa_customer TYPE cmds_ei_extern,

wa_customers TYPE cmds_ei_main,

wa_error TYPE cvis_message.

CONSTANTS c_update TYPE c VALUE 'U'.

START-OF-SELECTION.

FREE: wa_customer, wa_company_code_st, wa_customer.

wa_company_code_st-task = c_update.

wa_company_code_st-data_key-bukrs = '3100'.

wa_company_code_st-data-busab = '07'.

wa_company_code_st-datax-busab = 'X'.

INSERT wa_company_code_st INTO TABLE wa_company_code-company.

wa_customer-header-object_instance-kunnr = '0009100011'.

wa_customer-header-object_task = c_update.

wa_customer-company_data = wa_company_code.

INSERT wa_customer INTO TABLE wa_customers-customers.

CALL METHOD cmd_ei_api=>maintain

EXPORTING

  • iv_test_run = SPACE

is_master_data = wa_customers

IMPORTING

es_error = wa_error.

IF wa_error-is_error IS INITIAL.

COMMIT WORK.

ENDIF.

Former Member
0 Kudos

Hi Daniel,

well from what I read, yes it sounds correct.

Maybe you could look at the fundamentals differences between methods MAINTAIN, MAINTAIN_BAPI and MAINTAIN_DIRECTINPUT.

Best regards

Alain

Answers (1)

Answers (1)

Former Member
0 Kudos

It is done

Former Member
0 Kudos

Hi VM,

How did you call BADI CUSTOMER_ADD_DATA from the fucntion module SD_CUSTOMER_MAINTAIN_ALL? I have the same requirement, please let me know how it was achived.

Thanks,

Kaushal N. Shah