‎2010 Oct 14 11:21 AM
Hello Friends,
I am facing a problem in generating the change document for fields in a table.
I had created a Change Document for an Z table and I had checked the change doc. check box of the relevant data element of that table. But when I create a new entry in that table the new value is not placed in the corresponding field in CDPOS.
Similarly when I update values in the table, no entry is entered in both CDHDR & CDPOS tables.
The following is the parameters given to the Write Document function module for updating the values in the table :
CALL FUNCTION 'ZMM_CD_BGRNO_WRITE_DOCUMENT'
EXPORTING
objectid = 'ZMM_CD_BGRNO'
tcode = sy-tcode
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_ZMM_CD_MATNR = ' '
n_ztmm093 = wa_n_ztmm093
o_ztmm093 = wa_o_ztmm093
UPD_ZTMM093 = 'U'
TABLES
icdtxt_zmm_cd_matnr = it_cdtxt.
The following is the parameters given to the Write Document function module for updating the values in the table :
CALL FUNCTION 'ZMM_CD_BGRNO_WRITE_DOCUMENT'
EXPORTING
objectid = 'ZMM_CD_BGRNO'
tcode = sy-tcode
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_ZMM_CD_MATNR = ' '
n_ztmm093 = wa_n_ztmm093
o_ztmm093 = wa_o_ztmm093
UPD_ZTMM093 = 'U'
TABLES
icdtxt_zmm_cd_matnr = it_cdtxt.
The following is the parameters given to the Write Document function module for inserting the values in the table :
CALL FUNCTION 'ZMM_CD_BGRNO_WRITE_DOCUMENT'
EXPORTING
objectid = 'ZMM_CD_BGRNO'
tcode = sy-tcode
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_ZMM_CD_MATNR = ' '
n_ztmm093 = wa_n_ztmm093
o_ztmm093 = wa_o_ztmm093
UPD_ZTMM093 = 'I'
TABLES
icdtxt_zmm_cd_matnr = it_cdtxt.
Here the work area wa_n_ztmm093 contains the new values and wa_o_ztmm093 contains the old values.
Is there any error from my side in calling this Fm? or Is there any settings to be done from Basis side for saving Change Documents?
Regards,
Abijith
‎2010 Oct 14 11:35 AM
Hi,
maybe it depends on the "Delivery Class" or the "Log data changes" flag in the technical settings of your table ...
Regards,
Klaus
‎2010 Oct 19 11:03 AM
Hello Klaus,
I had maintained the Log Changes flag in Technical settings and the delivery class is A. Still this thing is not working.
Regards,
Abijith
‎2010 Oct 14 12:40 PM
Hi,
Compare the data old and new. If are the same you don't write nothing.
Other question. Check in the data type for the fied that you change the value, in futher characteristics if the flag of change document is on. If it's empty, when you change this field you don't write nothing in CDPOS/CDHDR.
Regards,
Eduardo
‎2010 Oct 19 11:05 AM
Hello Eduardo,
There are difference between old and new values given to the function modules. Similarly I had checked the Change Document flag in the dataelement of the field in table. But still the problem remains.
Regards,
Abijith