cancel
Showing results for 
Search instead for 
Did you mean: 

need standard BAPI and Table for PO order

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

solved

Former Member
0 Kudos

solved

Former Member
0 Kudos

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