I am modifying the value of KNA1-KVGR1 ,value is getting modified but the corresponding CDHDR and CDPOS entry is missing .
I have tried function module Customer_update_sales_area function (or Modify KNA1 from ITAB also ) module to update the KNA1 table,
in both case field is getting changes but CDHDR and CDPOS table is not getting affected ,please help.
I have check KVGR1 field in our system.. the field is in KNVV and not in KNA1..
if you go to se11 and check details for KVGR1.. you can see
Change document indicator is set..
so system has to store changes agaist KNVV table in CDHDR or CDPOS table..
Please check again..
Message was edited by: tejas patil
NEVER (and I mean NEVER) perform a manual update to a SAP standard table. Trash all your code about that "Modify KNA1 from ITAB" or you will be risking your company's data integrity.
Once I've been enough clear about it.
How it's supposed you are trying to change CHDHR and CDPOS just by changing KNA1? And which version are you running? In mine, KVGR1 is NOT a field of table KNA1...
To update standard SAP tables, use allowed tools as BAPI, BDC,Direct Input, LSMW tool.
- use open-sql (or native) statements
- use update task FM (that are just the last part of SAP update process and usually only update database)
Tables CDPOS and CDHDR are updated by SAP in an update task FM, they are triggered in standard transactions as well as allowed tools, but don't confound those "change document" programmatically generated (see SCDO) with "table change logging" which are generated by open-sql statements without coding.
Also when you call a new FM (here Customer_update_sales_area which is an Update task FM) check its attributes and perform some where-used.
So consider BDC on XK02 or BAPI_CUSTOMER_CHANGEFROMDATA1 or LSMW.
can you help me?
To update customer we use the ISM_BAPI_007_CHANGE_INFO_CALC and then the BAPIBUSISM007_CHANGE.
After that to mantain the partner roles we use the function module CUSTOMER_UPDATE like in this thread:
The BP tcode use the same function and write the log on cdhdr and cdpos for knvp.
In our custom program using the same function : CUSTOMER_UPDATE we ha no log in cdhdr and cdpo for KNVP.
But we have log for KNVV and each other table.
This strange, where I'm in wrong?