on 05-03-2017 8:07 PM
hi gurus, I'm using FM FUNC_LOCATION_UPDATE to change 2 custom fields in functional location. I've activated the change documents in the fields and when I make the changes through IL02, change document is created. However, when I use the FM, no change document is generated and no update takes place in CDPOS and CDHDR, although the values do get changed in the record. Below is my code
function zqfloclatlong.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_TPLNR) LIKE IFLOT-TPLNR
*" REFERENCE(I_LAT) LIKE IFLOT-ZQLAT
*" REFERENCE(I_LONG) LIKE IFLOT-ZQLONG
*" TABLES
*" E_IFLOT STRUCTURE IFLOT
*"----------------------------------------------------------------------
data: n_iflo like iflo,
o_iflo like iflo,
lriupd_new type riupd,
lriupd_old type riupd,
change_doc type t370f-chdoc.
select single * from iflot into e_iflot where
tplnr = i_tplnr.
if sy-subrc = 0.
move-corresponding e_iflot to o_iflo.
endif.
move-corresponding e_iflot to n_iflo.
move i_lat to n_iflo-zqlat.
move i_long to n_iflo-zqlong.
clear lriupd_old.
lriupd_new-indupd = 'U'.
lriupd_new-indupd1 = 'U'.
lriupd_old-indupd = 'I'.
lriupd_old-indupd1 = 'I'.
change_doc = 'X'.
call function 'FUNC_LOCATION_UPDATE'
exporting
iflo_new = n_iflo
iflo_old = o_iflo
* INHB_COUNTER = 0
* INHB_DELETE = ' '
riupd_new = lriupd_new
riupd_old = lriupd_old
update_asynchron = space
WITH_CHANGE_DOCU = change_doc.
.
endfunction.
Could you check if the same behaviour occurs when using the BAPI "BAPI_FUNCLOC_CHANGE", which probably will be recommended by SAP? Provided SAP-KBA 2146575 is implemented, you could make use of this BAPI and it's "EXTENSION*"-Tables to enable the update of Custom Fields ...
If either the regular FM or BAPI produces strange results, you can always report to SAP via ONE Support Launchpad ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
14 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.