2008 May 23 3:38 PM
Hi Experts,
I written on report stock History by commidity, with tables ltap, lips,likp and lfm1 . in the selection screen i given material is sample1.for sample1 i have the 74 records . in the output iam getting only 47 records , iam not getting the problem , iam sending the code please see that and suggest me.
loop at gt_ltap into gs_ltap.
if sy-subrc = 0.
gs_output-matnr = gs_ltap-matnr.
gs_output-maktx = gs_ltap-maktx.
gs_output-nista = gs_ltap-nista.
gs_output-tanum = gs_ltap-tanum.
gs_output-qdatu = gs_ltap-qdatu.
gs_output-vbeln = gs_ltap-vbeln.
endif.
loop at gt_lips into gs_lips where vbeln = gs_ltap-vbeln and
posnr = gs_ltap-posnr.
if sy-subrc = 0.
gs_output-vkgrp = gs_lips-vkgrp.
endif.
read table gt_likp into gs_likp with key vbeln = gs_lips-vbeln Binary search.
if sy-subrc = 0.
gs_output-kunnr = gs_likp-kunnr.
gs_output-lifnr = gs_likp-lifnr.
endif.
read table gt_lfm1 into gs_lfm1 with key lifnr = gs_likp-lifnr Binary search.
if sy-subrc = 0.
gs_output-ekgrp = gs_lfm1-ekgrp.
endif.
append gs_output to gt_output.
clear gs_output.
endloop.
endloop.
for above loop in gt_ltap iam having 74 records , for gt_output iam having 47 only.
rewards are help answers.
thanks & regards,
N.Narasimha rao.
2008 May 23 3:44 PM
Hi,
Before reading the internal tables ,sort them by the key field in ascending order
Hi,
Before reading the internal tables ,sort them by the key field in ascending order
2008 May 23 3:44 PM
Hi,
Before reading the internal tables ,sort them by the key field in ascending order
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |