‎2008 Jun 13 1:41 PM
Hi Experts,
I have a requirement where in I need to change the P.O quantity of a line item and the new quantity should create another line item of the existinng P.O.
For ex: EBELN :450000000
EBELP:0010 qty :10
0020 qty:20
If I change ebelp 0010 qty 10 to 20 a new line item should be created.
0030 qty:10.
Can anyone help me in achieving this.
Thanks,
Swarna..
‎2008 Jun 14 1:03 AM
You can use BAPI_PO_CHANGE.
For example
i_poitem-po_item = <item_number1>
i_poitem-quantity = <item_quantity>
i_poitemx-po_item = <item_number1> "this should be the same as the one you filled in table i_poitem-po_item
i_poitemx-quantity = 'X'.
APPEND i_poitem.
APPEND i_poitemx.
i_poitem-po_item = <item_number2>
i_poitem-quantity = <item_quantity>
i_poitemx-po_item = <item_number2> "this should be the same as the one you filled in table i_poitem-po_item
i_poitemx-quantity = 'X'.
APPEND i_poitem.
APPEND i_poitemx.
i_poitem-po_item = <item_number3>
i_poitem-quantity = <item_quantity>
i_poitemx-po_item = <item_number3> "this should be the same as the one you filled in table i_poitem-po_item
i_poitemx-quantity = 'X'.
APPEND i_poitem.
APPEND i_poitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = po_number "purchase order
TABLES
RETURN = itab_return
POITEM = i_poitem
POITEMX = i_poitemx.
Hope it helps.
Regards,
Ling
‎2008 Jun 14 10:24 AM
‎2008 Jun 15 12:41 AM