Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Business partner does not exist Using Bapi:BAPI_BUPA_ADDRESS_CHANGE

former_member196331
Active Contributor
0 Likes
18,926

Need Some information,

I need to update Vendor Address,Like  telephone numbers,I used Bapi::BAPI_BUPA_ADDRESS_CHANGE

I am using the Below Code. The return parameter is showing that Business partner does not exists,

Vendor Code exists No doubt , But why it is showing Should i pass anything else.


DATA: wa_address TYPE bapibus1006_address,

       wa_addressdata_x TYPE bapibus1006_address_x.

DATA:t_return TYPE TABLE OF bapiret2 WITH HEADER LINE,

wa_return TYPE bapiret2.

DATA: lv_partner_no TYPE  bapibus1006_head-bpartner VALUE 'EMHA1001'.

wa_address-city = 'London'.

"wa_address-country = 'GB'.

wa_addressdata_x-city = 'X'.

"wa_addressdata_x-country = 'X'

CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'

   EXPORTING

     businesspartner = lv_partner_no

     addressdata     = wa_address

     addressdata_x   = wa_addressdata_x

   TABLES

     return          = t_return.

LOOP AT t_return INTO wa_return WHERE type = 'E'.

   IF sy-subrc <> 0.

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

   ENDIF.

ENDLOOP.

Need Some information,

I need to update Vendor Address,Like  telephone numbers,I used Bapi::BAPI_BUPA_ADDRESS_CHANGE

I am using the Below Code. The return parameter is showing that Business partner does not exists,

Vendor Code exists No doubt , But why it is showing Should i pass anything else.


DATA: wa_address TYPE bapibus1006_address,

       wa_addressdata_x TYPE bapibus1006_address_x.

DATA:t_return TYPE TABLE OF bapiret2 WITH HEADER LINE,

wa_return TYPE bapiret2.

DATA: lv_partner_no TYPE  bapibus1006_head-bpartner VALUE 'EMHA1001'.

wa_address-city = 'London'.

"wa_address-country = 'GB'.

wa_addressdata_x-city = 'X'.

"wa_addressdata_x-country = 'X'

CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'

   EXPORTING

     businesspartner = lv_partner_no

     addressdata     = wa_address

     addressdata_x   = wa_addressdata_x

   TABLES

     return          = t_return.

LOOP AT t_return INTO wa_return WHERE type = 'E'.

   IF sy-subrc <> 0.

     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

   ENDIF.

ENDLOOP.

27 REPLIES 27
Read only

JL23
Active Contributor
0 Likes
17,599

Do you even use business partners? Are your vendors maintained with transaction BP?

Read only

0 Likes
17,599

Hi,

Thanks for your reply.

I was created almost more than 100 Vendors.

I would like to tell you how i am creating , Xk01 , Name Address, Telephone Adress, Email,

Contact Details,Account information ,Payment Terms,Currency Details and Contact person Details.

More than i have not added anything in xk01, After that j1id i am updating for pano , lst number updating.

More than i am not updating.

Read only

Chintu6august
Contributor
0 Likes
17,550

Hi,

always pass the values in bapi structure in SAP internal format and check whether the vendor which you are passing is maintained as business partner or not.


  • lv_partner_no TYPE  bapibus1006_head-bpartner VALUE 'EMHA1001'. "" pass in internal format

thanks!!

Read only

0 Likes
17,550

Hi,

check whether the vendor which you are passing is maintained as business partner or not.

I checked it was maintained in xk02


This point i did not understood.

always pass the values in bapi structure in SAP internal format


How could i pass below value.

  • lv_partner_no TYPE  bapibus1006_head-bpartner VALUE 'EMHA1001'.
Read only

0 Likes
17,549

Hi,

I think you have to maintin it in BP. For this, there is a function module, to get and change it.


REPORT Z_IBO_PARTNER.
data ls_add type BAPIBUS1006_ADDRESS.
data ls_add_x TYPE BAPIBUS1006_ADDRESS_X.
data lt_return TYPE TABLE OF BAPIRET2.
CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'
 
EXPORTING
    businesspartner      
= '3000000007'
IMPORTING
   ADDRESSDATA          
= ls_add.

ls_add
-STREET = 'Ebrahim222'.
ls_add_x
-street = 'X'.

CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'
 
