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.