Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with Change Document creation

former_member196651
Contributor
0 Likes
696

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

4 REPLIES 4
Read only

Former Member
0 Likes
597

Hi,

maybe it depends on the "Delivery Class" or the "Log data changes" flag in the technical settings of your table ...

Regards,

Klaus

Read only

0 Likes
597

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

Read only

eduardo_hinojosa
Active Contributor
0 Likes
597

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

Read only

0 Likes
597

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