‎2005 Sep 12 7:34 PM
Dear Abapers,
Can anyone help in writing the report(code) to just display Purchase Orders without the Purchase Requisition Numbers.
Thanx,
Suruchi
‎2005 Sep 12 7:41 PM
This sample program will fetch purchase orders/line items for POs entered in the select-options that do not have a corresponding purchase req.
report zrich_0003 no standard page heading.
data: begin of itab occurs 0,
ebeln type ekko-ebeln,
ebelp type ekpo-ebelp,
matnr type ekpo-matnr,
txz01 type ekpo-txz01,
menge type ekpo-menge,
meins type ekpo-meins,
end of itab.
select-options: s_ebeln for itab-ebeln.
start-of-selection.
select * into corresponding fields of table itab
from ekko
inner join ekpo
on ekko~ebeln = ekpo~ebeln
<b> where ekko~ebeln in s_ebeln
and ekpo~banfn = space.</b>
loop at itab.
write:/ itab-ebeln, itab-ebelp, itab-matnr,
itab-txz01, itab-menge, itab-meins.
endloop.
Please remember to award points for helpful answers. Thanks.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
‎2005 Sep 12 7:41 PM
This sample program will fetch purchase orders/line items for POs entered in the select-options that do not have a corresponding purchase req.
report zrich_0003 no standard page heading.
data: begin of itab occurs 0,
ebeln type ekko-ebeln,
ebelp type ekpo-ebelp,
matnr type ekpo-matnr,
txz01 type ekpo-txz01,
menge type ekpo-menge,
meins type ekpo-meins,
end of itab.
select-options: s_ebeln for itab-ebeln.
start-of-selection.
select * into corresponding fields of table itab
from ekko
inner join ekpo
on ekko~ebeln = ekpo~ebeln
<b> where ekko~ebeln in s_ebeln
and ekpo~banfn = space.</b>
loop at itab.
write:/ itab-ebeln, itab-ebelp, itab-matnr,
itab-txz01, itab-menge, itab-meins.
endloop.
Please remember to award points for helpful answers. Thanks.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
‎2005 Sep 12 7:56 PM
<b>Please close your other post regarding the same</b>. Here is a small change to Rich's program, since you wanted only POs that don't refer to a requisition.
report zrich_0003 no standard page heading.
data: begin of itab occurs 0,
ebeln type ekko-ebeln,
ebelp type ekpo-ebelp,
matnr type ekpo-matnr,
txz01 type ekpo-txz01,
menge type ekpo-menge,
meins type ekpo-meins,
end of itab.
select-options: s_ebeln for itab-ebeln.
start-of-selection.
select * into corresponding fields of table itab
from ekko
inner join ekpo
on ekko~ebeln = ekpo~ebeln
where ekko~ebeln in s_ebeln
<b>and ekpo~banfn = space</b>.<-- change
loop at itab.
write:/ itab-ebeln, itab-ebelp, itab-matnr,
itab-txz01, itab-menge, itab-meins.
endloop.