EXPORTING
    businesspartner             
= '3000000007'
*   ADDRESSGUID                  =
   ADDRESSDATA                 
= ls_add
   ADDRESSDATA_X               
= ls_add_x
TABLES
  
RETURN                       = lt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
*  EXPORTING
*    WAIT          = 'X'.

BREAK-POINT

.

d

Regards

Read only

0 Likes
17,549

Ok Sir, I will check it, Give me some time.

Read only

0 Likes
17,549

I Checked the above code and run it Same error message.

Read only

0 Likes
17,549

While executing the  BAPI_BUPA_ADDRESS_CHANGE'

It is checking the Below Function module, Then giving the Error message.

  BUP_BUT000_SELECT_SINGLE

Message Class R1 id 201

But does not know why it is giving.

Read only

0 Likes
17,547

Hello,

I have tried it again,

and I changed the Partner number, which does not exists.

so you have to be sure that your partner exists in transaction BP.

you have written, that partner was mantained in XK02, so you have to check  this FMs

BAPI_VENDOR_EDIT, FM VENDOR_UPDATE

Regards

Read only

0 Likes
17,547

Hi,

DATA ls_add TYPE bapibus1006_address.

DATA ls_add_x TYPE bapibus1006_address_x.

DATA lt_return TYPE TABLE OF bapiret2.

CALL FUNCTION 'BAPI_BUPA_ADDRESS_GETDETAIL'

   EXPORTING

     businesspartner = '1000000'

   IMPORTING

     addressdata     = ls_add.

ls_add-street = 'Ebrahim222'.

ls_add_x-street = 'X'.

CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'

   EXPORTING

     businesspartner = '1000000'

*   ADDRESSGUID     =

     addressdata     = ls_add

     addressdata_x   = ls_add_x

   TABLES

     return          = lt_return.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

*  EXPORTING

*    WAIT          = 'X'.

BREAK-POINT.

Please have a look on below attached images.

Hope you understood.

Read only

JL23
Active Contributor
0 Likes
17,547

looking at your screenshot I am not really convinced about the number '1000000' since the vendor master is a 10 character field and will have leading zeroes in the database, so you should at least use '0001000000' when you do a test.

Use SE16 and choose from menu Settings > user parameter and remove the tick from "use conversion exit" to that you can see the value as it is stored in the database

Read only

0 Likes
17,547

Ok Good,

When ever i am facing this type of problem, like vendor code or Materiel master,

or

When ever i am doing the testing, I will check two times,

1)with numbers

2)with alphanumerical.

there is one more vendor called 'EM01', I Faced the same problem,

I hope there is no conversion problem,

I already checked it,

Read only

0 Likes
17,547

Hi,


always pass the values in bapi structure in SAP internal format


How could i pass below value.

  • lv_partner_no TYPE  bapibus1006_head-bpartner VALUE 'EMHA1001'. ( 8 Character)


  • length of bpartner is 10 char and whenever we populate bapi structure we convert the values in the SAP internal format by using conversion exits.

thank you!!

Read only

0 Likes
17,547

Hi,

No man Already Checked it, No use. Passing the correct value but no use.

any thing else please update me.

Read only

0 Likes
17,547

Have a look on below attached images.

 

 

   If you try to solve or given any hint for the below post. my problem will be solve.

 

   Not able to update communication like Telephone , Mobile no, fax, email, my problem will be solved,

   But address i can able to solve it, but communication not able to do it.

   I checked in debug, the values are passing to the structure phone, but no result.

Read only

JL23
Active Contributor
0 Likes
17,547

For the Address update in ADRC and other central address tables you can probably use 'BAPI_ADDRESSORG_SAVEREPLICA'

Still you might need a way to update the vendor in LFA1 redundantly as this is not performed by this BAPI.

for a bit more background on the address data you might want to check my document

Read only

JL23
Active Contributor
0 Likes
17,547

XK01 refers to the old fashioned well known vendor maintenance. This is not the same as maintaining Business partners  which is transaction BP, which also will replace XK01 with S4/HANA and is currently used in CRM and other new dimension products.  But in core ERP is a vendor not yet a SAP business partner.

From this point of view I just believe that you cannot use this BAPI.

Read only

0 Likes
17,547

Ok. I have not noticed, Trying by using Class for updating vendor master.How others are using .

