2010 Oct 11 4:49 AM
Hi all,
Please let me know how to fetch the Details from CDHDR and CDPOS using Function Module CHANGEDOCUMENT_READ_RANGES. If possible Clear me with an Example. It has to fetch the datas of Table KNVV
KNV1 etcc.... Separately for the Corresponding Table Selected In Report..
With regards,
Sudhakar Govndaraj.
2010 Oct 11 4:58 AM
Hi ,
Please check this FM : SUSR_CHANGE_DOC_IDENTITY ,
or check report : RSSCD100_PFCG
Regards,
Srini.
Hi all,
Please let me know how to fetch the Details from CDHDR and CDPOS using Function Module CHANGEDOCUMENT_READ_RANGES. If possible Clear me with an Example. It has to fetch the datas of Table KNVV
KNV1 etcc.... Separately for the Corresponding Table Selected In Report..
With regards,
Sudhakar Govndaraj.
2010 Oct 11 4:58 AM
Hi ,
Please check this FM : SUSR_CHANGE_DOC_IDENTITY ,
or check report : RSSCD100_PFCG
Regards,
Srini.
2010 Nov 26 6:10 AM
2010 Nov 26 10:37 AM
Hi Sudhakar,
cdhdr-objectclas = 'MATERIAL'.
cdhdr-objectid = t_mara-matnr.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
date_of_change = cdhdr-udate
objectclass = cdhdr-objectclas
objectid = cdhdr-objectid
time_of_change = cdhdr-utime
username = cdhdr-username
TABLES
i_cdhdr = icdhdr
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
CHECK sy-subrc EQ 0.
DELETE icdhdr WHERE change_ind EQ 'I'.
CHECK NOT icdhdr[] IS INITIAL.
LOOP AT icdhdr.
CHECK icdhdr-udate IN period.
CHECK icdhdr-username IN name.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = icdhdr-changenr
IMPORTING
header = cdhdr
TABLES
editpos = icdshw
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
CHECK sy-subrc EQ 0.
LOOP AT icdshw.
CHECK icdshw-text_case EQ space.
MOVE-CORRESPONDING icdshw TO itab.
MOVE-CORRESPONDING icdhdr TO itab.
MOVE icdshw-tabkey+3 TO itab-matnr.
APPEND itab.
ENDLOOP.
ENDLOOP.
Please refer the blog
/people/erwan.lebrun/blog/2007/03/09/documents-how-to-track-changes-through-abap
Edited by: Rahul Babukuttan on Nov 26, 2010 11:38 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |