Skip to Content

SCDO in ABAP on cloud

Hello Experts,

I have created Change object for table using the steps in the below link.

https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/63cb1c060276481a99e2316e4bf9214e.html

But the change is getting captured only for insert and delete.

When data is updated, the updated field is not getting captured in change log.

Inside position_aendern, there is a table tabinfo, the field logflag should be X, but it is not. I have attached the dubug screenshot.

IF update IS NOT INITIAL.

LOOP AT update-proord ASSIGNING FIELD-SYMBOL(<update>).

SELECT SINGLE * FROM zproord

WHERE po_num = @<update>-po_num

INTO @DATA(lw_proord).

TRY.

lt_chgnum = update_changedoc_matrel( im_objectid = 'ZPROORD1'

im_object_change_indicator = 'U'

im_n_proord = <UPDATE>

im_o_proord = lw_proord

im_upd_proord = 'U' ).

CATCH cx_chdo_write_error INTO lcx_chdo_write_error.

ENDTRY.

ENDLOOP.

ENDIF.

METHOD update_changedoc_matrel.

DATA n_proord TYPE zproord.

MOVE-CORRESPONDING im_n_proord TO n_proord.

GET TIME STAMP FIELD DATA(lv_time_stamp).

CONVERT TIME STAMP lv_time_stamp TIME ZONE 'EST'

INTO DATE DATA(lv_date) TIME DATA(lv_time).

TRY.

zcl_zproord1_chdo=>write(

EXPORTING

objectid = im_objectid

utime = lv_time

udate = lv_date

username = sy-uname

object_change_indicator = im_object_change_indicator

o_zproord = im_o_proord

n_zproord = n_proord

upd_zproord = im_upd_proord

IMPORTING

changenumber = rt_CHGNUM ).

CATCH cx_chdo_write_error INTO DATA(cx_chdo_write_error).

ENDTRY.

ENDMETHOD.

ENDCLASS.

If you any of have done this before, please give your comments on this.

Thanks,

Dinesh.

debug.png (85.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.