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

unable to update customer data in business partner.

Hi all,

I have create a business partner using the function module BAPI_BUPA_CREATE_FROM_DATA . But i am unable to update the customer data in it. I found few FM's in this regard but could not update the required fields with it. I have tried using :

1) BUPA_CENTRAL_MAINT_PERIOD

2) BUPA_CENTRAL_CI_CHANGE

3) BUPA_CENTRAL_MAINT_FROM

But it could not update the customer fields. I will attach the code i have written.Please suggest me with correct code wherever necessary.

ls_org-NAME1 = 'xxx'.

ls_org-name2 = 'XXX'.

ls_org-name3 = 'XXXXX'.

ls_org-name4 = 'YYYYY'.

ls_central-TITLE_KEY = '0003'.

ls_central-searchterm1 = 'XXX'. " last name

ls_central-searchterm2 = 'yyy'. " first name

  • ls_central-partnertype = iv_type. " partner type

ls_central-partnerlanguage = sy-langu. " language

ls_central-PARTNERTYPE ='0001'.

ls_central-AUTHORIZATIONGROUP = '0001'.

  • ls_central-partnerexternal = iv_mitid. " MITID external number

ls_person-firstname = 'xxx'. " first name

ls_person-lastname = 'yyy'. " last name

  • ls_person-middlename = l_name2. " middle name

ls_person-correspondlanguage = sy-langu. " language

  • ls_person-fullname = l_full. " full name

ls_address-STREET = 'lane1'.

ls_address-STR_SUPPL1 = 'lane'.

ls_address-STR_SUPPL2 = 'fruitpark'.

ls_address-CITY = 'frankfort'.

ls_address-region = 'NJ'.

ls_address-country = 'US'. " US

ls_address-TIME_ZONE = 'AST'. "US

ls_address-POSTL_COD1 = '94000'.

*ls_address-POSTL_COD2 = '500081'.

*ls_address-POSTL_COD3 = '500081'.

ls_address-langu = sy-langu. " language

  • ls_address-extaddressnumber = iv_mitid. " language

*append ls_address to lt_address.

  • ls_email-std_no = gc_true. " default email for person

ls_email-e_mail = 'asi@cc.com'. " default email for person

ls_email-EMAIL_SRCH = 'asi@infy.com'. " other e-mail for search

APPEND ls_email TO lt_email.

*

ls_telephone-TELEPHONE = '9985132452'.

ls_fax-FAX = '124-23455+1234'.

*

append ls_telephone to lt_telephone.

append ls_fax to lt_fax.

CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'

EXPORTING

  • BUSINESSPARTNEREXTERN =

PARTNERCATEGORY = '2'

PARTNERGROUP = '0001'

CENTRALDATA = ls_central

*CENTRALDATAPERSON = ls_person

CENTRALDATAORGANIZATION = ls_org

  • CENTRALDATAGROUP =

ADDRESSDATA = ls_address

  • DUPLICATE_MESSAGE_TYPE =

  • ACCEPT_ERROR = ' '

IMPORTING

BUSINESSPARTNER = l_buo

TABLES

TELEFONDATA = lt_telephone

FAXDATA = lt_fax

E_MAILDATA = lt_email

RETURN = it_retu

.

*data :ls_customer type BUPA_CENTR_CUST_EXT,

  • ls_valid_from type BAPIBUS1006_CENTRAL_VALIDITY-VALID_FROM,

  • ls_valid_to type BAPIBUS1006_CENTRAL_VALIDITY-VALID_TO.

*

  • ls_customer-ZZRESELLER = '03'.

  • ls_customer-ZZACCOUNTTYP = '02'.

  • ls_customer-ZZCHANNEL = '01'.

  • ls_customer-ZZSITEID = '123'.

  • ls_customer-ZZPRIMARY = 'ME'.

*

*

  • CALL FUNCTION 'BUPA_CENTRAL_MAINT_PERIOD'

  • EXPORTING

  • IV_PARTNER = l_buo

  • IV_PARTNER_GUID =

  • IV_VALID_FROM = ls_valid_from

  • IV_VALID_TO = ls_valid_to

    • IS_DATA =

    • IS_DATA_PERSON =

    • IS_DATA_ORGAN =

    • IS_DATA_GROUP =

  • IS_CENTRAL_CUSTOMER_EXT = ls_customer

    • IV_X_SAVE = 'X'

    • IV_MERGE_PERIODS = ' '

  • TABLES

  • ET_RETURN = it_retu

  • .

  • *

    *

    data : lv_guid type BU_PARTNER_GUID.

    CALL FUNCTION 'BUPA_NUMBERS_GET'

    EXPORTING

    IV_PARTNER = l_buo

    • IV_PARTNER_GUID =

    • IV_PARTNER_EXTERNAL =

    IMPORTING

    • EV_PARTNER =

    EV_PARTNER_GUID = lv_guid

    • EV_PARTNER_EXTERNAL =

    • ES_BUT000 =

    TABLES

    ET_RETURN = it_retu

    • ET_PARTNER =

    .

    write : /'partner_guid :', lv_guid.

    <b>data : wa_cust_data type BUS000_EEW,

    it_return type BUS_BAPIRET2_T.

    wa_cust_data-ZZRESELLER = '01'.

    wa_cust_data-ZZACCOUNTTYP = '02'.

    wa_cust_data-ZZSITEID = 'MDC'.

    wa_cust_data-ZZPRIMARY = 'abc'.

    append it_retu to it_return.

    CALL FUNCTION 'BUPA_CENTRAL_CI_CHANGE'

    EXPORTING

    IS_BUS000_EEW = wa_cust_data

    • IS_BUS000_EEW_X =

    • IV_XSAVE = 'X'

    IMPORTING

    ET_RETURN = it_return

    .</b>

    if sy-subrc = 0.

    *break-point.

    • To commit the txn

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    • EXPORTING

    • WAIT =

    • IMPORTING

    • RETURN =

    .

    write:/ 'Created account', l_buo.

    *break-point.

    else.

    write:/ 'Not able to create'.

    endif.

    Thanks in Advance,

    Shwetha.

    Add a comment
    10|10000 characters needed characters exceeded

    Related questions

    2 Answers

    • Best Answer
      author's profile photo Former Member
      Former Member
      Posted on Apr 30, 2007 at 08:44 PM

      Hi,

      Where is custom data saved in database?? in stadard tables or custom tables. if infomration is stored in custom table then you need to update custom table after bp creation from program using BP number or BP guid. please try to check how they are updating thru transaction screen creation.

      Another thing is that in BUPA_CENTRAL_CI_CHANGE you need to pass IS_BUS000_EEW_X structure with zz fields checked.

      please try this and let me know if it is not helpful

      Thanks

      Siva

      Add a comment
      10|10000 characters needed characters exceeded

    • author's profile photo Former Member
      Former Member
      Posted on Sep 20, 2007 at 06:16 AM

      HI Swetha,

      while you created Bp you will get Bp number if you are not noted down that number use search button and open the record of that customer you can use

      crmd_order then use open button open the created customer use change /display

      with pencil mark on the top side then you can edit your BP details then again you have to save this modifications.

      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.