12-10-2009 1:28 PM
Hi,
I would like to ask if bapi_po_change can delete the PO? I mean the whole PO and not just the PO line.
I tried to mark X at poheader and poheaderx delete_ind, even i tried delete_ind in poitem and poitemx but the return message is po 45xxxxxxxx has been changed. I still able to see the PO in me23 and even can edit.
What has gone wrong?
thanks
rgds
12-10-2009 1:39 PM
Hello , You can only set the deletion indicator through this function module.
So that the po gets marked with deletion flag.
check the value of deletion flag in EKKO and EKPO
Edited by: ksd on Dec 10, 2009 7:12 PM
12-10-2009 1:55 PM
Hi,
i tested in se37 for this bapi_po_change.
when i checked ekko, deletion flag not checked.
Kindly advise me what else i need to enter.
i enter at poheader and poheaderx and mark X at deletion flag. i also provide po number at poheader and poheaderx.
TYPE S
ID 06
NUMBER 023
MESSAGE Standard PO 4500020005 changed
LOG_NO
LOG_MSG_NO 000000
MESSAGE_V1 Standard PO
MESSAGE_V2 4500020005
MESSAGE_V3
MESSAGE_V4
PARAMETER POHEADER
ROW 1
FIELD
SYSTEM XSS
12-10-2009 1:59 PM
12-10-2009 2:12 PM
hi,
i tested in se37. also i tested in my program. both also cannot set to delete.
need advice.
thanks
12-10-2009 2:18 PM
Hello
Working code:
xpoitem-po_item = xekpo-ebelp. " set PO position here
xpoitem-delete_ind = 'X '.
append xpoitem.
xpoitemx-po_item = xekpo-ebelp. " set PO position here
xpoitemx-delete_ind = 'X'.
append xpoitemx.
endloop.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln "set PO number here
TABLES
return = xreturn
poitem = xpoitem
poitemx = xpoitemx.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING WAIT = 'X'.
endif.
12-10-2009 2:33 PM
hi,
i tested with the same thing before also.
i got the message 'Standard PO 45xxxxxxxx changed' but when check in me23 or table ekko deletion ind field, it is still empty.
infact i would like the whole PO to delete and not just the item line.
any advice?
thanks
12-10-2009 2:40 PM
Hello
Check table EKPO.
PO possible delete only set delete indicator on each position. Not in header.
12-10-2009 6:20 PM
Just look at this thread
You will come to know what is the difference between ekko and ekpo deletion indicator
And you cannot delete the PO details from the table.
What you can do is set indicator for the items.