2007 Jun 12 6:31 AM
Hi,
I have to write a bapi FM that accepts kunnr and changes the corresponding address of that customer.points will be rewarded
bye
Business partner is your customer number. You need to pass it to the parameter Business partner.
2007 Jun 12 6:44 AM
2007 Jun 12 6:45 AM
hi, you can use the existing BAPI, BAPI_BUPA_ADDRESS_CHANGE for changing the address.
award if it helps
krishna
2007 Jun 12 7:56 AM
2007 Jun 12 8:02 AM
Business partner is your customer number. You need to pass it to the parameter Business partner.
2007 Jun 13 10:39 AM
hi,
I am passing bpartner form table BUT020 to bapi_bupa_address_change.
here is my code.
when i execute bapiret error is:Standard address cannot be deleted.
can anybody help me solve this issue. points will be rewarded.
TABLES: kna1.
PARAMETERS: sp_part LIKE BUT020-partner.
DATA: gt_address LIKE bapibus1006_address occurs 0 WITH HEADER LINE.
DATA: gt_address_x LIKE bapibus1006_address_x OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
data: gt_addressusage_x like BAPIBUS1006_ADDRESSUSAGE_X occurs 0 WITH HEADER LINE.
data: gt_addressusage like BAPIBUS1006_ADDRESSUSAGE occurs 0 WITH HEADER LINE.
data: gv_addrnumber like adcp-ADDRNUMBER.
select single ADDRNUMBER from BUT020 into gv_addrnumber where
partner = sp_part.
*concatenate sp_kunnr '00000' into gv_kunnr.
gt_address-street = 'no:10'.
gt_address-city = 'delhi'.
gt_address-district = 'bangalore south'.
gt_address-po_box = '9008'.
append gt_address.
gt_address_x-street = 'X'.
gt_address_x-city = 'X'.
gt_address_x-district = 'X'.
gt_address_x-po_box = 'X'.
APPEND gt_address_x.
gt_ADDRESSUSAGE-ADDRESSTYPE = 'XXDEFAULT'.
append gt_addressusage.
gt_ADDRESSUSAGE_X-UPDATEFLAG = 'U'.
append gt_addressusage_x.
CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'
EXPORTING
businesspartner = sp_part
ADDRESSGUID = gv_kunnr
addressdata = gt_address
addressdata_x = gt_address_x
DUPLICATE_MESSAGE_TYPE =
ACCEPT_ERROR = ' '
TABLES
BAPIADTEL =
BAPIADFAX =
BAPIADTTX =
BAPIADTLX =
BAPIADSMTP =
BAPIADRML =
BAPIADX400 =
BAPIADRFC =
BAPIADPRT =
BAPIADSSF =
BAPIADURI =
BAPIADPAG =
BAPIAD_REM =
BAPICOMREM =
ADDRESSUSAGE = gt_ADDRESSUSAGE
BAPIADVERSORG =
BAPIADVERSPERS =
BAPIADUSE =
BAPIADTEL_X =
BAPIADFAX_X =
BAPIADTTX_X =
BAPIADTLX_X =
BAPIADSMT_X =
BAPIADRML_X =
BAPIADX40_X =
BAPIADRFC_X =
BAPIADPRT_X =
BAPIADSSF_X =
BAPIADURI_X =
BAPIADPAG_X =
BAPIAD_RE_X =
BAPICOMRE_X =
ADDRESSUSAGE_X = gt_addressusage_x
BAPIADVERSORG_X =
BAPIADVERSPERS_X =
BAPIADUSE_X =
return = t_return
ADDRESSDUPLICATES =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
IF sy-subrc = '0'.
WRITE:/ 'successfully changed'.
ENDIF.
loop at t_return.
write:/ t_return-MESSAGE.
endloop.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |