2016 Jul 25 6:42 AM
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.
2016 Jul 25 9:12 AM
Do you even use business partners? Are your vendors maintained with transaction BP?
2016 Jul 25 9:28 AM
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.
2016 Jul 25 9:53 AM
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.
thanks!!
2016 Jul 25 10:02 AM
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.
2016 Jul 25 10:20 AM
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
2016 Jul 25 10:22 AM
2016 Jul 25 10:28 AM
2016 Jul 25 10:33 AM
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.
2016 Jul 25 10:46 AM
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
2016 Jul 25 11:01 AM
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.
2016 Jul 25 11:37 AM
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
2016 Jul 25 11:47 AM
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,
2016 Jul 25 4:24 PM
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!!
2016 Jul 25 4:26 PM
Hi,
No man Already Checked it, No use. Passing the correct value but no use.
any thing else please update me.
2016 Jul 25 4:34 PM
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.
2016 Jul 25 4:39 PM
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
2016 Jul 25 10:54 AM
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.
2016 Jul 25 11:21 AM
Ok. I have not noticed, Trying by using Class for updating vendor master.How others are using .
2016 Jul 25 11:49 AM
Hello again,
which transaction do you use to display partner?
2016 Jul 25 12:00 PM
2016 Jul 25 2:00 PM
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'
2016 Jul 25 2:02 PM
Wrong. XK03 is vendor master - not customer master (which is XD03)
2016 Jul 25 2:06 PM
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.
2016 Jul 25 2:16 PM
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,
2016 Jul 25 2:26 PM
Sorry,
I thought XD03,
I will try it with XK03 ( Vendor Master ) LIFA1.
but it is good for others,.
2016 Jul 25 2:27 PM
You are right,
It is my mistake
I have to try it again with XK03 ( Vendor Master )
2016 Jul 25 2:27 PM
But you cannot use SD_CUSTOMER_MAINTAIN_ALL to update the address of a vendor
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |