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

Change pointer

Former Member
0 Likes
491

Hi,

I set the change document flag on in a data element. What is the next step to log the changes in CDHDR and CDPOS. Please help!

Chuong

2 REPLIES 2
Read only

Former Member
0 Likes
442

Hi

Go through the following Steps for Change Pointers

Change Pointers

I know how to change the description of a material using ALE Change Pointers.

I will give the following few steps

1) Tcode BD61---> check the change pointers activated check box

save and goback.

2) Tcode BD50---> check the MATMAS check box save and comeback.

3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.

4) Tcode BD52---> give message type : matmas press ok button.

select all what ever you want and delete remaining fields.

save & come back.

5) 5) go to Tcode MM02 select one material and try to change the description and save it

it will effects the target systems material desciption will also changes

6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute

give Message type : MATMAS and Executte

Ranga

Read only

former_member194669
Active Contributor
0 Likes
442

Simply enable a flag in the domain will not create change documents.

I think you are trying to create a change document for a custom table ? is any program is updating this table then after save call these function modules.

PS : There is no need to mark domin change document check to be checked



  call function 'CHANGEDOCUMENT_OPEN'
    exporting
      objectclass             = 'Y01           '
      objectid                = objectid
      planned_change_number   = planned_change_number
      planned_or_real_changes = planned_or_real_changes
    exceptions
      sequence_invalid        = 1
      others                  = 2.

  case sy-subrc.
    when 0.                                   "ok.
    when 1. message a600 with 'SEQUENCE INVALID'.
    when 2. message a600 with 'OPEN ERROR'.
  endcase.

   call function 'CHANGEDOCUMENT_SINGLE_CASE'
     exporting
       tablename              = 'Y01                          '
       workarea_old           = o_y01
       workarea_new           = n_y01
        change_indicator       = upd_y01
        docu_delete            = ' '
     exceptions
       nametab_error          = 1
       open_missing           = 2
       position_insert_failed = 3
       others                 = 4.

    case sy-subrc.
      when 0.                                "ok.
      when 1. message a600 with 'NAMETAB-ERROR'.
      when 2. message a600 with 'OPEN MISSING'.
      when 3. message a600 with 'INSERT ERROR'.
      when 4. message a600 with 'SINGLE ERROR'.
    endcase.

  call function 'CHANGEDOCUMENT_CLOSE'
    exporting
      objectclass             = 'Y01           '
      objectid                = objectid
      date_of_change          = udate
      time_of_change          = utime
      tcode                   = tcode
      username                = username
      object_change_indicator = object_change_indicator
      no_change_pointers      = no_change_pointers
    exceptions
      header_insert_failed    = 1
      object_invalid          = 2
      open_missing            = 3
      no_position_inserted    = 4
      others                  = 5.

  case sy-subrc.
    when 0.                                   "ok.
    when 1. message a600 with 'INSERT HEADER FAILED'.
    when 2. message a600 with 'OBJECT INVALID'.
    when 3. message a600 with 'OPEN MISSING'.
    when 5. message a600 with 'CLOSE ERROR'.
  endcase.

a®