‎2008 Jul 29 7:40 AM
Hi All,
How to retrieve data from MLHD when Input is a date range. Is there any Function Module for that.
Atul
‎2008 Jul 29 7:46 AM
Hi,
I dont think there is a FM for your requirement...
Below are some of the FMs' on MLHD...
CKML_F_DOCUMENT_READ_MLHD
CONVERT_CKML2_TO_CKMLHD_PR
CONVERT_CKMLHD_PR_TO_CKML2
CKMT_POST_MATERIAL_LEDGER_DATA
CKMT_PROCESS_MATERIAL_LEDGER
Try directly querying the table MLHD for the input date range...
Reward if useful
Regards
Shiva
‎2008 Jul 29 7:49 AM
Select * from MLHD into it_mlhd where BLDAT in so_bldate
Regarsd
rajesh
‎2008 Jul 29 8:06 AM
Hi,
if you do a simple "where used" search from se11 you´ll find manu fm´s.
e.g.
CKML_F_DOCUMENT_READ_MLHD
Just as a sample, within fm CKML_F_DOCUMENT_REPORT
you can find how date range is treated:
SELECT mlhd~cpudt mlhd~cputm mlit~xabrerr
mlhd~belnr mlhd~kjahr
INTO CORRESPONDING FIELDS OF TABLE lt_mserror
FROM mlhd
JOIN mlit
ON mlhd~belnr = mlit~belnr
AND mlhd~kjahr = mlit~kjahr
JOIN mlpp
ON mlhd~belnr = mlpp~belnr
AND mlhd~kjahr = mlpp~kjahr
AND mlit~posnr = mlpp~posnr
WHERE vgart = y_vgart_abrechnung_einst
AND ( cpudt > t_mlhd-cpudt OR
( cpudt = t_mlhd-cpudt AND
cputm >= t_mlhd-cputm ) )
AND kalnr = t_doc_report-kalnr
AND psart = y_vgart_abrechnung_einst
AND NOT ( xabrerr = space OR
xabrerr IS NULL )
AND bdatj = t_doc_report-bdatj
AND poper = t_doc_report-poper.
Best regards.
‎2008 Jul 29 11:13 AM
Hi,
If i writting select * from MLHD where MLHD~CPUDT BETWEEN SO_DATE-LOW AND SO_DATE-HIGH.
It is taking too much time.
Can you tell me how to to do performance tunning to this select statement..
Atul