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

How to insert new service condition in PO using BAPI_PO_CHANGE?

Hi all,

I'm trying to insert a new condition under a service line in a PO. This can be seen in ME23N under the services tab of the PO item. Then click on conditions (the button with the dollar and yen symbol).

I tried using the internal table POCOND and POCONDX. But these tables update the conditions of the PO item itself and not the service conditions. In ME23N this is the conditions tab of the PO item.

  • build condition item table

wa_conditem-change_id = 'I'.

wa_conditem-itm_number = wa_items-po_item.

wa_conditem-cond_type = c_condtypz.

wa_conditem-cond_value = l_plndisamt.

wa_conditem-currency = l_poheader-currency.

APPEND wa_conditem TO it_conditem.

CLEAR wa_conditem.

  • build condition item change parameter table.

wa_conditemx-itm_number = wa_items-po_item.

wa_conditemx-itm_numberx = 'X'.

wa_conditemx-cond_type = 'X'.

wa_conditemx-cond_value = 'X'.

wa_conditemx-currency = 'X'.

wa_conditemx-change_id = 'X'.

APPEND wa_conditemx TO it_conditemx.

CLEAR wa_conditemx.



purchaseorder = wa_ekpo_u-ebeln


return = it_return

poitem = it_poitem

poitemx = it_poitemx

pocond = it_conditem

pocondx = it_conditemx



I tried using the internal tables POCONDHEADER and POCONDHEADERX but this doesn't seem to insert anything.

Can anyone guide me how to insert a new service condition?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 16, 2011 at 12:24 AM

    Maybe there is another BAPI to do this?

    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.