2006 Dec 21 6:53 PM
Hi,
Can any one help me out in using the BAPI_PO_CHANGE in setting the
Delivery completion (ELIKZ-EKPO) & Final Invoice (EREKZ-EKPO)
for the set of EBELP.
Please help me in passing the parameters.
Thank you,
shekar.
2006 Dec 21 7:29 PM
Hi,
Please reward points for helpful answers..And close the thread if the problem is solved..
Thanks,
Naren
Hi,
Please reward points for helpful answers..And close the thread if the problem is solved..
Thanks,
Naren
2006 Dec 21 7:05 PM
Hi,
Check this example of updating those field..
PARAMETERS: p_ebeln LIKE ekko-ebeln OBLIGATORY.
PARAMETERS: p_ebelp LIKE ekpo-ebelp OBLIGATORY.
DATA: t_item LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
DATA: t_itemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
t_item-po_item = p_ebelp.
t_item-no_more_gr = 'X'.
t_item-final_inv = 'X'.
APPEND t_item.
t_itemx-po_item = p_ebelp.
t_itemx-po_itemx = 'X'.
t_itemx-no_more_gr = 'X'. "Delivery complete
t_itemx-final_inv = 'X'. "Final invoice
APPEND t_itemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln
TABLES
return = t_return
poitem = t_item
poitemx = t_itemx.
LOOP AT t_return WHERE type = 'A' OR type = 'E'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'FAILED'.
ELSE.
WRITE: / 'SUCCESS'.
COMMIT WORK.
ENDIF.
Thanks,
Naren
2006 Dec 21 7:29 PM
Hi,
Please reward points for helpful answers..And close the thread if the problem is solved..
Thanks,
Naren
2006 Dec 21 8:08 PM
Hi naren.
please check the code below which I used, it didn't solve the purpose.
Can you please help me out.
data: ls_POITEM like BAPIMEPOITEM occurs 0 with header line,
ls_POITEMX like BAPIMEPOITEMX occurs 0 with header line,
ls_t_return like BAPIRET2 occurs 0 with header line.
clear: ls_t_return,
ls_poitem,
ls_poitemx.
ls_poitem-PO_ITEM = '00010'.
ls_poitem-NO_MORE_GR = 'X'.
ls_poitem-final_inv = ' '.
APPEND ls_poitem.
ls_poitemx-po_item = '00010'.
ls_poitemx-po_itemx = 'U'.
ls_poitemx-no_more_gr = 'X'.
ls_poitemx-final_inv = ' '. "Final invoice
APPEND ls_poitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = '0000402776'
TABLES
RETURN = ls_t_return
POITEM = ls_poitem
POITEMX = ls_poitemx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |