Skip to Content
author's profile photo Former Member
Former Member

Customer Create and Change using SD_CUSTOMER_MAINTAIN_ALL

Hi all,

We have to create and change customers from an Input File. After looking at BDC and BAPI_CUSTOMER_CREATEFROMDATA1, we have decided against it and are thinking of going with the FM SD_CUSTOMER_MAINTAIN_ALL

I need help on two issues regarding the FM SD_CUSTOMER_MAINTAIN_ALL.

<u>Issue One:</u>

While creating a customer, I have to enter two e-mail addresses for each customer. I was only able to find one place holder for entering the e-mail address in BAPIADDR1(e_mail field). Please let me know how we can enter two e-mail addresses.

<u>Issue Two</u>

I need help (preferably some code snippet) on how to change the customer master using this Function Module. I could not find much of documentation on this FM. It would be great, if you could point me to which of the parameters/tables are relevant for CHANGE and which all are relevant for CREATE.

Please provide your inputs and experiences on using this Function Module. Help would be greatly appreciated and rewarded with points.

Thanks,

Ani

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Apr 25, 2007 at 04:45 PM

    Hi Ani,

    I have used SD_CUSTOMER_MAINTAIN_ALL for both creating and changing customer information and it is working well.

    When changing the data, you do need to make sure the parameter i_maintain_address_by_kna1 is set to 'X'. We also had to set pi_cam_changed to 'X'. That changed the data as we required. For create mode, we did not need to use those parameters.

    I didn't have a problem with two email addresses but had a similar problem with phone numbers. For that, I used BAPI_ADDRESSORG_GETDETAIL to get the current information after the customer code had been created. I passed the obj_type = 'KNA1', the obj_id = kunnr, context = 1 and iv_current_comm_data = 'X'.

    This bapi will return the address number of the customer you want to maintain. In our case we were looking for telephone information so we filled table bapiadtel. Sound like you will want to use bapiadsmtp for your emails.

    I then used BAPI_ADDRESSORG_CHANGE to change/insert the phone numbers.

    The bapis contain good documentation that may be more relevant to your needs.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.