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: 

Regarding a Change Document Function Module ----- VERY VERY Urgent

Former Member
0 Kudos
1,472

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'

1 ACCEPTED SOLUTION

Former Member
0 Kudos
216

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.

2 REPLIES 2

BalaMalvatu
Participant
0 Kudos
216

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

Former Member
0 Kudos
217

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.