2006 Nov 26 7:09 AM
HI,
How to develop a report which will list out all the purchase order details and the secondary list contains all the information about the supplier.
2006 Nov 26 7:24 AM
Hi Suhir,
First Fetch the Records(EBELN (PO), LIFNR(Vendor - Supplier) ) from EKKO for getting all the Purchage Orders.
( if you want all the PO Items also, Select all the records from EKPO )
Put it into one internal table.
And Display it.
Then User clicks the Supplier(LIFNR) in the basic list.
get the relevant data from LFA1 based on the LIFNR( Clicked Supplier).
Then display it .
Thanks
Sekhar.
2006 Nov 26 9:32 AM
hi see the following simple code
REPORT YLSR_IR1.
types: begin of ty_ekko,
ebeln type ebeln,
lifnr type lifnr,
end of ty_ekko.
types: begin of ty_lfa1,
lifnr type lifnr,
name1 type name1,
end of ty_lfa1.
data: it_ekko type table of ty_ekko,
it_lfa1 type table of ty_lfa1,
st_ekko type ty_ekko,
st_lfa1 type ty_lfa1.
start-of-selection.
select EBELN LIFNR from EKKO into table it_ekko.
end-of-selection.
break yerradla.
loop at it_ekko into st_ekko.
write: / st_ekko-ebeln, st_ekko-lifnr.
hide st_ekko.
endloop.
AT line-selection.
select lifnr name1 from lfa1 into table it_lfa1
where lifnr = st_ekko-lifnr.
loop at it_lfa1 into st_lfa1.
write: / st_lfa1-lifnr, st_lfa1-name1.
endloop.
Thanks
Sekhar.