Read only

0 Likes
17,547

Hello again,

which transaction do you use to display partner?

Read only

0 Likes
17,547

XK01: Creation

xk02:Updation

xk03: display

Read only

0 Likes
17,547

Hello,

so you use XK03, it means you would like to change the customer master data.

in this case you have to use

table : kna1

to get the adress number ,


pass the adress number to get the adress data .


CALL FUNCTION  'BBP_PARTNER_ADDRESS_GET_COMPL'



updata the adress datra of the customer.


CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'



Read only

JL23
Active Contributor
0 Likes
17,547

Wrong. XK03 is vendor master - not customer master (which is XD03)

Read only

0 Likes
17,547

No Sir Mistaken, I need Vendor master  Updation.

Any Bapi  or Class.

Trying Class, but that is also struck with updating contact details, Address able to update.

Read only

0 Likes
17,547

Thank you very much  Juergen,

you are right, but I mean KNA1,

it was my mistake

I have thought, XD03 ( scheiße)

I have tried it out.

and it works,

try this code please.


REPORT z_ibo_partner3.

DATA:
      i_kna1 
LIKE  kna1,
i_knb1 
LIKE  knb1,
i_knvv 
LIKE  knvv.
DATA:
      e_kunnr
LIKE  kna1-kunnr.
DATA:
      t_xknvp
LIKE  TABLE OF fknvp.

SELECT SINGLE FROM kna1
 
INTO i_kna1
 
WHERE kunnr = '0000001000'.



DATA: i_bapiaddr1 LIKE  bapiaddr1.

DATA:
      es_bapiaddr1 
TYPE  bapiaddr1.


" assign the adress, you can just remove the number and do i_kna1-ADRNR.

" check which adress type ( Conmpany = 1,  person.. = 2, ... 3 )

CALL FUNCTION 'BBP_PARTNER_ADDRESS_GET_COMPL'
 
EXPORTING
    iv_addr_nr  
= '0000006662' " i_kna1-ADRNR
    iv_addr_type
= '1'
 
IMPORTING
    es_bapiaddr1
= es_bapiaddr1.

es_bapiaddr1
-city = 'Frankfurt'.
es_bapiaddr1
-name_2 = 'Ebrahim from Frankfurt'.
es_bapiaddr1
-postl_cod1 = '66634'.

CALL FUNCTION 'SD_CUSTOMER_MAINTAIN_ALL'
 
EXPORTING
    i_kna1                 
= i_kna1
*   i_knb1                  = ls_knb1
*   i_knvv                  = ls_knvv
    i_bapiaddr1            
= es_bapiaddr1
 
IMPORTING
    e_kunnr                
= e_kunnr
*    TABLES
*   t_xknvp                 = lt_xfknvp
*   t_yknvp                 = lt_yfknvp
 
EXCEPTIONS
    client_error           
= 1
    kna1_incomplete        
= 2
    knb1_incomplete        
= 3
    knb5_incomplete        
= 4
    knvv_incomplete        
= 5
    kunnr_not_unique       
= 6
    sales_area_not_unique  
= 7
    sales_area_not_valid   
= 8
    insert_update_conflict 
= 9
    number_assignment_error
= 10
    number_not_in_range    
= 11
    number_range_not_extern
= 12
    number_range_not_intern
= 13
    account_group_not_valid
= 14
    parnr_invalid          
= 15
    bank_address_invalid   
= 16
    tax_data_not_valid     
= 17
    no_authority           
= 18
    company_code_not_unique
= 19
    dunning_data_not_valid 
= 20
    knb1_reference_invalid 
= 21
    cam_error              
= 22
   
OTHERS                  = 23.




CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
* EXPORTING
*   WAIT          = '
* IMPORTING
*   RETURN        =
.

BREAK-POINT.





dd

now it has been changed from Berlin to Frankfur

just try it,

Read only

0 Likes
17,547

Sorry,

I thought XD03,

I will try it with XK03  ( Vendor Master ) LIFA1.

but it is good for others,.

Read only

0 Likes
17,547

You are right,

It is my mistake

I have to try it again with XK03 ( Vendor Master )

Read only

JL23
Active Contributor
0 Likes
17,512

But you cannot use SD_CUSTOMER_MAINTAIN_ALL to update the address of a vendor