2008 Feb 13 6:30 AM
I am using a Change Document Function module "CHANGEDOCUMENT_READ". It is taking a long time.
I am using the parameters:
Start date is the first date of the current month
Enddate as last date of the current month
Object class as 'MATERIAL'
Table Name as 'MBEW'
2008 Feb 14 8:57 AM
Hi ,
When you want to read the change documents, please follow the below process.
1. Read the change documents headers with function modules
call function 'CHANGEDOCUMENT_READ_HEADERS'
exporting
date_of_change = cdhdr-udate
objectclass = cdhdr-objectclas
objectid = cdhdr-objectid
time_of_change = '000000'
username = cdhdr-username
tables
i_cdhdr = gt_cdhdr
exceptions
no_position_found = 1
wrong_access_to_archive = 2
time_zone_conversion_error = 3
others = 4.
2. From above step you will get data of change documents very quickly into Itab (gt_cdhdr)
3. Read the details on change documents with functiion module by using Itab in loop for each document.
loop at gt_cdhdr.
call function 'CHANGEDOCUMENT_READ_POSITIONS'
exporting
changenumber = gt_cdhdr-changenr
importing
header = cdhdr
tables
editpos = gt_cdshw
exceptions
no_position_found = 1
wrong_access_to_archive = 2
others = 3.
Above is the best way to read the change documents.
Rewards please if above info is useful.
Thanks.
2008 Feb 13 8:35 AM
HI,
Please Check the Standard Report RSSCD200 for your purpose and then check wether the
FM CHANGEDOCUMENT_READ needs any additional parameters or not.
Regards
Balu.Malvatu
2008 Feb 14 8:57 AM
Hi ,
When you want to read the change documents, please follow the below process.
1. Read the change documents headers with function modules
call function 'CHANGEDOCUMENT_READ_HEADERS'
exporting
date_of_change = cdhdr-udate
objectclass = cdhdr-objectclas
objectid = cdhdr-objectid
time_of_change = '000000'
username = cdhdr-username
tables
i_cdhdr = gt_cdhdr
exceptions
no_position_found = 1
wrong_access_to_archive = 2
time_zone_conversion_error = 3
others = 4.
2. From above step you will get data of change documents very quickly into Itab (gt_cdhdr)
3. Read the details on change documents with functiion module by using Itab in loop for each document.
loop at gt_cdhdr.
call function 'CHANGEDOCUMENT_READ_POSITIONS'
exporting
changenumber = gt_cdhdr-changenr
importing
header = cdhdr
tables
editpos = gt_cdshw
exceptions
no_position_found = 1
wrong_access_to_archive = 2
others = 3.
Above is the best way to read the change documents.
Rewards please if above info is useful.
Thanks.