Application Development 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: 

CUSTOM TABLE NOT UPDATED BUT CHANGE DOCUMENT(cdhdr AND cdpos) MAITAINED LOGS

former_member245665
Participant
0 Kudos

hi,

i have created custom table with four fields..i created object in SCDO..so FM generated

i have used that FM in my program to maintain change document..

with this change document has maintained for my custom table....

but problem here is...custom not updated with data accordingly...

help me in this regard....

thanks..

suryam venu

9 REPLIES 9

raymond_giuseppi
Active Contributor
0 Kudos

So you have the update (V2) FM to update change document, but did you also create an update (V1) FM to update the database table (Similar to following sample.)

CALL FUNCTION 'Z_YOUROBJECT_UPDATE_V1' IN UPDATE TASK
   TABLES
     xztable = xztable
     yztable = yztable.
CALL FUNCTION 'Z_YOUROBJECT_WRITE_DOCUMEN_V2' IN UPDATE TASK
   EXPORTING
     objectid                = objectid
     tcode                   = tcode
     utime                   = utime
     udate                   = udate
     username                = username
     planned_change_number   = planned_change_number
     object_change_indicator = cdoc_upd_object
     planned_or_real_changes = cdoc_planned_or_real
     no_change_pointers      = cdoc_no_change_pointers
     upd_ztable              = upd_ztable
   TABLES
     xztable                 = xztable
     yztable                 = yztable.
* ...
COMMIT WORK.

Regards,

Raymond

0 Kudos

WHERE DID YOU GET THE V1 FUNCTION MODULE....

0 Kudos

I guess you need to create that update FM yourself as part of the custom (Z) table.

0 Kudos

i think using update statement we can directly update  our custom table

0 Kudos

Hi Venu,

Correct updation of CDHDR and CDPOS along with changes in custom table will depend upon the kind of operation you are carrying out on custom tale for e.g. Deletion, Insertion or Modification of entries. Moreover please check, processing type (Immediate update, Delayed update or Dialog) you have selected while creating change document object. For better clarity refer below link as I have already implemented it and it works fine.

How to maintain log for custom tables (Log Maintenance in CDHDR & CDPOS tables)

Let us know if you still have some issues.

Cheers

VJ

0 Kudos

thanks for the reply vishal...

i followed all the steps which were provided in the link....

----i think i used ''delayed update''......

so

  the custom table will not be updated using generated FM..am i right?.

----to update we have to use "UPDATE" command..isn't it?

Former Member
0 Kudos

Hi Venu,

Ensure that while creating the table check the check box change document.

Regards,

Mahesh somanath.

0 Kudos

HI,

i did..that's why i am maintaining change document...but custom table is not updating

Former Member