2009 Mar 07 10:50 AM
Hi..
Iam trying to display the Purchase order History using BAPI_PO_GETDETAIL function module... and my code is
data : i_ekko type table of ekko,
i_ekko_wa like line of i_ekko.
parameters : p_vendor like ekko-lifnr,
p_po like ekko-ebeln.
select * from ekko into corresponding fields of table i_ekko where lifnr = p_vendor and ebeln = p_po.
loop at i_ekko into i_ekko_wa.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
PURCHASEORDER = '4500017124'
ITEMS = 'X'
* ACCOUNT_ASSIGNMENT = ' '
* SCHEDULES = ' '
HISTORY = 'X'
* ITEM_TEXTS = ' '
* HEADER_TEXTS = ' '
* SERVICES = ' '
* CONFIRMATIONS = ' '
* SERVICE_TEXTS = ' '
* EXTENSIONS = ' '
* IMPORTING
* PO_HEADER =
* PO_ADDRESS =
* TABLES
* PO_HEADER_TEXTS =
* PO_ITEMS =
* PO_ITEM_ACCOUNT_ASSIGNMENT =
* PO_ITEM_SCHEDULES =
* PO_ITEM_CONFIRMATIONS =
* PO_ITEM_TEXTS =
* PO_ITEM_HISTORY =
* PO_ITEM_HISTORY_TOTALS =
* PO_ITEM_LIMITS =
* PO_ITEM_CONTRACT_LIMITS =
* PO_ITEM_SERVICES =
* PO_ITEM_SRV_ACCASS_VALUES =
* RETURN =
* PO_SERVICES_TEXTS =
* EXTENSIONOUT =
.
endloop.Iam not getting the output ... It doesnt show errors..
Regards,
Abaper.
2009 Mar 07 10:55 AM
where is the displaying PO code???
check your code once again...
look at this example...
report zbapi_1.
data: begin of i_poitem occurs 0.
include structure bapiekpo.
data: end of i_poitem.
parameters p_ebeln like ekko-ebeln default '4500012164'.
call function 'BAPI_PO_GETDETAIL'
exporting
purchaseorder = p_ebeln
ITEMS = 'X'
ACCOUNT_ASSIGNMENT = ' '
SCHEDULES = ' '
HISTORY = ' '
ITEM_TEXTS = ' '
HEADER_TEXTS = ' '
SERVICES = ' '
CONFIRMATIONS = ' '
SERVICE_TEXTS = ' '
EXTENSIONS = ' '
IMPORTING
PO_HEADER = PO_HEADER
PO_ADDRESS = PO_ADDRESS
tables
PO_HEADER_TEXTS = PO_HEADER_TEXTS
po_items = i_poitem.
PO_ITEM_ACCOUNT_ASSIGNMENT = PO_ITEM_ACCOUNT_ASSIGNMENT
PO_ITEM_SCHEDULES = PO_ITEM_SCHEDULES
PO_ITEM_CONFIRMATIONS = PO_ITEM_CONFIRMATIONS
PO_ITEM_TEXTS = PO_ITEM_TEXTS
PO_ITEM_HISTORY = PO_ITEM_HISTORY
PO_ITEM_HISTORY_TOTALS = PO_ITEM_HISTORY_TOTALS
PO_ITEM_LIMITS =
PO_ITEM_CONTRACT_LIMITS =
PO_ITEM_SERVICES =
PO_ITEM_SRV_ACCASS_VALUES =
RETURN =
PO_SERVICES_TEXTS = .
EXTENSIONOUT = EXTENSIONOUT
loop at i_poitem.
write 😕 'PONUMBER = ' , i_poitem-po_number color col_heading,
/ 'ITEM = ' , i_poitem-po_item,
/ 'MATERIAL NAME = ' , i_poitem-material,
/ 'MATERIAL = ' , i_poitem-pur_mat,
/ 'CHANGED ON = ', i_poitem-changed_on,
/ 'SHORT TEXT = ' , i_poitem-short_text,
/ 'COMPANY CODE = ' , i_poitem-co_code,
/ 'PLANT = ' , i_poitem-plant,
/ 'MATERIAL GROUP = ' , i_poitem-mat_grp,
/ 'QUANTITY = ' , i_poitem-quantity left-justified,
/ 'UNIT = ' , i_poitem-unit,
/ 'NET PRICE = ' , i_poitem-net_price left-justified.
uline.
endloop.
Edited by: Venkat Appikonda on Mar 7, 2009 11:57 AM
Hi..
Iam trying to display the Purchase order History using BAPI_PO_GETDETAIL function module... and my code is
data : i_ekko type table of ekko,
i_ekko_wa like line of i_ekko.
parameters : p_vendor like ekko-lifnr,
p_po like ekko-ebeln.
select * from ekko into corresponding fields of table i_ekko where lifnr = p_vendor and ebeln = p_po.
loop at i_ekko into i_ekko_wa.
CALL FUNCTION 'BAPI_PO_GETDETAIL'
EXPORTING
PURCHASEORDER = '4500017124'
ITEMS = 'X'
* ACCOUNT_ASSIGNMENT = ' '
* SCHEDULES = ' '
HISTORY = 'X'
* ITEM_TEXTS = ' '
* HEADER_TEXTS = ' '
* SERVICES = ' '
* CONFIRMATIONS = ' '
* SERVICE_TEXTS = ' '
* EXTENSIONS = ' '
* IMPORTING
* PO_HEADER =
* PO_ADDRESS =
* TABLES
* PO_HEADER_TEXTS =
* PO_ITEMS =
* PO_ITEM_ACCOUNT_ASSIGNMENT =
* PO_ITEM_SCHEDULES =
* PO_ITEM_CONFIRMATIONS =
* PO_ITEM_TEXTS =
* PO_ITEM_HISTORY =
* PO_ITEM_HISTORY_TOTALS =
* PO_ITEM_LIMITS =
* PO_ITEM_CONTRACT_LIMITS =
* PO_ITEM_SERVICES =
* PO_ITEM_SRV_ACCASS_VALUES =
* RETURN =
* PO_SERVICES_TEXTS =
* EXTENSIONOUT =
.
endloop.Iam not getting the output ... It doesnt show errors..
Regards,
Abaper.
2009 Mar 07 10:55 AM
where is the displaying PO code???
check your code once again...
look at this example...
report zbapi_1.
data: begin of i_poitem occurs 0.
include structure bapiekpo.
data: end of i_poitem.
parameters p_ebeln like ekko-ebeln default '4500012164'.
call function 'BAPI_PO_GETDETAIL'
exporting
purchaseorder = p_ebeln
ITEMS = 'X'
ACCOUNT_ASSIGNMENT = ' '
SCHEDULES = ' '
HISTORY = ' '
ITEM_TEXTS = ' '
HEADER_TEXTS = ' '
SERVICES = ' '
CONFIRMATIONS = ' '
SERVICE_TEXTS = ' '
EXTENSIONS = ' '
IMPORTING
PO_HEADER = PO_HEADER
PO_ADDRESS = PO_ADDRESS
tables
PO_HEADER_TEXTS = PO_HEADER_TEXTS
po_items = i_poitem.
PO_ITEM_ACCOUNT_ASSIGNMENT = PO_ITEM_ACCOUNT_ASSIGNMENT
PO_ITEM_SCHEDULES = PO_ITEM_SCHEDULES
PO_ITEM_CONFIRMATIONS = PO_ITEM_CONFIRMATIONS
PO_ITEM_TEXTS = PO_ITEM_TEXTS
PO_ITEM_HISTORY = PO_ITEM_HISTORY
PO_ITEM_HISTORY_TOTALS = PO_ITEM_HISTORY_TOTALS
PO_ITEM_LIMITS =
PO_ITEM_CONTRACT_LIMITS =
PO_ITEM_SERVICES =
PO_ITEM_SRV_ACCASS_VALUES =
RETURN =
PO_SERVICES_TEXTS = .
EXTENSIONOUT = EXTENSIONOUT
loop at i_poitem.
write 😕 'PONUMBER = ' , i_poitem-po_number color col_heading,
/ 'ITEM = ' , i_poitem-po_item,
/ 'MATERIAL NAME = ' , i_poitem-material,
/ 'MATERIAL = ' , i_poitem-pur_mat,
/ 'CHANGED ON = ', i_poitem-changed_on,
/ 'SHORT TEXT = ' , i_poitem-short_text,
/ 'COMPANY CODE = ' , i_poitem-co_code,
/ 'PLANT = ' , i_poitem-plant,
/ 'MATERIAL GROUP = ' , i_poitem-mat_grp,
/ 'QUANTITY = ' , i_poitem-quantity left-justified,
/ 'UNIT = ' , i_poitem-unit,
/ 'NET PRICE = ' , i_poitem-net_price left-justified.
uline.
endloop.
Edited by: Venkat Appikonda on Mar 7, 2009 11:57 AM
2009 Mar 07 11:30 AM
Hi..,
Thanks for ur help ..Can I have the field name of pending purchase order quantity ... I want to display that
field mainly...
Regards,
Abaper.
2009 Mar 07 7:39 PM
u can also refer EKBE, EKET tables in conjuction with EKKO, EKPO.
thanq
2009 Mar 07 12:32 PM
hi this can be calculated in the output table like this ..
pending PO quantity = Open Qty - Delivered Qty .
2009 Mar 07 7:17 PM
It doesn't show errors because you have commented out the RETURN table!
Rob
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |