BAPI_PO_CREATE1 Condition pricing problem

Hi Experts,
I  created the PO through BAPI_PO_CREAE1 according to the below code. In that PO which i created default  condition type "PBXX".But i want condition Type "PB00".so in my BAPI condtion table POCOND i gave  "U" [ POCOND-change_id = 'U' (update) ].But the default "PBXX" is again coming.
when i give POCOND-change_id = 'I'  (insert)  two condition types are coming(PB00 & PBXX).
I referred  our forum(sdn) throughly.I won't get solution.
  data: del_date type sy-datum.
data: ORDER_HEADERS_OUT like BAPISDHD OCCURS 0 WITH HEADER LINE.
data: ORDER_ITEMS_OUT like BAPISDIT OCCURS 0 WITH HEADER LINE.
data: ORDER_SCHEDULES_OUT like BAPISDHEDU OCCURS 0 WITH HEADER LINE.
data: ORDER_PARTNERS_OUT like BAPISDPART OCCURS 0 WITH HEADER LINE.
data: ORDER_COND_HEAD like BAPICONDHD OCCURS 0 WITH HEADER LINE.
data: ORDER_COND_ITEM like BAPICONDIT OCCURS 0 WITH HEADER LINE.
data: ORDER_TEXTHEADERS_OUT like BAPISDTEHD OCCURS 0 WITH HEADER LINE.
datA: ORDER_TEXTLINES_OUT like BAPITEXTLI OCCURS 0 WITH HEADER LINE.
data: I_BAPI_VIEW like ORDER_VIEW OCCURS 0 WITH HEADER LINE.
  data: pohead  type bapimepoheader.
  data: poheadx type bapimepoheaderx.
  data: exp_head type bapimepoheader.
  data: return  type table of bapiret2 with header line.
  data: poitem  type table of bapimepoitem with header line.
  data: poitemx type table of bapimepoitemx with header line.
  data: posched  type table of bapimeposchedule with header line.
  data: poschedx type table of bapimeposchedulx with header line.
data : POTEXTHEADER type table of BAPIMEPOTEXTHEADER with header line .
data: POTEXTITEM type table of BAPIMEPOTEXT with header line.
*data: POTEXTITEMx type table of BAPIMEPOTEXTx with header line.
DATA: POCOND TYPE table of BAPIMEPOCOND with header line.
DATA: POCONDX TYPE TABLE OF BAPIMEPOCONDX WITH HEADER LINE.
  data: ex_po_number type bapimepoheader-po_number.
data: itno type i.
i_bapi_view-HEADER = 'X'.
i_bapi_view-ITEM = 'X'.
i_bapi_view-SDSCHEDULE = 'X'.
i_bapi_view-PARTNER = 'X'.
i_bapi_view-SDCOND = 'X'.
i_bapi_view-SDCOND_ADD = 'X'.
i_bapi_view-TEXT = 'X'.
*i_bapi_view- = 'X'.
APPEND I_BAPI_VIEW.
DATA: SONO LIKE SALES_KEY OCCURS 0 WITH HEADER LINE..
SONO-VBELN = '0001014145'.
APPEND SONO.
CALL FUNCTION 'BAPISDORDER_GETDETAILEDLIST'
  EXPORTING
    i_bapi_view                   = I_BAPI_VIEW
  I_MEMORY_READ                 =
  tables
    sales_documents               = SONO
   ORDER_HEADERS_OUT             =  ORDER_HEADERS_OUT
   ORDER_ITEMS_OUT               =   ORDER_ITEMS_OUT
   ORDER_SCHEDULES_OUT           =  ORDER_SCHEDULES_OUT
  ORDER_BUSINESS_OUT            =
   ORDER_PARTNERS_OUT            =   ORDER_PARTNERS_OUT
  ORDER_ADDRESS_OUT             =
  ORDER_STATUSHEADERS_OUT       =
  ORDER_STATUSITEMS_OUT         =
  ORDER_CONDITIONS_OUT          =
   ORDER_COND_HEAD               =  ORDER_COND_HEAD
   ORDER_COND_ITEM               = ORDER_COND_ITEM
  ORDER_COND_QTY_SCALE          =
  ORDER_COND_VAL_SCALE          =
  ORDER_CONTRACTS_OUT           =
   ORDER_TEXTHEADERS_OUT         = ORDER_TEXTHEADERS_OUT
   ORDER_TEXTLINES_OUT           = ORDER_TEXTLINES_OUT
BREAK-POINT.
  pohead-comp_code = 'SG20'.
  pohead-doc_type   = 'NB'     .
  pohead-creat_date = sy-datum   .
  pohead-vendor = '0000100040'.
  pohead-purch_org = 'SG20'.
  pohead-pur_group = '001'.
  pohead-langu      = sy-langu   .
  pohead-doc_date   = sy-datum.
  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.
*POTEXTITEM-PO_ITEM = itno.
*POTEXTITEM-TEXT_ID =
*POTEXTITEM-TEXT_FORM
POTEXTHEADER-TEXT_LINE = SONO.
append POTEXTHEADER.
Item Level Data
itno = 10.
loop at   ORDER_ITEMS_OUT.
  poitem-po_item  = itno.
  poitem-material = ORDER_ITEMS_OUT-material.
  poitem-plant    = 'SG20'.
  poitem-stge_loc = 'SA01'.
  poitem-quantity = ORDER_ITEMS_OUT-REQ_QTY .
  POITEM-NET_PRICE = ORDER_ITEMS_OUT-NET_PRICE.
  append poitem.
  poitemx-po_item    = itno.
  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-NET_PRICE = C_X.
  append poitemx.
POTEXTITEM-PO_NUMBER =
POTEXTITEM-PO_ITEM = itno.
POTEXTITEM-TEXT_ID = 'F01'.
*POTEXTITEM-TEXT_FORM
POTEXTITEM-TEXT_LINE = SONO.
append POTEXTITEM.
POCOND-itm_number = ITNO.
POCOND-cond_st_no = '001'.
POCOND-COND_COUNT = '01'.
POCOND-cond_type = 'PB00'.
POCOND-cond_value = ORDER_ITEMS_OUT-REQ_QTY.
POCOND-currency = ORDER_ITEMS_OUT-CURRENCY.
POCOND-CONDISACTI = ' '.
POCOND-COND_UPDAT = 'X'.
POCOND-change_id = 'U'.
APPEND pocond.
POCONDX-itm_number = ITNO.
POCONDX-cond_st_no = '001'.
POCONDX-cond_st_nox = 'X'.
POCONDX-itm_numberx = 'X'.
POCONDX-COND_COUNT = 'X'.
POCONDX-cond_type = 'X'.
POCONDX-cond_value = 'X'.
POCONDX-currency = 'X'.
POCONDX-CONDISACTI =  'X'.
POCONDX-change_id = 'X'.
POCONDX-COND_UPDAT = 'X'.
APPEND POCONDX.
  itno = itno + 10.
endloop.
  call function 'BAPI_PO_CREATE1'
       EXPORTING
            poheader         = pohead
            poheaderx        = poheadx
            testrun          = ' '
       IMPORTING
            exppurchaseorder = ex_po_number
            expheader        = exp_head
       TABLES
            return           = return
            poitem           = poitem
            poitemx          = poitemx
            poschedule       = posched
            poschedulex      = poschedx
   POTEXTHEADER                 = POTEXTHEADER
   POTEXTITEM   = POTEXTITEM
POCOND                       = POCOND
    POCONDX                     = POCONDX .
  call function 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
            wait = 'X'.
  if not ex_po_number is initial.
    call function 'DEQUEUE_ALL'.
  else.
    call function 'DEQUEUE_ALL'.
   message i036.
  endif.
  WRITE: / EX_PO_NUMBER.

Hi Vioth,
      Did you got solution for thsi i am also facing the same problem.If you konw the solution kindly suggest the solution for this
Thanks in Adavce,
Regards...............Kishore

Similar Messages

  • Condition Period Problem in Sales order -  Need help

    Hi Gurus
    I am testing Sales Order back dated
    Condition period Problem in Sales order
    example for you to understand
    Sales Order where PO date is 17.12.2007
    Del Date & Price date is 13.02.2008
    Then it is not calculating IN: A/R BED %IN A/R BED totalN A/R CESS [1621]
    But if i do it after 14 feb 2008 then it is calculating IN: A/R BED %IN A/R BED totalN A/R CESS [1621]
    When I do it with current date it is calculating IN: A/R BED %IN A/R BED totalN A/R CESS [1621] say date is 9-5-2008
    I am not able to trace out problem, kindly help me from where I do I check and why this is happening.
    Rajesh Chalke

    Hi,
    I am not sure if this solves your problem, but I am suspecting that this might be due to the 'valid on date' of the condition records created for the relevant duty condition types.
    Since it was a recent regulation and VK11 usually defaults current date as the valid date, that condition record may have been valid only from the recent date on which it was created.
    Check the date in VK12 (To find the exact selection parameters, check the pricing analysis in the sales order which will display the exact condition record which is being selected as of current date.) Check for the same parameters; change the date to relevant date in the past and recreate the sales order. Hopefully this should solve the issue.
    Cheers,
    KC

  • PO to SO IDoc change (ORDCHG) - Extra condition pricing line generated. Why?

    Hi guys,
    My ECC6 system currently has an IDoc automation setup where creation/change of Purch Order will also trigger creation/change of Sales Order.
    By default, condition pricing type will be PB00 or PBXX. I have implemented some code in EXIT_SAPLVEDB_001 to modify PBXX to ZP10.
    This is done by modifying KSCHL in condition table DXKOMV in idoc segment E1EDP05.
    What i want to achieve is when any current value is changed in the PO for PBXX, this new value should also reflect in ZP10 in the corresponding SO.
    This is the problem i am currently facing:
    1. First time change PBXX value in PO, ZP10 value in SO is changed correctly.
    2. Second time changing the same PBXX line item value in the same PO, a brand new ZP10 line is generated in SO with the new value. The existing ZP10 line remains with old value and becomes inactive.
    Is this normal behaviour? How do i ensure that a new ZP10 line does not get generated in the SO but is only being updated when there is an update in the PO?
    Please help. Any input would be greatly appreciated.
    Thanks in advance!

    Hi Vioth,
          Did you got solution for thsi i am also facing the same problem.If you konw the solution kindly suggest the solution for this
    Thanks in Adavce,
    Regards...............Kishore

  • Pricing problem with value based free goods!

    Hi All,
    I've got a pricing problem.....
    Can anyone can come out with a solution.
    Here is the Business Scenario....
    In a super market pricing...should be implemented in such a way that....if the customer purchases any material(all materials) for $1000 he should be given  a materisl XXX one unit free (free goods)
    How to implement this in SD R/3 Scenario...
    i have tried out with Free goods...n pricing...but was not able to implement it..can any one of you suggest me a solution for this plz..
    Regards,
    Pavan.

    Hi Pavan,
    I would suggest that you post this message in the mySAP ERP business suite solution application forum. Here is the navigation info:
    Welcome to the SAP Forums » SAP Solutions » Enterprise Resource Planning (ERP) . It is more likely that someone from the SD slide will be reading that forum than this "SAP NetWeaver integration with my SAP ERP" forum. 
    I hope this helps,
    Mike.

  • In PO condition pricing date

    Dear experts
    How to change manually condition pricing date in PO item level
    regards
    vijju

    Hi,
    You will have to check in the cusotmizing: "Define screen layout at document level" for the PO. There you should check for all the filed selection keys involved the:
    Selection group      Quantity and Price
    In order to check which filed selection keys are involved, you can use the function MEX_FELDAUSWAHL. You can check the note 30316 for more details.
    Best Regards,
    Arminda Jack

  • Condition Pricing Date is Diff. from PO Creation date

    Hi,
    We have created a PO 1100041212 on dtd. 05.05.2011.
    In PO Conditions tab, i have a field in the detail view ' Condition Pricing Date'. For Condition type P001, it is not showing the PO date. (mostly cases has the same date of PO Creation date)
    Condition Pricing Date showing is 30.01.2011. Why???
    Plz guide..from where these date is picking...

    Dear Anil,
    Yes, Info Record can exist and can be created without material number, This can be done in combination with vendor and Purchase Org. I suggest create this info record manually and then create PO and in PO check if the "Info Update" indicator is set or not. Info update record should be set in both quotation and in PO.
    Info record can be manually created using following menu path:
    SAP Menu -> Logistics -> Materials Management -> Purchasing -> Master Data -> Info Record -> Create
    Regards,
    Ahmad Farhan Khalid

  • Which table stores Condition Pricing Date

    Dear SDN experts,
    Would like you to tell me which table stores Condition Pricing Date field (Sale Order Item)?
    Thanks,
    Khanh

    Pass VBAK-KNUMV  to KONV-KNUMV and you will get the item pricing conditions.
    the condition pricing date is stored in field KONV-KDATU
    Edited by: ksd on Dec 10, 2009 12:33 PM

  • PO prices and condition pricing date copied from previous PO using ME21N

    We have defined a default for buyers with the TAB Price Adoption - "copying of conditions from last purchase order" set to Do Not Copy. We have assigned this default via parameter EVO to all of our buyers. When creating a purchase order using transaction ME21N and creating based upon previous purchase order all of the previous purchase order pricing and the condition pricing date is copied over. Isn't this what the parameter is supposed to prevent?
    Any suggestions are appreciated.
    Brian

    No, copiing a complete PO is something different than creating a new PO where the price is usually taken from last PO if no price conditions are maintained in an info record.
    You prevent only the second case with EVO parameter.

  • PO - Change Condition pricing date

    Can we change Condition pricing date in PO.If Yes , then How??
    Thanx,
    Viru

    Dear Viru,
    You can change the price date at the condition control tab. However, you still need to press
    the update button from the condition tab to update the condition price follow the price date
    that you had changed.
    Best Regards,
    Ian Wong

  • BAPI or FM for Condition Pricing

    Hi All
    I need to develop a report that shows all the condition pricing (SD).
    It is necessary to show the same fields of the pricing screen (VA03) -  it would be a kind of simulation.
    I would like some function that gives me a report similar to the screen of pricing condition - transaction VA03 - SD module.
    I am trying to use the BAPI  BAPI_SALESORDER_SIMULATE, but I am  getting only the aliquots of the taxes.
    I am using 4.7.
    Could you please advise?
    Thanks in advance.
    João Gaia

    Hi,
    Bapi for creating Pricing conditions is BAPI_PRICES_CONDITIONS.
    In this u need to pass value to the below parameters:
    bapicondhd-table_no
    operation
    applicatio
    cond_type
    or
    It seems the RV_CONDITION* function modules only supports to change or create a new price condition by copying an existing one.
    else use
    BDC.
    I think, It helpful to you.

  • Dump error in condition pricing unit

    hi all
    when iam clicking on utilization tab in excise invoice for the bond export its going to dump
    and the reason for this is condition pricing unitcan any one suggest on this
    regards
    sridhar

    Hi,
    Check with the unit of measure maintained for the material and your condition record, then in sales order. Otherwise just ask your abaper to work on the dump error they will be able to help you out.
    Regards,
    Sudhir

  • Issue regarding condition pricing date as system date for some condition types in sales order

    Hi
    I have already created a sales order on 30.04.2014. Today I am adding new line item to sales order in VA02 transaction. in this order new line items condition pricing date for conditions JEX2,JECX should show as 12.06.2014. But currently it is showing as 30.04.2014. I need condition pricing date as system date for above conditions.
    Regards
    prashant

    Hi
    When I am changing pricing date VBKD-PRSDT in sales order header . It is changing the condition pricing date for all. Sales order is created on 04.06.2014. I have added line item 150 on 14.06.2014.
    After adding line item 150 , there I have changed the pricing date as 14.06.2014. in sales A tab of item 150. But still it is taking from Sales order header date as 04.06.2014 for all conditions. But my requirement is for line item it should take as system date for some conditions like JEX2,JECX& JA1Y but for other conditions it will take as Order creation date. Please suggest. I have also attached screen shot below. please go through it.
    Regards
    PK
    Sales order header change mode VA02
    Here pricing date VBKD-PRSDT = 04.06.2016
    Item change mode
    I have added new line item 150 on 14.06.2014
    Changed the condition pricing date to 14.06.2014 & saved
    After saving I have gone to Va02 screen of line item 150
    & there I have gone to condition pricing date field from item condition tab
    for JEX2 condition type but still here condition pricing date is showing as
    04.06.2014 as below.
    Condition pricing date
    My requirement is like this
    For some particular conditions like JEX2  condition pricing date will take as system
    date instead sales order creation date when I will add a new item 150 on
    14.06.2014.but for other conditions it will show as order creation date for the
    same line item 150 .

  • Vk11 condition pricing upload

    Hi
    can anybody say any scenario about condition pricing upload (vk11 transaction) using bdc

    It is not advicable to create BDC for transactions like VK11, MEK1 ... which we use to create condition records. The reason is for each condition type, the options we see might vary when ever there is change in access sequences and their precedence. So if we create BDC, our program needs to modified everytime there is change in the access sequences and condition tables.
    I would recommed you to either use the program that i have provided or use some BAPI's to upload/change condition records.
    As you are saying, you have the data in your internal table. Download the data to a file in the format RV14BTCI needs and SUBMIT the program.
    For understanding on the structure for this program, use transaction SXDB.
    Use BAPI Function module - BAPI_PRICES_CONDITIONS
    Reward Points if it is useful
    Thanks
    Seshu

  • Problem in conditions pricing updation using BAPI_PO_CREATE1

    hi,
        I am creating PO using BAPI_PO_CREATE1 however when i am passing the data to the bapi for conditions at item level the price value is not changing and throwing error as ( NET PRICE FOR ITEM 00010 adopted from last document ) so for all the items its throwing the same information and when i am chekin the PO the value is not the changing. and while creating the PO manually also the net price is coming automatically and we need to backspace the value and re enter the new value. So wht should i do in order to input the data into the PO.
    Thanks in advance

    Thanks

  • Pricing Condition Type Problem !!

    HI
    Pricing condition for CVD was maintained as fixed value(calculation Type) originally. Client wanted it to be percentage basis. I changed it to % basis. It was wrking fine. But today again when a PO was made for same material .... the CVD was coming as fixed value and not % basis. Checked the M/06 conditions for CVD its still % calculation type. material price was picked from info record. all was done on dev server.
    can any one guide why itshappening like this
    Thank you

    Hi,
    CVD condition type is usually maintained as %age basis only.
    the info record will store the the last PO history. if the combination of material, vendor is found , the access sequence will pick the condition record.
    keep the same material and try will another vendor , this will not happen the system will pick the %age basis only.
    check your info record?
    check what you have maintained in MEKI for the condition type for CVD.
    regards
    Rajesh

Maybe you are looking for

  • Purchase order field EKPO - AFNAM displayed in any standard report?

    Hello gurus, I can't find any standard report which contains in the layout the field Requisitioner (EKPO-AFNAM) of the Purchase Orders. Can you please advise if there is any? Do I need to make a query between EKKO and EKPO to get this field displayed

  • A problem with initiating a BPEL process through its web service interface

    hi, i am trying to initiate the helloWorld BPEL process through its web service interface. i use a proxy class that i wrote and i use it from J#.net. this is the relevant code part: hello.HelloWorldBinding wsProxy = new hello.HelloWorldBinding(); wsP

  • Help on standard deviation please

    I am writing a program to find standard deviation. Below is what I have so far "not much I know" but I have tried so don't get flame happy. It errors out and I have tried to fix it. I know the formula for standard deviaition but I can't seem to progr

  • Setting classpath in Process object

    Anybody run into this before? I am trying to call the OracleXML utility on Windows using the Runtime to get a process object. When I pass my classpath to the Process object, somebody is changing the period in the file name (eg. classes12.zip) to a fo

  • Launch iChat at log in.....

    hello. I set my iChat to launch when I log into my computer, and now i can't find where to turn that feature off. Can someone help? thanks. alex