‎2010 Jan 21 12:18 PM
Hi ,
i am getting time_out dump when i am innerjoining MAPL and PLPO tables.
SELECT mapl matnr mapl werks mapl plnty mapl plnnr mapl plnal
plpo plnkn plpo zaehl plpo vgw04
FROM mapl INNER JOIN plpo ON
mapl plnnr = plpo plnnr
INTO TABLE ist_mapl
FOR ALL ENTRIES IN main_ltb
WHERE mapl matnr = main matnr
AND mapl werks = mainltb werks
AND vornr = '0010' .
‎2010 Jan 21 1:21 PM
Hi Vikas ,
Please check if you have check the internal table is initial or not before using FOR ALL ENTRIES IN main_ltb in Select query.
If internal table main_ltb is initial and you use for all entries with this, there will be full table scan .
Also I dont see any filtering criteria from internal table in where clause.
Regards,
Nikhil
‎2010 Jan 21 1:27 PM
Hi NIkhil ,
i am checking my internal table for initilization.
‎2010 Jan 21 2:03 PM
‎2010 Jan 21 1:25 PM
Hi,
Please check this
IF NOT main_ltb[] IS INITIAL. "Check this
SELECT mapl matnr mapl werks mapl plnty mapl plnnr mapl plnal
plpo plnkn plpo zaehl plpo vgw04
FROM mapl INNER JOIN plpo ON
mapl~plnnr = plpo~plnnr
INTO TABLE ist_mapl
FOR ALL ENTRIES IN main_ltb
WHERE mapl matnr = main matnr
AND mapl werks = mainltb werks
AND vornr = '0010'
AND <field> = main_ltb-<field>. "Check this
ENDIF.
‎2010 Jan 21 2:35 PM
your problem is not related to the FAE, but to the join:
INTO TABLE ist_mapl
FROM mapl AS a
INNER JOIN plpo AS b
ON b~plnnr = a~plnnr
FOR ALL ENTRIES IN main_ltb
WHERE a~matnr = main matnr
AND a~werks = mainltb werks
AND b~plnty = ????
AND vornr = '0010' .
You need PLNTY? If you don't know it, then you can add
as list of all possible values
PLNTY IN ( '...', '...' ... )
it should help.
Siegfried
‎2010 Jan 22 5:48 AM
Hello,
My recomendation would be do not to mix the Join and the for all entries in one statement as this would definately cause performance problem.
You better can use for all entries or Join with some more where conditions.
Please try this and let me know if you have any further doubt
Br,
Rajesh Gupta