on 10-21-2008 6:15 AM
Hi all,
is there any standard bapi for vendors last purchase order (based on document type).
thanks in advance.
Edited by: Dhanush on Oct 21, 2008 1:25 AM
solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok i cleared.i prepare report like this..
types : begin of ty_ekko,
ebeln type ekko-ebeln,
lifnr type ekko-lifnr,
bedat type ekko-bedat,
bsart type ekko-bsart,
*ernam TYPE ekko-ernam,
*pincr TYPE ekko-pincr,
*lponr TYPE ekko-lponr,
end of ty_ekko.
TYPES :BEGIN OF ty_ekpo,
ebeln TYPE ekpo-ebeln,
matnr TYPE ekpo-matnr,
ebelp TYPE ekpo-ebelp,
werks TYPE ekpo-werks,
END OF ty_ekpo.
*
data: maxdt TYPE ekko-ebeln.
data : it_ekko type table of ty_ekko,
it_ekpo TYPE TABLE OF ty_ekpo,
wa_ekko type ty_ekko,
wa_ekpo type ty_ekpo.
parameters : lifnr like ekko-lifnr .
SELECT MAX( ebeln ) INTO maxdt FROM ekko WHERE lifnr = lifnr .
*select ebeln lifnr bedat bsart into table it_ekko from ekko where lifnr = lifnr AND bsart = bsart.
*select matnr ebelp werks into wa_ekko1 from ekpo where matnr = matnr AND bsart = bsart.
select ebeln lifnr bedat bsart into wa_ekko from ekko WHERE lifnr = lifnr AND ebeln = maxdt.
ENDSELECT.
select ebeln matnr ebelp werks from ekpo into TABLE it_ekpo where ebeln = wa_ekko-ebeln. .
write: / 'Vendor', 10 'Purchasing Doc' , 30 'Document type', 45 'Documentdate' , 65 'Material', 79 'Item number', 94 'plant'.
ULINE.
loop at it_ekpo into wa_ekpo.
write : / wa_ekko-lifnr,
10 wa_ekko-ebeln,
30 wa_ekko-bsart,
45 wa_ekko-bedat,
65 wa_ekpo-matnr,
79 wa_ekpo-ebelp,
94 wa_ekpo-werks.
endloop.
Edited by: Dhanush on Oct 22, 2008 3:23 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.