‎2008 Mar 06 8:45 AM
Hi,
I have a requirement like create the change document for Custom table.
I have Generated the Object by using SCDO - ZTESTDOC
and Inserting the values into Custom table.It is inserting the Values into custom table but change document is not generating.
Here is the code what i have writeen
Can anyone please check this and let me know where the problem Exists.
&----
*& Report ZCHANGEDOCS
*&
&----
*&
*&
&----
REPORT ZCHANGEDOCS.
Data : w_data type ZTESTTABLE,
w_new like ZZTESTTABLE occurs 0 with header line,
w_old like ZZTESTTABLE occurs 0 with header line,
w_CDTXT type CDTXT occurs 0 with header line.
w_data-name = 'TEST11'.
w_DATA-ROLLNUM = '11111'.
w_data-name = 'TEST2'.
w_DATA-ROLLNUM = '4444444'.
INSERT INTO ZTESTTABLE values w_data.
Commit work.
CALL FUNCTION 'ZTESTDOC_WRITE_DOCUMENT'
EXPORTING
objectid = 'ZTESTDOC'
tcode = sy-tcode
utime = sy-uzeit
udate = sy-datum
username = sy-uname
PLANNED_CHANGE_NUMBER = ' '
OBJECT_CHANGE_INDICATOR = 'U'
PLANNED_OR_REAL_CHANGES = 'R'
NO_CHANGE_POINTERS = ' '
UPD_ICDTXT_ZTESTDOC = ' '
UPD_ZTESTTABLE = ' '
tables
icdtxt_ztestdoc = w_CDTXT
xztesttable = w_new
yztesttable = w_old.
.
‎2008 Mar 06 9:08 AM
Hi,
Even if I Change the Indicator to 'I',Its not working.
And Even for the Custom Table,In Technical Settings i have Check the Log changes.
Please let me know if anything do i need to modify.
Thanks.
Vijetha
‎2008 Mar 06 8:49 AM
I would assume its bcos you are inserting data into the custom table and while calling the change doc generation FM you are passing the OBJECT_CHANGE_INDICATOR as 'U'.
Kindly check that.
Thanks,
Balaji
‎2008 Mar 06 9:08 AM
Hi,
Even if I Change the Indicator to 'I',Its not working.
And Even for the Custom Table,In Technical Settings i have Check the Log changes.
Please let me know if anything do i need to modify.
Thanks.
Vijetha
‎2008 Mar 07 9:13 AM
Pass
OBJECT_CHANGE_INDICATOR = 'I'
UPD_ZTESTTABLE = 'I'
This will create entries to CDHDR and CDPOS table.
Reward points for all helpful answers.
Thanks,
Balaji