04-19-2007 7:39 AM
hi
may i know which function module can update address communication details
tables ADR2, ADR3, ADR6, ADRT, ADRCOMC?
i tried function module 'ADDR_SAVE_INTERN' and it can insert to database successfully, but when i view the BP in standard transaction, it has errors.
any help is appreciated.
thanks.
04-19-2007 7:41 AM
You should have tried the bapi: BAPI_BUPA_ADDRESS_ADD to add an address to a BP.
Regards,
Ravi
04-19-2007 7:41 AM
You should have tried the bapi: BAPI_BUPA_ADDRESS_ADD to add an address to a BP.
Regards,
Ravi
04-19-2007 7:43 AM
hi
i am not adding a new BP.
i am just updating the address communication such as telephone, fax, email details in a customized screen.
04-19-2007 7:52 AM
This bapi wil not add a BP.
It will create an address for the BP.
Check the documentation of this BAPI:
<b>"Functionality
With this function module you create an address for a business partner. You can also create related communication types such as telephone, fax, Internet address, and so on.
The data in the interface is checked for consistency and Customizing settings. Any errors that occur are stated as test results in the Return table. If an error occurs, the address is not created.
If no errors occur, the data is saved, and a number with CHAR 32 (GUID) format is returned by the address GUID export parameter. This number uniquely identifies the address over all systems.
Depending on the partner category of the business partner involved, the address of either a person or an organization is created.
If appropriate settings are made in the system, a duplicate check is carried out during creation. If a record to be created is recognized as already existing in the system, the addresses that are similar to this record are returned to the table ADDRESSDUPLICATES.
If the tool used for the duplicate check makes it possible, the probability in percent of the current record being a duplicate is stated in the table ADDRESSDUPLICATES.
In order to add an international address version to an address, use the function module BAPI_BUPA_ADDRESS_CHANGE.</b>
Regards,
Ravi
09-22-2007 12:36 PM
Hi
what is this PARTNER plz guide me
how to use this BAPI_BUPA_ADDRESS_CHANGE.
Thanks in advance
04-19-2007 9:33 AM
hi ravi
thanks for replying.
i do not need to add an address.
i have the address number.
what i need is to update the address independent communication and address dependent communication details.
i have tested the BAPI_BUPA_ADDRESS_CHANGE (insert a new telephone number and also with data in BAPIADTEL_X with updateflag = 'I')
and did a BAPI_TRANSACTION_COMMIT after that.
however the data is not reflected in the database and standard transaction
07-16-2007 3:24 PM
I have a simular problem when trying to add a address with this BAPI and if I debug through it I can pick up address numbers for the new address etc. No return errors but I cannot se any change on the BP transaction or database.
Did you find a solution to this problem?
07-17-2007 6:51 AM
07-17-2007 7:38 AM
What was your problem? I see you said that you also execute the function and did a transaction commit but nothing reflect on the transaction and database. How did you solve this?
07-17-2007 8:41 AM
in my actual function, i did not use BAPI_BUPA_ADDRESS_CHANGE.
however, i did successfully get it to work. The function will not work when you run in SE37. You have to put it down in code, then call BAPI_TRANSACTION_COMMIT after the function call. And which type of address communication are you changing, dependent or independent?
07-17-2007 10:11 AM
Thanks a lot for your feedback. That was exactly my mistake. You cannot test this function with SE37 even if you run the COMMIT function straight afterwards. When I copied the code into a program everything worked.
Thanks
Message was edited by:
Anina Stokes
09-11-2007 3:36 PM
Hi Anina,
Would you help to explain what you meant by 'copying the code' into a program?
Thanks a lot.
09-12-2007 8:27 AM
Rokie
What I meant is that I program the code in ABAP for it to work. Something like this:
DATA: s_address LIKE bapibus1006_address,
s_address_x LIKE bapibus1006_address_x,
s_addressusage LIKE bapibus1006_addressusage OCCURS 0 WITH HEADER LINE,
s_addressusage_x LIKE bapibus1006_addressusage_x OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
s_addressguid LIKE but020-guid.
CLEAR: s_address.
MOVE: tzbp_master-post_code1 TO s_address-postl_cod1,
tzbp_master-city1 TO s_address-city,
tzbp_master-street TO s_address-street,
tzbp_master-str_suppl1 TO s_address-str_suppl1,
tzbp_master-str_suppl2 TO s_address-str_suppl2.
MOVE but020-address_guid TO s_addressguid.
MOVE: 'X' TO s_address_x-postl_cod1,
'X' TO s_address_x-city,
'X' TO s_address_x-street,
'X' TO s_address_x-str_suppl1,
'X' TO s_address_x-str_suppl2.
MOVE: tzbp_master-adr_kind TO s_addressusage-addresstype,
'X' TO s_addressusage-standardaddressusage.
APPEND s_addressusage.
IF change = 'X'.
MOVE: 'X' TO s_addressusage_x-standardaddressusage,
'X' TO s_addressusage_x-addresstype,
'U' TO s_addressusage_x-updateflag.
APPEND s_addressusage_x.
ELSE.
MOVE: 'X' TO s_addressusage_x-standardaddressusage,
'X' TO s_addressusage_x-addresstype,
'I' TO s_addressusage_x-updateflag.
APPEND s_addressusage_x.
ENDIF.
CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'
EXPORTING
businesspartner = partner
addressguid = s_addressguid
addressdata = s_address
addressdata_x = s_address_x
accept_error = 'X' "Accept regional structure er
TABLES
addressusage = s_addressusage
addressusage_x = s_addressusage_x
return = it_return.
READ TABLE it_return WITH KEY type = 'E'.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ADD 1 TO lv_suc.
COMMIT WORK.
ELSE.
WRITE:/'Errors for Updating other address kinds:'.
SKIP.
LOOP AT it_return.
WRITE:/1 partner, it_return-message.
ENDLOOP.
ADD 1 TO lv_err.
ENDIF.
09-12-2007 9:10 AM
09-23-2007 3:41 AM
In reply to original question, take a look at documentation of function module ADDR_GET. There is a link in this to documentation of Function Group SZA0 where lots of functions for address maintenance are documented, with sample code.
For Address communication details it lists function <Address object>_COMM_GET to read data and <Address object>_COMM_MAINTAIN
to update it. It also mentions that <i>Address data changes are only written to the database after 'ADDR_MEMORY_SAVE' has been called.</i>
Andrew