‎2006 Nov 26 10:00 AM
i have extracted some data from mchb and mara using inner join then after it i am using other select staement to extract data from mseg-menge on matnr of mseg and internal table-matnr, its taking long time and not fetching the values properly for menge by comparing matnr of mseg and internal table can any one help me
‎2006 Nov 26 10:17 AM
Hi
U should use all key fields of MCHB tables to read MSEG, the problem is these fields are not key fields for MSEG, to the select can be very slow. U should check if these fields are using in a index or try to create an index for them in MSEG.
Max
‎2006 Nov 26 10:25 AM
use the follwoing function module to get the material documents from MSEG.
loop at your previous internal table
call FM 'MATERIAL_READ_DOCUMENTS'
Endloop.
otherwise fetch the fields lgort, werks, charg from MCHB
while fetching data from MSEG
put the where condition of MATNR = IT_DATA-MATNR and
LGORT = IT_data-LGORT and
WERKS = IT_DATA-WERKS and
CHARG = IT_DATA-CHARG.
‎2006 Nov 26 11:26 AM
i am finding the same probelm when i have added matnr werks lgort charg in whre condition of the select st to extract menge from mseg the system ishanging on plz give me the solultion for this
‎2006 Nov 26 11:38 AM
Hi
Your report should work when no user works, if you want to prevent sombody changes the quantities while you report's working, you should trigger the locks for MSEG table.
Max
‎2006 Nov 26 11:39 AM
Can you try with the function module ''MATERIAL_READ_DOCUMENTS''
‎2006 Nov 26 12:24 PM
i doesnt know how to use the function moudle what are the import and export parametes tables data need to be given.