2012 Oct 03 1:04 AM
Hello Friends,
I have a ztable for which i want to capture the change log. I understand this is not taking care by SAP directly . So i have created a change document object (SCD0) but still i am having some problem with the table updation . I have search SDN and try all the possibility i got but i failed every time .
In CDPOS table it is always updating the old value and new value fields is blank though i am passing both the value to the *WRITE_DOCUMENT function module .And there is no entry in CDHDR table .
I am giving the code snapshot for your attention .
MOVE-CORRESPONDING : /lgc/sdtvs98 TO WA_/LGC/SDTMCCT_NEW,
/LGC/SDTMCCT TO WA_/LGC/SDTMCCT_OLD.
APPEND:WA_/LGC/SDTMCCT_NEW TO /LGC/SDTMCCT_NEW,
WA_/LGC/SDTMCCT_OLD TO /LGC/SDTMCCT_OLD.
LS_OBJECTID = /lgc/sdtvs91-kunnr.
CALL FUNCTION '/LGC/CCGWWMCCT_WRITE_DOCUMENT' IN UPDATE TASK
EXPORTING
objectid = LS_OBJECTID
tcode = 'XXXX'
utime = sy-uzeit
udate = sy-datum
username = sy-uname
* PLANNED_CHANGE_NUMBER = ' '
* OBJECT_CHANGE_INDICATOR = 'U'
* PLANNED_OR_REAL_CHANGES = ' '
* NO_CHANGE_POINTERS = ' '
* UPD_ICDTXT_CCGWWMCCT = 'U'
UPD_LGC_SDTMCCT = 'U'
tables
* icdtxt_ccgwwmcct = lt_cdtxt
xlgc_sdtmcct = /LGC/SDTMCCT_NEW"NEW
ylgc_sdtmcct = /LGC/SDTMCCT_OLD"OLD
.
COMMIT work.
Please have a look into the code and let me know if i missed something .
Thanks In Advace,
Satya
Hello Friends,
I have a ztable for which i want to capture the change log. I understand this is not taking care by SAP directly . So i have created a change document object (SCD0) but still i am having some problem with the table updation . I have search SDN and try all the possibility i got but i failed every time .
In CDPOS table it is always updating the old value and new value fields is blank though i am passing both the value to the *WRITE_DOCUMENT function module .And there is no entry in CDHDR table .
I am giving the code snapshot for your attention .
MOVE-CORRESPONDING : /lgc/sdtvs98 TO WA_/LGC/SDTMCCT_NEW,
/LGC/SDTMCCT TO WA_/LGC/SDTMCCT_OLD.
APPEND:WA_/LGC/SDTMCCT_NEW TO /LGC/SDTMCCT_NEW,
WA_/LGC/SDTMCCT_OLD TO /LGC/SDTMCCT_OLD.
LS_OBJECTID = /lgc/sdtvs91-kunnr.
CALL FUNCTION '/LGC/CCGWWMCCT_WRITE_DOCUMENT' IN UPDATE TASK
EXPORTING
objectid = LS_OBJECTID
tcode = 'XXXX'
utime = sy-uzeit
udate = sy-datum
username = sy-uname
* PLANNED_CHANGE_NUMBER = ' '
* OBJECT_CHANGE_INDICATOR = 'U'
* PLANNED_OR_REAL_CHANGES = ' '
* NO_CHANGE_POINTERS = ' '
* UPD_ICDTXT_CCGWWMCCT = 'U'
UPD_LGC_SDTMCCT = 'U'
tables
* icdtxt_ccgwwmcct = lt_cdtxt
xlgc_sdtmcct = /LGC/SDTMCCT_NEW"NEW
ylgc_sdtmcct = /LGC/SDTMCCT_OLD"OLD
.
COMMIT work.
Please have a look into the code and let me know if i missed something .
Thanks In Advace,
Satya
2012 Oct 03 12:25 PM
At the data element level for /lgc/sdtvs91-kunnr is the checkbox for change document set.
It is under further characteristics tab .
2012 Oct 05 7:20 AM
In CDPOS table it is always updating the old value and new value fields is blank though i am passing both the value to the *WRITE_DOCUMENT function module .And there is no entry in CDHDR table .
Are you sure, you have orphan records in CDPOS without header in CDHDR, if yes raise an OSS message, looks like a severe bug ?
Regards,
Raymond
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |