Skip to Content
1
Former Member
Nov 18, 2010 at 08:31 AM

BAPI_PO_CREATE1 didn't create Condition Type NAVS

214 Views

Dear experts:

I'm facing a weird question. When I create PO thorugh BAPI_PO_CREATE1,

the PO can be created. But it didn't create condition type NAVS for Non-Deductible Tax automatically.

when I create PO manually, the condition NAVS was create automatically.

I think the result for me to create PO by BAPI and create manually should be the same,

but I couldn't find the problem which cause the difference.

I also try to pass calculation type with 'A' or 'B' or 'C', but it didn't work either.

The POs created by BAPI_PO_CREATE1 still got no condition type NAVS.

hope you can help me solve this problem, thanks a lot.

below is part of my code:

===============================================================

**Condition
    move it_po-po_item to it_pocond-itm_number .
    it_pocond-cond_type = 'PBXX'.
    move it_po-net_price    to it_pocond-cond_value .
    move it_po-currency     to it_pocond-currency .
    move it_po-price_unit   to it_pocond-cond_p_unt .
    move 'U'                to it_pocond-change_id .

    move: it_po-po_item to it_pocondx-itm_number ,
          'X' to it_pocondx-cond_type ,
          'X' to it_pocondx-cond_value ,
          'X' to it_pocondx-currency ,
          'X' to it_pocondx-cond_p_unt ,
          'X' to it_pocondx-change_id .
    append: it_pocond , it_pocondx .
    clear: it_pocond , it_pocondx .

......skip 

call function 'BAPI_PO_CREATE1'
    EXPORTING
      poheader         = wa_header
      poheaderx        = wa_poheaderx
    IMPORTING
      exppurchaseorder = i_ebeln
    TABLES
      return           = it_return
      poitem           = it_item
      poitemx          = it_itemx
      poaccount        = it_poaccount
      poaccountx       = it_poaccountx
      poschedule       = it_schedule
      poschedulex      = it_schedulex
      pocond           = it_pocond
      pocondx          = it_pocondx.

Edited by: kishan P on Nov 18, 2010 2:07 PM