06-12-2013 6:37 AM
Hi Experts
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.
Anoop
06-15-2013 10:27 AM
I got a function module to update the KNVV ,now it is updating KNVV , CDHDR & CDPOS ,
thnx for your valuable inputs
Anoop
06-12-2013 7:30 AM
Hi,
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..
Regards
Tejas
Message was edited by: tejas patil
06-12-2013 7:43 AM
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...
06-12-2013 7:47 AM
Hi Lozano
Thnx for your reply .
Not KNA1-KVGR1 it is KNVV-KVGR1 field
06-12-2013 7:47 AM
Dear Anoop,
I don't think so that kna1 table contains the KVGR1 field and it maintains in table of KNVV (maintains the customer master sales data)
Many Thanks / Himanshu Gutpa
06-12-2013 7:52 AM
To update standard SAP tables, use allowed tools as BAPI, BDC,Direct Input, LSMW tool.
But never
- 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.
Regards,
Raymond
10-28-2014 3:06 PM
Hi Raymond,
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?
Regards
06-15-2013 10:27 AM
I got a function module to update the KNVV ,now it is updating KNVV , CDHDR & CDPOS ,
thnx for your valuable inputs
Anoop
06-15-2013 4:48 PM
I hope this FM is not an update task FM (check attributes) else youy just executed an open-sql "in disguise",
Could you write which FM you did use (if standard) so that those who later seek the same solution could benefit.
Regards,
Raymond