Setting a pricing Condition through a BAPI

Hi,
I have the following problem - I am trying to set a condition on an item in a quotation using the BAPI_CUSTOMERQUOTATION_CHANGE. The error that I get back is "Requirements are not fulfilled for condition PN00".
When I try to set the condition manually through VA22, I can set it without any problems. Through the transaction V/08 I can also see that the requirement has been set to "2" (Item with pricing).
Does anyone have any idea what the problem could be? What really stumps me is that using the GUI, I can set this condition without problems. It is only through the BAPI that I run into this error.
I have also used the same code in another example to set conditions without problems. The only thing different in this case is that the Item where I am setting the condition is a lower level item - the item number 10 is the high level item for this position. Is it possible that this plays a role in this case?
Bye
Sameer

The parameter for the item number was being sent wrong to the R/3 system.

Similar Messages

  • Setting a price condition through a BAPI

    Hi,
    I have the following problem - I am trying to set a condition on an item in a quotation using the BAPI_CUSTOMERQUOTATION_CHANGE. The error that I get back is "Requirements are not fulfilled for condition PN00".
    When I try to set the condition manually through VA22, I can set it without any problems. Through the transaction V/08 I can also see that the requirement has been set to "2" (Item with pricing).
    Does anyone have any idea what the problem could be? What really stumps me is that using the GUI, I can set this condition without problems. It is only through the BAPI that I run into this error.
    I have also used the same code in another example to set conditions without problems. The only thing different in this case is that the Item where I am setting the condition is a lower level item - the item number 10 is the high level item for this position. Is it possible that this plays a role in this case?
    Bye
    Sameer

    Hi Mathieu,
    I am setting the flag in the HEADER_INX too, sorry I forgot to mention that
    Although I am only setting the update flag to U. I could not find any field/flag that has to do anything with conditions in the header structure.
    As I am setting the conditions on line items (positions), I fill in the QUOTATION_ITEM_IN and QUOTATION_ITEM_INX structures accordingly to update the positions.
    Could you please tell which fields you mean when you say that I need to fill something up also in the header and header_inx structures? (Other than the Update flag of course)
    Thanks,
    Sameer

  • Delete pricing conditions line using BAPI_SALESORDER_CHANGE

    Hi experts.
    I've read the forum and OSS about this topic and don't have clear if it's possible to delete a price condition position (using BAPI). Using tx. VA02 I can delete pricing conditions, that's why I think should be possible.
    We have a sales order created, and depending on the sold-to-party we have some discounts: RA00 (% discount) or RB00 (absolute discounts).
    In some cases we need to insert/update or delete these pricing conditions. For insert/update, we don't have any problem using
    BAPI_SALESORDER_CHANGE and setting the appropiate updateflag.
    But... what would be the procedure to delete a discount, for example, RA00 fixed on a sales order? Has the logic_switch be informed specially?
            wa_cond-itm_number = lt_cond-itm_number.
            wa_cond-cond_type  = lt_cond-cond_type.
            APPEND wa_cond TO i_cond.
            wa_condx-itm_number = lt_cond-itm_number.
            wa_condx-cond_type  = lt_cond-cond_type.
            wa_condx-updateflag = 'D'.
            APPEND wa_condx TO i_condx.
    Lots of thanks.
    Javier

    I am not positive on being able to delete a pricing condition through program.
    Online when you try to change the pricing, SAP suggests us to redetermines the Pricing rather than just changing the values. And also the pricing condition config also plays a role... I think there was a setting which says Pricing condition to be manual which means you can add or delete the conditoin.

  • BAPI_PO_CHANGE, Pricing condition valueis not updating

    Hi Experts,
    I need to update the one of the Pricing condition amount in PO.
    I am using BAPI_PO_CHANGE by passing PO number, POCOND
    and POCONDX.
    i need to update the pricing condition amount say from 10 to 15.
    I am passing the same in POCOND-COND_VALUE = '15.00000'
    and CHANGE_ID = 'U'.
    Please let me know the sol, Definitely points will be awarded.
    or cant we change the pricing condition value by BAPI. Please confirm.
    Thanks,
    Shaik Bhasha

    Hi,
    I believe you can use this BAPI to PO conditions..
    Check this code..
    PARAMETERS: p_ebeln LIKE ekko-ebeln.
    DATA: t_poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
    DATA: t_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
    DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: t_cond LIKE bapimepocond OCCURS 0 WITH HEADER LINE.
    DATA: t_condx LIKE bapimepocondx OCCURS 0 WITH HEADER LINE.
    t_poitem-po_item = '00010'.
    t_poitem-net_price = '17.00'.
    APPEND t_poitem.
    t_poitemx-po_item = '00010'.
    t_poitemx-net_price = 'X'.
    t_poitemx-po_itemx = 'X'.
    APPEND t_poitemx.
    t_cond-itm_number = '00010'.
    t_cond-cond_type = 'P000'.
    t_cond-cond_value = '17.00'.
    t_cond-currency = 'USD'.
    t_cond-change_id = 'U'.
    APPEND t_cond.
    t_condx-itm_number = '00010'.
    t_condx-itm_numberx = 'X'.
    t_condx-cond_type = 'X'.
    t_condx-cond_value = 'X'.
    t_condx-currency = 'X'.
    t_cond-change_id = 'X'.
    APPEND t_condx.
    CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
    purchaseorder = p_ebeln
    TABLES
    return = t_return
    poitem = t_poitem
    poitemx = t_poitemx
    pocond = t_cond
    pocondx = t_condx.
    COMMIT WORK.
    The above code works fine for me...
    Thanks,
    Naren

  • Question regarding usage of CRM pricing conditions using date ranges

    Hi,
    I wonder if someone has a suggestion regarding how to set up pricing conditions in CRM to accomplish the following scenario:
    For existing customers we want to “freeze” the product price for certain customers,
    but at the same time let other customers get another prize for the same product
    and period.
    (We have scenarios where the product price changes retroactively, years back in time, but only for those custoemrs that  fulfill a specific criteria at the time where the prize change was decided to take place..)
    We want the prize to be dependent on the customer status AND when this status was set
    (before a specific date), but there doesn’t seem to be a way to set up pricing
    conditions with date ranges (i e "customer status changed before YYYYMMDD
    renders prize X").
    Since we are talking about quite a lot of customers we do not want to add each and every
    one of them as “individual price items” in the pricing conditions tables.
    Does anyone have an idea regarding how to set this up?
    Thanks
    /Marika Wasserman

    Hi Marika,
    condition records have validity (FROM - TO). Let us assume you have a condition record for product A with 50 EUR per piece and this record is valid from 01.01.2014 until 31.12.2014.
    If you create CRM Sales Order having product A at 4.12.2014 and this date is used as pricing date for the conditon determination, then it will find this condition record with price 50 EUR per piece. This 50 EUR should be the froen price.
    Now how can you achieve that for the same CRM Sales Order another product price is determined for certain customer or a certain customer group?
    The idea is to pass an additional pricing attribute, e.g. customer group. Then you can create a new condition table with this field with the key fields product and customer group. In the access seqeunce first the new condition table is checked and if no record is found, then the second conditon table is checked as shown below:
    Access Sequence ABC
    Access 10: condition table with key fields product + customer group
    Access 20: condition table only key field product
    Instead of customer group you define also any other field. You create your own implementation of the BAdI  CRM_COND_COM_BADI that passes this field with a value to pricing.
    Best regards,
    Baris Yalcin

  • Pricing condition not geting updated

    Hi
    I'm trying to update pricing condition through BDC using TCode va42. It's working fine in quality but failing in production. What could be the reason.
    Thanks

    hi
    good
    if you are trying to update the pricing condition using the BDC recording then it may happen sometime that some your recording screens wont work proplerly in the production server so it wont take the appropriate data from the flat file.
    Please debug the code in producation to point out the field which is not working properly than you do the recording again .
    Hope this will help you to solve y our problem.
    Thanks
    mrutyun^

  • BAPI for creation of Credit Note with custom pricing condition

    I need to create a Credit Note with reference Invoice via program.  So, I am planning to use BAPI. Could you please suggest appropriate BAPI?  I need to send a pricing condition that is set manually in the credit note as well.  So, I will needto pass pricing condition and value.  Thanks.

    Hello,
    Why you have to create the credit note using BAPI w.r.t. invoice ? Can you brief the senario .
    The simple way is create a credit memo request in VA01 w.r.t. invoice number. It will have the block . Remove the block and Create credit memo in VF01 .
    Thanks
    RK

  • Header Pricing conditions in BAPI function module

    I am using BAPI function module BAPI_SALESDOCU_CREATEFROMDATA1 to create sales orders through program.
    It is working fine with item level pricing conditions.
    But my requirement is ... I need to update few pricing conditon types in item level and one in header level.
    Could you please help me where I need to pass header pricing conditions. Please help me.
            CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
              EXPORTING
                SALESDOCUMENT             = SALESDOCUMENT
                SALES_HEADER_IN           = SALES_HEADER_IN
              SALES_HEADER_INX          =
              SENDER                    =
                BINARY_RELATIONSHIPTYPE   = 'VORL'
              INT_NUMBER_ASSIGNMENT     = ' '
              IMPORTING
                SALESDOCUMENT_EX          = SALESDOCUMENT_EX
              TABLES
                RETURN                    = RETURN
                SALES_ITEMS_IN            = SALES_ITEMS_IN
              SALES_ITEMS_INX           =
                SALES_PARTNERS            = SALES_PARTNERS
                SALES_SCHEDULES_IN        = SALES_SCHEDULES_IN
              SALES_SCHEDULES_INX       =
                SALES_CONDITIONS_IN       = SALES_CONDITIONS_IN.
              SALES_CFGS_REF            =
              SALES_CFGS_INST           =
              SALES_CFGS_PART_OF        =
              SALES_CFGS_VALUE          =
              SALES_CFGS_BLOB           =
              SALES_CCARD               =
              KEY_TABLE                 =
    Thanks in advance.
    Raghu

    If the correct configuration allows for manual entry of the condition type you want to populate, You can map your value using
    ' ORDER_CONDITIONS_IN'  . If item level map line number, cond step number of the condition type in your pricing procedure, your condition type you are using,  condition value you are sending into the system,  currency, and cond unit. If it is a header condition, then send in 000000 as the item number.   You can also consider using BAPI_SALESORDER_CREATEFROMDAT2

  • How to change pricing Conditions in Sales order in change sales order bapi

    Hi Experts,
    How to change pricing Conditions in Sales order in change sales order bapi.
    I have used the 2 function modules bapi-changesalesorder and sd salesdocument change, But it is creating the new record , instead of changing the existing one, Could please assist regarding the same
    Thanks in Advance .
    NLN

    HI NLN
      I have just tried on my system and managed to overwrite the existing price by passing the following parameters.
      <b>Import Paramters:</b>
         SALESDOCUMENT - Sales Document Number
         ORDER_HEADER_INX - UPDATEFLAG as <b>'U'</b>.
         LOGIC_SWITCH - Import Structure - Pass 'X' to LOGIC_SWITCH-COND_HANDL.
      <b>Tables:</b>
         CONDITIONS_IN - ITM_NUMBER,
                         COND_COUNT, -> Condition counter same as KONV-ZAEHK generally it is <b>'01'</b>
                         COND_TYPE,
                         COND_VALUE,
                         CURRENCY.
         CONDITIONS_INX - ITM_NUMBER,
                          COND_COUNT,
                          COND_TYPE,
                          UPDATEFLAG as <b>'U'</b>,
                          CURRENCY.
       Hope i have clarified your query.
    Kind Regards
    Eswar

  • Pricing conditions for sale order create BAPI

    Hi guys and gals,
            i am workin on a object where i would have to create a variant of VA01 screen with pricing details , item details , shipping details etc, visible in  a single screen .
           What i have understood so far is that i would have to use BAPI simulate to get the pricing conditions and ATP details to display to the user before he saves the order , the issue now is when is adding new pricing conditions or changing the existing conditions on my screen i would have to update the other conditions types based on his input and i also understand that some conditions r editable and some arn't and like in regular VA01 the user should be able to delete the pricing conditions also , which means i should taken into account all this when iam finally saving this order , please guide me further in this regards
    Thanks in advance

    Hai
    Try with the following
    U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
    U can find these parameters for a particular condition type in table KONV.
    *& Form saveTransactionJOCR
    text
    --> p1 text
    <-- p2 text
    FORM saveTransactionJOCR .
    data: salesdocument like BAPIVBELN-VBELN,
    order_header_inx like bapisdh1x,
    order_header_in like bapisdh1,
    return type standard table of bapiret2 with header line,
    conditions_in type standard table of bapicond with header line,
    conditions_inx type standard table of bapicondx with header line,
    logic_switch like BAPISDLS,
    step_nr like conditions_in-cond_st_no,
    item_nr like conditions_in-itm_number,
    cond_count like conditions_in-cond_count,
    cond_type like conditions_in-cond_type.
    salesdocument = wa_order_information-VBELN.
    LOGIC_SWITCH-COND_HANDL = 'X'.
    order_header_inx-updateflag = 'U'.
    conditions
    clear conditions_in[].
    clear conditions_inx[].
    clear: step_nr,
    item_nr,
    cond_count,
    cond_type.
    step_nr = '710'.
    item_nr = '000000'.
    cond_count = '01'.
    cond_type = 'ZCP2'.
    CONDITIONS_IN-ITM_NUMBER = item_nr.
    conditions_in-cond_st_no = step_nr.
    CONDITIONS_IN-COND_COUNT = cond_count.
    CONDITIONS_IN-COND_TYPE = cond_type.
    CONDITIONS_IN-COND_VALUE = 666.
    CONDITIONS_IN-CURRENCY = 'EUR'.
    append conditions_in.
    CONDITIONS_INX-ITM_NUMBER = item_nr.
    conditions_inx-cond_st_no = step_nr.
    CONDITIONS_INX-COND_COUNT = cond_count.
    CONDITIONS_INX-COND_TYPE = cond_type.
    CONDITIONS_INX-UPDATEFLAG = 'U'.
    CONDITIONS_INX-COND_VALUE = 'X'.
    CONDITIONS_INX-CURRENCY = 'X'.
    append conditions_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = salesdocument
    ORDER_HEADER_IN = order_header_in
    ORDER_HEADER_INX = order_header_inx
    LOGIC_SWITCH = logic_switch
    TABLES
    RETURN = return
    CONDITIONS_IN = conditions_in
    CONDITIONS_INX = conditions_inx
    if return-type ne 'E'.
    commit work and wait.
    endif.
    ENDFORM. " saveTransactionJOCR
    Thanks & regards
    Sreenivasulu P

  • Pricing conditions for the articles are getting triggered one day before the actual activation date to 3rd party systems through job WPMU.

    Hi SAP Guru´s,
    Currently we are sending the pricing, promotions & article master data delta load to 3rd party system from SAP ECC via SAP XI through IDOCS using daily scheduled batch jobs WPMU. IDOC segment - WP_PLU.
    Here the issue is the promotion & pricing data are sent to 3rd party system one day before the actual start date.
    Eg: Promotion 123456 which has start date as 15/05/2014 & ending on 30/05/2014 & was created & activated on 13/05/2014.
    This promotion 123456 is getting triggered from SAP ECC through batch job on 14/05/2014 morning & 3rd party system receives the data on 14/05/2014 & the promotion are getting activated at 3rd party system end on 14/05/2014 itself which actually gets active from 15/05/2014.
    Same in the case for Standard Pricing data which needs to be active from 31/05/2014 once the promotion 123456 ends on 30/05/2014.
    The standard pricing data gets triggered from SAP ECC on 30/05/2014 through batch job & reaching 3rd party system on 30/05/2014 & getting activate on 30/05/2014 itself.
    This creates more issues at the store end as well as affecting business.
    We checked at 3rd party system end & they replied that their system considers the updated time stamp & date to activate the prices & it does not considers the actual active from & active to date. They need the data to be sent from SAP ECC on the effective date of the pricing & promotions.
    Can any one help me how to change the pricing conditions beign triggered through batch job in SAP ECC based on the actual promotion & pricing conditons start date or is there any other process to trigger the data through the batch job on the actual promotion & pricing data activation date.
    Thanks in Advance.
    Thanks & Regards,
    P.P.Shankar

    Hello Shankar,
    Change the lead time in the POS Outbound Profile. You can't put less than 2 days there so data for today and tomorrow will be transferred which also means you need to adjust your batch timing accordingly.
    Sales and Distribution -> POS Interface -> Outbound -> Maintain Profile for POS Outbound.
    See if it helps. The best option would still be that the 3rd part system considers the activtion date.
    Kind Regards
    Kaizad

  • BAPi/call function that calculates the pricing condition in CRM order

    Hello Experts,
        Can anybody suggest me which BAPI to be used in order to recalculate the pricing condition that is already maintained in the CRM order.
    I'm trying to upload .txt file which contains basic price value ( condition type ZPR0 ) to update in the order. This new value should over write the existing one in the CRM order & recaluclate the tax & other condition types in the pricing procedure. Can anybody suggest me how to go abt.
    Regards
    Devika.S
    Edited by: Devika.S on Apr 7, 2009 7:07 AM

    Hi Devika,
    Can you have a look at these two BAPIs as listed below to see if any of them fits your requirement?
    BAPI_BUPA_FRG0030_ADD - Add pricing data
    BAPI_BUPA_FRG0030_CHANGE - Changing pricing data
    Hope this helps,
    Cheers,
    Sougata.

  • Is there a  BAPI to create IS-Oil (formula) MM Pricing condition records

    Hi,
    Is there a standard BAPI to create IS-Oil (formula) MM Pricing condition records, which would include the maintaining of the formula?
    Regards
    Kasi

    no BAPI exists

  • BAPI  to create IS-Oil (formula) MM Pricing condition records

    Hi,
    Is there a standard BAPI  to create IS-Oil (formula) MM Pricing condition records, which would include the maintaining of the formula?
    Regards
    Kasi

    no BAPI exists

  • BAPI for Pricing & Conditions

    1. what is the use of Function     Module "BAPI_PRICES_CONDITIONS"? what value we have to pass to BAPI BAPI_PRICES_CONDITIONS"?
    2. Which function Module will use to Extract the Pricing & conditions Details (from SD) ?
    3. Can anyone help me how to extract the Pricing & conditions Details (from SD) ?
    Thanks

    you can use KONV table to get pricing condition(KSCHL) and pricing value(KBETR), for this we require sales order no(VBELN) and item no(POSNR).

Maybe you are looking for

  • My Macbook Pro won´t connect to the Internet

    I've been ytring to log on to the Internet for several hours via wireless with no luck. It connects to Wi-Fi with no problem, but it simply refuses to connect to Internet. In the diagnostic, on the left side there are several red/green lights for sta

  • Changing filename of hyperlink

    Hi - Is there a way to set up hyperlinks to files without iWeb inserting the filename into the web page? The filenames of my pdf documents that I want to link to tend to be very long and I would prefer to use some generic text, say "(pdf)", for peopl

  • Having issues with OX Mavericks 10.9.5 update.

    After installing the update yesterday on my iMac and Mac Book Pro, I cannot get the computers to work with my company's VPN.  I can log on to the VPN, but I can't type in my e-mail, web browser or company software.  The VPN allows me to get into the

  • Iphoto, events or albums

    which is better or has better advantages, events or albums?

  • Safari 3.0.4 crashes when entering form data

    Hello, After updating to 3.0.4 here at work on windoze, I am getting consistant crashes when trying to type in any kind of form data. This includes PW fields as well as text entry fields such as this topic composition window. I can click to place the