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: 

Issue with FM CHANGEDOCUMENT_READ_POSITIONS

Former Member
0 Kudos

Hello All,

We have custom program and using FM CHANGEDOCUMENT_READ_POSITIONS to read change

documents ,partcularly material master changes , this function module takes more than 10 to 15 minutes time for each change document number ( I am using cdhdr-CHANGENR in FM )

the same function module used in MM04 Transaction and here it is taking 1

or 2 seconds. I have been searching oss notes but unable to find out

exact thing.

My system is 4.6C and I am passing the data to FM as like MM04 transactions still it is taking lot of time.

Can you Please suggest what would be the issue.

Please do not suggest that any performance tuning techniques since issue with SAP .

Thanks

Seshu

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please use FM CHANGEDOCUMENT_READ instead.

Regards,

Ferry Lianto

7 REPLIES 7

JozsefSzikszai
Active Contributor
0 Kudos

hi Seshu,

we also had the same problem and I think it is better not to use this FM with CHANGENR only. There are two other fields (OBJECTCLAS and OBJECTID) in the key before this and they are quite important. So I would suggest to replace this FM with own selection of data.

ec

0 Kudos

Eric,

Can you please show me example program since i did not see any parameter ( OBJECTCLAS and OBJECTID) in FM

Thanks

Seshu

0 Kudos

I guess you do selection on CDHDR first. From this table you can get these two fields (these are key fields here as well). On the other hand OBJECTCLAS will be 'MATERIAL', while OBJECTID will be the material number (including the leading zeros.

0 Kudos

Yes ,i get the data from cdhdr table ,here i am passing

OBJECTCLAS = 'MATERIAL'

OBJECTID = Material number

then i am using FM ,this FM takes more time.

Thanks

Seshu

0 Kudos

Hi Seshu,

If you see the standard SAP code in the FM CHANGEDOCUMENT_READ_POSITIONS, what SAP does is, it check whether data is present in the internal table icdhdr or not. If its not found, it fires a Query on the table CDHDR which is based on just the CHANGENR (Change doc number field). Since the Primary Index is not being used, this FM takes time to fetch the data.

In case of MM04, the internal table icdhdr(Global data) is filled before the Call to the FM CHANGEDOCUMENT_READ_POSITIONS, so SAP will not goto the code of fetching the header details. That why it is Faster.

Regards,

Abhishek

Message was edited by:

Abhishek Jolly

0 Kudos

Thanks to Eric,Abhishek and Ferry.

Now it works great when i use FM CHANGEDOCUMENT_READ.

Thanks

Seshu

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please use FM CHANGEDOCUMENT_READ instead.

Regards,

Ferry Lianto