11-27-2007 3:24 PM
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
11-27-2007 6:10 PM
Hi,
Please use FM CHANGEDOCUMENT_READ instead.
Regards,
Ferry Lianto
11-27-2007 3:41 PM
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
11-27-2007 4:22 PM
Eric,
Can you please show me example program since i did not see any parameter ( OBJECTCLAS and OBJECTID) in FM
Thanks
Seshu
11-27-2007 4:39 PM
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.
11-27-2007 5:19 PM
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
11-27-2007 5:57 PM
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
11-27-2007 8:38 PM
Thanks to Eric,Abhishek and Ferry.
Now it works great when i use FM CHANGEDOCUMENT_READ.
Thanks
Seshu
11-27-2007 6:10 PM
Hi,
Please use FM CHANGEDOCUMENT_READ instead.
Regards,
Ferry Lianto