2019 Dec 04 3:09 PM
I need to update append fields of KNA1 and KNVV (via IDOC). Since we need change pointers for those changes, I should have change documents for these changes.
BAPI_CUSTOMER_CHANGEFROMDATA1 doesn't seem to have a mechanism for updating append fields. Is there a possibility to update those fields with creation of change documents?
I need to update append fields of KNA1 and KNVV (via IDOC). Since we need change pointers for those changes, I should have change documents for these changes.
BAPI_CUSTOMER_CHANGEFROMDATA1 doesn't seem to have a mechanism for updating append fields. Is there a possibility to update those fields with creation of change documents?
2019 Dec 04 8:12 PM
what do you mean by " append fields"? Do you mean that you need add custom fields or what?
2019 Dec 04 9:19 PM
A minima, change document flag, for the data elements of the appended fields, should be checked.
This BAPI is calling a "WRITE Document" function. Then Change pointers should be inserted (for each field with a DTEL having "change document" checked).
OBJECTID = XKUNNR. "mi/45B
CALL FUNCTION 'DEBI_WRITE_DOCUMENT ' IN UPDATE TASK
EXPORTING
* objectid = xkunnr "mi/45B
OBJECTID = OBJECTID "mi/45B
TCODE = CODE
UTIME = UTIME
UDATE = UDATE
USERNAME = USERNAME
PLANNED_CHANGE_NUMBER = PLANNED_CHANGE_NUMBER
OBJECT_CHANGE_INDICATOR = CDOC_UPD_OBJECT
PLANNED_OR_REAL_CHANGES = CDOC_PLANNED_OR_REAL
O_YKNA1 = YKNA1
N_KNA1 = KNA1
UPD_KNA1 = VKZ-KNA1
....
2019 Dec 05 4:59 AM
Hi Jörg Krause
Did you try with SE18 Enhancement spot 'CUSTOMER_ADD_DATA_BI' (Additional Data at Customers (Batch Input and ALE)), try with below two methods.
FILL_BI_TABLE_WITH_OWN_SEGMENT - Fill Batch Input Table from Own Segment (ALE Inbound Proc.)
PASS_NON_STANDARD_SEGMENT - Pass On Customer-Defined Segments (ALE Inbound Processing)
2019 Dec 05 8:30 AM
Yes, we have an append structure on KNA1 and KNVV with own fields in it. Actually, we are doing a db update to maintain them because I did not find a way to maintain them via BAPI
2019 Dec 05 3:09 PM
@Jörg Krause Not sure this is wise way - I would create a new function module and keep all the BAPI - BAPI_CUSTOMER_CHANGEFROMDATA1 import, export and tables along with custom fields in the created FM. Then in the FM i would update custom fields if the BAPI call is success.
2019 Dec 05 3:10 PM
2019 Dec 05 3:52 PM
You can maintain change log as well, please check below link which explains how to maintain change log for custom fields.
2019 Dec 06 9:02 AM
I need an application log (cdhdr, cdpos), not a database log.
2019 Dec 05 3:34 PM
Are, the data elements of your append fields, have "change document" checked ?

2019 Dec 06 9:03 AM
Yes, this flag is set. But since I do a DB update, there is no effect.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |