Hi all,Iam using the following query to read data from tables stpo,mast and makt (These are ABAP tables).am using open sql.Have filtered some data to an internal table "gt_slitab", which should be applied to the below query using "For all Entries".Data in gt_slitabUDATE , CHNGIND ,NEW_V ,OLD_V ,TABNAME, TABKEY 20100520, U, 2.000 ,1.000, STPO, 020M000340220000000100000002 20100527, U 1.000 2.000 STPO 020M00034022000000010000000220100527 D STPO 020M00034022000000040000000820100527 U 3.000 2.000 STPO 020M00034022000000040000000820100525 D STPO 020M00034022000000050000001020100525 I STPO 020M00034022000000050000001020100527 D STPO 020M00034022000000060000001220100527 I STPO 020M000340220000000600000012
By applying the query below SELECT stpo~mandt stpo~stlty stpo~stlnr stpo~stlkn stpo~stpoz stpo~posnr stpo~idnrk mast~matnr makt~maktx INTO CORRESPONDING FIELDS OF TABLE gt_slitab FROM stpo INNER JOIN mast ON stpo~stlnr = mast~stlnr INNER JOIN makt ON mast~matnr = makt~matnr FOR ALL entries IN gt_stpotabkey // gt_stpotabkey is an itab with only tabkey entries from gt_slitab. WHERE stpo~mandt = gt_stpotabkey-mandt AND stpo~stlty = gt_stpotabkey-stlty AND stpo~stlnr = gt_stpotabkey-stlnr AND stpo~stlkn = gt_stpotabkey-stlkn AND stpo~stpoz = gt_stpotabkey-stpoz AND stpo~stlty = 'M' AND mast~stlan = p_bom // Parameter(For Exmaple 8) AND mast~matnr IN so_matnr.//(a list of values)
I got the following result_value:MANDT STLTY STLNR STLKN STPOZ POSNR IDNRK MATNR MAKTX20 M 34022 1 2 10 2002025921 SB10008502 kt, Nürnberg
But I expected the following entries as well as the output apart from the above one.020M000340220000000400000008020M000340220000000500000010020M000340220000000600000012Note that in result_value,the first 5 fields when concatenated results in the tabkey.(For example 020M000340220000000100000002)What am i doing wrong in the query.Any help is appreciated.ThanksJen