Skip to Content
0
Former Member
Feb 27, 2009 at 08:12 AM

Line item display problem from table

54 Views

Hi experts......

I am strucked up in my report with a problem ,

document no.(BELNR) for corresponding bkpf has four line item in BSEG table,

BUZEI GJAHR BUZEI KOART DMBTR HKONT

9000000078 2006 1 S 200,600.00 0000500100

9000000078 2006 2 S 24,072.00 0000301500

9000000078 2006 3 S 481.00 0000300450

9000000078 2006 4 D 225,153.00 0000209800

My requiremet is that

========================

when it goes inside the loop

i want to display the belnr where Hkont = '000500100'

and koart = 'D', that will be 001 line item (buzei) and 0004 Buzei in this case.

ie my output should be like

============================

GROSS NET

200,600.00 225,153.00

If i specify and hkont = '000500100'and koart = 'D'. its not getting inside the select itself

if i select without the where condition and hkont = '000500100'and koart = 'D' its going inside...

Can you please help me out....

My codings

elect bukrs belnr gjahr xref1 xref2 kunnr buzei dmbtr hkont koart from bseg into corresponding fields of table it_bseg

for all entries in it_bkpf

where bukrs = it_bkpf-bukrs

and belnr = it_bkpf-belnr

and gjahr = it_bkpf-gjahr

and hkont = '000500100'

and koart = 'D'.

.

.

.

.

.

loop at it_bseg into wa_bseg .

wa_final-kunnr = wa_bseg-kunnr.

wa_final-xref1 = wa_bseg-xref1.

wa_final-xref2 = wa_bseg-xref2.

wa_final-DMbtr = wa_bseg-dmbtr.

.

.

..