09-23-2008 5:52 PM
Hi, all.
I meet a runtime error after using the below function in my program. I totally dun know how to start to solve it
CALL FUNCTION 'BAPI_PO_GETDETAIL1'
EXPORTING
PURCHASEORDER = PO_NUMBER
DELIVERY_ADDRESS = 'X'
TABLES
POADDRDELIVERY = IT_DELIVER[]
.
Am I using this function correctly?
The error analysis is like below:
A RAISE statement in the program "CL_HANDLE_MANAGER_MM==========CP" raised the
exception
condition "FAILURE".
Since the exception was not intercepted by a superior
program, processing was terminated.
Very appreciate if somebody can guide me. Thanks in advance.
09-24-2008 2:37 AM
09-24-2008 2:50 AM
Hi there
Use FM 'BAPI_PO_GETDETAIL' as follows:
DATA: l_po_order type ebeln,
wa_header type bapiekkol,
tb_po_items type table of bapiekpo,
tb_return type table of bapireturn.
wa_return type bapireturn.
call function 'BAPI_PO_GETDETAIL'
exporting
purchaseorder = l_po_order
items = 'X'
account_assignment = ' '
schedules = ' '
history = ' '
item_texts = ' '
header_texts = ' '
services = ' '
confirmations = ' '
service_texts = ' '
importing
po_header = wa_po_header
tables
po_items = tb_po_items
return = tb_return.
Error handling
read table tb_return index 1 into wa_return.
if wa_return-type = 'E'.
message e000( ) raising error_in_bapi_po_getdetail.
endif.
Thanks
Shivika
09-24-2008 4:06 AM
Which function module can let me retrieve the address number and also the delivery address according to the item in PO??
09-24-2008 4:17 AM
may be you have to consider the plant and derive the address from the plant address number.
09-24-2008 4:45 AM
Hello
Address will be there in the parametr PO_ADDRESS as an exporting parameter from FM BAPI_PO_GETDETAIL.
Thanks
Shivika