Skip to Content
author's profile photo Former Member
Former Member

How to Change/delete service line items from service PO usingBAPI_PO_CHANGE

Hello Gurus

Can anyone tell me how to delete and change service line items from service PO using bapi BAPI_PO_CHANGE.

PLs required urgently...

Regards ,

Vikram.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 04:42 AM

    Hi,

    You can delete the PO line items...But I am not sure how you delete the Purchase order itself..

    Check this sample of how to delete the line item using the BAPI..

    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-delete_ind = 'X'.

    APPEND t_item.

    t_itemx-po_item = p_ebelp.

    t_itemx-po_itemx = 'X'.

    t_itemx-delete_ind = 'X'. "Delivery complete

    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.

    check these links:

    <u>bapi_po_change

    changing po links:

    <u>BAPI for changing components of a item in purchase order

    Regards,

    Sana M.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 05:32 AM

    Hi Sana ,

    Actually i want to change / delete service line items and not PO items.Actually this service items are associated with po items . In Bapi BAPI_PO_CHANGE , POSERVICES is the table that deals with service data....

    Pls guide me for this....

    Thanking You .

    Regards ,

    Vikram

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.