2009 Jul 09 12:38 PM
Hi experts ,
How can i remove lock indicator for line items in PO through Bapi_po_change.If the particular line item is trash , i want to unlock it .can i do this with the BAPI .A sample code will be useful.
regards
Prasun
2009 Jul 09 12:42 PM
You need to pass below details for BAPI - BAPI_PO_CHANGE
Importing parameter
PURCHASEORDER <=== PO number
Tables parameter
POITEM
PO_ITEM <=== Po Line item number
DELETE_IND <=== ' ' (This shld be SPACE)
POITEM
PO_ITEM <=== Po Line item number
PO_ITEMX <=== 'X'
DELETE_IND <=== 'X'
After this you need to commit usig the BAPI - BAPI_TRANSACTION_COMMIT
Importing parameter
WAIT <=== 'X'
Hi experts ,
How can i remove lock indicator for line items in PO through Bapi_po_change.If the particular line item is trash , i want to unlock it .can i do this with the BAPI .A sample code will be useful.
regards
Prasun
2009 Jul 09 12:42 PM
You need to pass below details for BAPI - BAPI_PO_CHANGE
Importing parameter
PURCHASEORDER <=== PO number
Tables parameter
POITEM
PO_ITEM <=== Po Line item number
DELETE_IND <=== ' ' (This shld be SPACE)
POITEM
PO_ITEM <=== Po Line item number
PO_ITEMX <=== 'X'
DELETE_IND <=== 'X'
After this you need to commit usig the BAPI - BAPI_TRANSACTION_COMMIT
Importing parameter
WAIT <=== 'X'
2009 Jul 10 7:29 AM
2009 Jul 10 7:43 AM
Hi,
I checked it. It works... One mistake from my side Highlighted... Structure name change.
You need to pass below details for BAPI - BAPI_PO_CHANGE
Importing parameter
PURCHASEORDER <=== PO number
Tables parameter
Structure name : -
POITEM
PO_ITEM <=== Po Line item number
DELETE_IND <=== ' ' (This shld be SPACE)
Structure name : -
POITEMX (This is what changed)
PO_ITEM <=== Po Line item number
PO_ITEMX <=== 'X'
DELETE_IND <=== 'X'
After this you need to commit using the BAPI - BAPI_TRANSACTION_COMMIT
Importing parameter
WAIT <=== 'X'
Regards,
Bhargava
2009 Jul 10 10:01 AM
Hi ,
It worked man .Thanks a lot .Can you kindly tell me how unlock it back ,actually the requirement was if the poitem is locked ie trash , i have unlock it then update the final invoice and delivery complete indicator ,and lock the item back .1st 2 things i have achieved ,now how shall i lock it back .
regards
Prasun
2009 Jul 10 10:25 AM
Great News...
To lock the Item back u need to pass DELETE_IND with 'S'.
DELETE_IND
' ' - To unlock
'S' - To Lock
'X' - To set delete....
You need to pass below details for BAPI - BAPI_PO_CHANGE
Importing parameter
PURCHASEORDER <=== PO number
Tables parameter
Structure name : -
POITEM
PO_ITEM <=== Po Line item number
DELETE_IND <=== 'S'
After this you need to commit using the BAPI - BAPI_TRANSACTION_COMMIT
Importing parameter
WAIT <=== 'X'
Hope this will solve ur issue..
Regards,
Bhargava
2009 Jul 10 12:03 PM
thanks a lot man it worked . i have awarded u points for the same.
regards
Prasun
2010 Jun 06 2:34 PM
Hi guys,
I just want to add an observation to this post .
My scenario was as follows: sales order - >purchase requisition - > purchase order.
My task was to reject the line item in the sales order and of course this means that you have to delete the line item in the PO first (and cancel the subsequent documents).
If you are to delete the line item in the PO, set the DELETE_IND to 'L' and not 'X'. The value 'X' only marks it for archiving and does not "release" the quantity; EBAN-BSMNG was not set to 0 and system returned message V1544.
This is on R/3 4.7c, i don;t know if on ECC you have the same problem.
Best regards,
Andrei Sosea
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |