<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: insert po conditions using bapi_po_create1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488728#M1557099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ttable3-operation = '009'.
ttable3-cond_no = '$000000001'.
ttable3-cond_count = '01'.
ttable3-applicatio = 'V'.
ttable3-cond_type = 'ZPR0'.
ttable3-scaletype = 'A'.
ttable3-scalebasin = 'C'.
ttable3-scale_qty = '1'.
ttable3-cond_p_unt = '1'.
ttable3-cond_unit = 'EA'.
ttable3-calctypcon = 'C'.
ttable3-cond_value = '444'.
ttable3-condcurr = 'USD'.
 
APPEND ttable3 TO table3.
 
 
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'

TABLES
ti_bapicondct = table1
ti_bapicondhd = table2
ti_bapicondit = table3
ti_bapicondqs = table4
ti_bapicondvs = table5
to_bapiret2 = table6
to_bapiknumhs = table7
to_mem_initial = table8
EXCEPTIONS
update_error = 1
OTHERS = 2
.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Dec 2010 12:37:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-03T12:37:37Z</dc:date>
    <item>
      <title>insert po conditions using bapi_po_create1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488725#M1557096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts , I am passing condition data to bapi_po_create1 , but conditions are not getting updated , my po is getting created successfully in held status , some condition types are coming automatically from pricing procedure , but the contion I am giving thru bapi are not coming in PO&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am passing data like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;header conditions&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          ls_cheader-cond_type = 'PBXX'.&lt;/P&gt;&lt;P&gt;          ls_cheader-cond_st_no = '001'.&lt;/P&gt;&lt;P&gt;          ls_cheaderx-cond_st_no = '001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ls_cheader-ITM_NUMBER   = '00000'.&lt;/P&gt;&lt;P&gt;      ls_cheader-cond_value = zcond_wa-cond_rate.&lt;/P&gt;&lt;P&gt;      ls_cheader-currency   = zcond_wa-cond_curr.&lt;/P&gt;&lt;P&gt;      ls_cheader-cond_unit  = zcond_wa-cond_unit.&lt;/P&gt;&lt;P&gt;      ls_cheader-cond_p_unt = zcond_wa-cond_prc_unit.&lt;/P&gt;&lt;P&gt;      ls_cheader-CHANGE_ID  = 'U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ls_cheaderx-ITM_NUMBER   = '00000'.&lt;/P&gt;&lt;P&gt;      ls_cheaderx-cond_type  = 'X'.&lt;/P&gt;&lt;P&gt;      ls_cheaderx-cond_value = 'X'.&lt;/P&gt;&lt;P&gt;      ls_cheaderx-currency   = 'X'.&lt;/P&gt;&lt;P&gt;      ls_cheaderx-CHANGE_ID  = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;item conditions&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          ls_citem-cond_type = 'PBXX'.&lt;/P&gt;&lt;P&gt;          ls_citem-cond_st_no = '001'.&lt;/P&gt;&lt;P&gt;          ls_citemX-cond_st_no = '001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ls_citem-itm_number     = zitems_wa-number_int+5(5) * 10.&lt;/P&gt;&lt;P&gt;        ls_citem-calctypcon     = ' ' ..&lt;/P&gt;&lt;P&gt;        ls_citem-cond_value = zcond_wa-cond_rate .&lt;/P&gt;&lt;P&gt;        ls_citem-conbaseval = ls_citem-cond_value .&lt;/P&gt;&lt;P&gt;        ls_citem-currenckey     = zcond_wa-cond_curr .&lt;/P&gt;&lt;P&gt;        ls_citem-change_id      = 'U' .&lt;/P&gt;&lt;P&gt;        ls_citem-calctypcon = 'A' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ls_citemx-itm_number     = zitems_wa-number_int+5(5) * 10.&lt;/P&gt;&lt;P&gt;        ls_citemx-cond_type      = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citemx-cond_value     = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citemx-currency       = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citemx-currency_iso   = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citemx-factbasval     = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citemx-scalbasval     = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citemx-change_id      = 'X' .&lt;/P&gt;&lt;P&gt;        ls_citem-calctypcon      = 'X'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 05:51:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488725#M1557096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T05:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: insert po conditions using bapi_po_create1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488726#M1557097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Check the values you are passing to "ls_citem-calctypcon" while populating items ... .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;item conditions&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ls_citem-cond_type = 'PBXX'.&lt;/P&gt;&lt;P&gt;ls_citem-cond_st_no = '001'.&lt;/P&gt;&lt;P&gt;ls_citemX-cond_st_no = '001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_citem-itm_number = zitems_wa-number_int+5(5) * 10.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ls_citem-calctypcon = ' ' ..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ls_citem-cond_value = zcond_wa-cond_rate .&lt;/P&gt;&lt;P&gt;ls_citem-conbaseval = ls_citem-cond_value .&lt;/P&gt;&lt;P&gt;ls_citem-currenckey = zcond_wa-cond_curr .&lt;/P&gt;&lt;P&gt;ls_citem-change_id = 'U' .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ls_citem-calctypcon = 'A' .&lt;/STRONG&gt;    &amp;lt;-- this will be overwritten by the below statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ls_citemx-itm_number = zitems_wa-number_int+5(5) * 10.&lt;/P&gt;&lt;P&gt;ls_citemx-cond_type = 'X' .&lt;/P&gt;&lt;P&gt;ls_citemx-cond_value = 'X' .&lt;/P&gt;&lt;P&gt;ls_citemx-currency = 'X' .&lt;/P&gt;&lt;P&gt;ls_citemx-currency_iso = 'X' .&lt;/P&gt;&lt;P&gt;ls_citemx-factbasval = 'X' .&lt;/P&gt;&lt;P&gt;ls_citemx-scalbasval = 'X' .&lt;/P&gt;&lt;P&gt;ls_citemx-change_id = 'X' .&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ls_citem-calctypcon = 'X'.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 05:59:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488726#M1557097</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T05:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: insert po conditions using bapi_po_create1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488727#M1557098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srini , thanks for reply now I am getting conditions in my PO but it is inconsistant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like I am getting two line items in condition tab for condition type PBXX &lt;/P&gt;&lt;P&gt;on what basis I should pass value in   &lt;STRONG&gt;ls_citem-calctypcon.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;I am getting wrong net price and condition value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 11:25:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488727#M1557098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T11:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: insert po conditions using bapi_po_create1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488728#M1557099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ttable3-operation = '009'.
ttable3-cond_no = '$000000001'.
ttable3-cond_count = '01'.
ttable3-applicatio = 'V'.
ttable3-cond_type = 'ZPR0'.
ttable3-scaletype = 'A'.
ttable3-scalebasin = 'C'.
ttable3-scale_qty = '1'.
ttable3-cond_p_unt = '1'.
ttable3-cond_unit = 'EA'.
ttable3-calctypcon = 'C'.
ttable3-cond_value = '444'.
ttable3-condcurr = 'USD'.
 
APPEND ttable3 TO table3.
 
 
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'

TABLES
ti_bapicondct = table1
ti_bapicondhd = table2
ti_bapicondit = table3
ti_bapicondqs = table4
ti_bapicondvs = table5
to_bapiret2 = table6
to_bapiknumhs = table7
to_mem_initial = table8
EXCEPTIONS
update_error = 1
OTHERS = 2
.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 12:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488728#M1557099</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-03T12:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: insert po conditions using bapi_po_create1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488729#M1557100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;problem solved , actually for PBXXX I have to pass change indicatoter as U , thank you all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 07:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488729#M1557100</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-08T07:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: insert po conditions using bapi_po_create1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488730#M1557101</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;I have also faced the same issue resolved with Below Code :


*----------------------------------------------------------------------*
* Header Level Data
*----------------------------------------------------------------------*
  pohead-comp_code   = gt_po_header-co_code.
  pohead-doc_type    = gt_po_header-doc_type.
  pohead-creat_date  = sy-datum.
  pohead-vendor      = gt_po_header-vendor.
  pohead-purch_org   = gt_po_header-purch_org.
  pohead-pur_group   = gt_po_header-pur_group.
  pohead-langu       = sy-langu.
  pohead-doc_date    = sy-datum.
  pohead-pmnttrms    = gt_po_header-pmnttrms.
  poheadx-comp_code  = c_x.
  poheadx-doc_type   = c_x.
  poheadx-creat_date = c_x.
  poheadx-vendor     = c_x.
  poheadx-langu      = c_x.
  poheadx-purch_org  = c_x.
  poheadx-pur_group  = c_x.
  poheadx-doc_date   = c_x.
  poheadx-pmnttrms   = c_x.

*----------------------------------------------------------------------*
* Item Data
*----------------------------------------------------------------------*
  item_no         = gt_po_items-po_item.
  poitem-po_item  = item_no.
  poitem-material = gt_po_items-material.
  poitem-plant    = gt_po_items-plant.
  poitem-stge_loc = gt_po_items-store_loc.
  poitem-quantity = gt_po_items-quantity.
  poitem-tax_code = gt_po_items-tax_code.
  poitem-preq_no  = gt_po_items-preq_no.
  poitem-preq_item = gt_po_items-preq_item.
  APPEND poitem.

  poitemx-po_item    = item_no.
  poitemx-po_itemx   = c_x.
  poitemx-material   = c_x.
  poitemx-plant      = c_x .
  poitemx-stge_loc   = c_x .
  poitemx-quantity   = c_x .
  poitemx-tax_code   = c_x .
  poitemx-item_cat   = c_x .
  poitemx-acctasscat = c_x .
  poitemx-preq_no    = c_x .
  poitemx-preq_item  = c_x .
  APPEND poitemx.

*----------------------------------------------------------------------*
* Schedule Line Level Data
*----------------------------------------------------------------------*
  posched-po_item        = item_no.
  posched-sched_line     = 1 . "gt_po_item_schedules-s
  posched-del_datcat_ext = gt_po_item_schedules-del_datcat_ext. " 'D'.
  del_date = sy-datum + 1.
  WRITE del_date TO posched-delivery_date.
  posched-deliv_time     = '000001'.
  posched-quantity       = gt_po_items-quantity.
  APPEND posched.

  poschedx-po_item        = item_no.
  poschedx-sched_line     = 1.
  poschedx-po_itemx       = c_x.
  poschedx-sched_linex    = c_x.
  poschedx-del_datcat_ext = c_x.
  poschedx-delivery_date  = c_x.
  poschedx-quantity       = c_x.
  APPEND poschedx.

*----------------------------------------------------------------------*
* Account Assignment
*----------------------------------------------------------------------*
  wa_account-po_item    = item_no.
  wa_account-gl_account = gt_po_item_account_assignment-g_l_acct.
  APPEND wa_account TO it_account.

  wa_accountx-po_item    = item_no.
  wa_accountx-gl_account = 'X'.
  APPEND wa_accountx TO it_accountx.

*----------------------------------------------------------------------*
* Condition Records
*----------------------------------------------------------------------*
  wa_pocond-itm_number   = item_no.
  wa_pocond-cond_st_no   = '001'.
  wa_pocond-cond_type    = 'PB00'.
  wa_pocond-cond_value   = '100.00'.
  wa_pocond-conbaseval   = '100.00'.
  wa_pocond-change_id    = 'U'.
  wa_pocond-calctypcon   = 'A'.
  wa_pocond-currency     = gt_po_header-currency.
  wa_pocond-currenckey   = gt_po_header-currency.
  wa_pocond-currency_iso = gt_po_header-currency.
  APPEND wa_pocond TO it_pocond.

  wa_pocondx-itm_number  = item_no.
  wa_pocondx-itm_numberx = 'X'.
  wa_pocondx-cond_st_no  = '001'.
  wa_pocondx-cond_st_nox = 'X'.
  wa_pocondx-cond_type   = 'X'.
  wa_pocondx-cond_value  = 'X'.
  wa_pocondx-conbaseval  = 'X'.
  wa_pocondx-change_id   = 'X'.
  wa_pocondx-calctypcon  = 'X'.
  wa_pocondx-currency    = 'X'.
  wa_pocondx-currenckey  = 'X'.
  wa_pocondx-currency_iso = 'X'.
  APPEND wa_pocondx TO it_pocondx.

  CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
      poheader         = pohead
      poheaderx        = poheadx
      testrun          = ' '
      no_price_from_po = 'X'
    IMPORTING
      exppurchaseorder = ex_po_number
      expheader        = exp_head
    TABLES
      return           = return
      poitem           = poitem
      poitemx          = poitemx
      poschedule       = posched
      poschedulex      = poschedx
      pocond           = it_pocond
      pocondx          = it_pocondx
      poaccount        = it_account
      poaccountx       = it_accountx.

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jan 2020 04:45:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-po-conditions-using-bapi-po-create1/m-p/7488730#M1557101</guid>
      <dc:creator>former_member571357</dc:creator>
      <dc:date>2020-01-17T04:45:28Z</dc:date>
    </item>
  </channel>
</rss>

