Create pricing condition using BAPI_CUSTOMERQUOTATION_CHANGE

Hi ,
I have a requirement to update  quotation pricing data is condition exists i.e if pricing is already exists , if pricing is not exists it has to create a new pricing condition with the given information .
I am able to update the information using  BAPI_CUSTOMERQUOTATION_CHANGE if pricing condition exists ,if pricing condition  not existing its not working as expected.
Please guide me..
code i have written
*Conditions
      lt_conditions_in-itm_number = it_quot-posnr.
      lt_conditions_in-cond_type = c_zill.
      lt_conditions_in-cond_value = it_quot-kbetr.
      lt_conditions_inx-cond_count = 1.
      APPEND lt_conditions_in.
      lt_conditions_inx-itm_number = it_quot-posnr.
      lt_conditions_inx-cond_type = c_zill.
      lt_conditions_inx-updateflag = c_u.
      lt_conditions_inx-cond_value = c_x.
      APPEND lt_conditions_inx.
Thanks in advance,
Srinivas.

Hello Srinivas,
Use BAPI_QUOTATION_CREATEFROMDATA in the create scenario. Before calling the BAPI check if the quotation exists. If yes, use BAPI_CUSTOMERQUOTATION_CHANGE.
Regards,
Ajith

Similar Messages

  • Delete pricing condition using FM crm_order_maintain

    Hi experts
    I need to delete an order pricing condition using the FM crm_order_maintain but i can't do it....
    somebody can help me with the code for do this?
    Thanks in advance
    Marco

    Do one thing,,,
    Go to CRMD_ORDER
    Open the transaction in change mode
    Go to the Pricing condition tab
    put /H in transaction code box
    delete the pricing condition manually from the transaction
    Put break point on CRM_ORDER_MAINTAIN function module...
    debugger will stop at the function module...
    check the data in all tables at this time and try to pass the same...it should work..

  • 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

  • Create pricing condition with default value in processing process field

    hi all,
    when i maintain the pricing conditions with vk11 or vk31, i want the price maintained is set default as blocked (the processing status field-KBSTAT). can it be done? i am using 4.6c.

    You should try to use transaction variant
    <i>Transaction variants simplify transaction flow by:
    Inserting default values in fields
    Changing the ready for input status of fields
    Hiding various screen elements and menu functions, or even entire screens
    Adjusting table control settings
    When you create a transaction variant, you run through the transaction in a special mode. In this mode, you decide which elements you no longer need in your transaction and which values should be inserted where. If you choose to hide an entire screen, the system will no longer display that screen in the transaction and will proceed on to the next screen in the series. You can also adjust table control settings and determine the width of columns and the order in which you want them displayed. In tab strips, you can suppress tabs that you no longer need by setting them to invisible.
    You may also create as many variants for a transaction as you desire. One of these variants can be defined as a standard variant. This variant is then valid across all clients. You may also assign different variants to specific users.
    This is done using Variant Transactions. Variant transactions are then places in those users’ user menus instead of the standard transaction. </i>
    To use this : Tools -> Accelerated SAP -> Personalization (transaction SHD0)
    Regards

  • Create pricing condition with BAPI_PRICES_CONDITIONS

    Hello,
    I am trying to create a new pricing condition for a material using BAPI_PRICES_CONDITIONS, but unsucsessfuly.
    Has anyone tried to do that?
    Looks like BAPI is not generating a condition number.
    Regards,
    Eglese

    Hi Eglese
    Check these threads,
    BAPI_PRICES_CONDITIONS
    Problem with BAPI_PRICES_CONDITIONS
    cheers
    Sameer

  • CREATE PRICING CONDITIONS

    Can anybody please let me know the file format for Pricing Conditions in LSMW for direct input program.

    Sorry for the confusion,
    Here is the business process:
    Sales Order>Delivery>Billing Document>(Customer complains that they have been over charged)>Custom RK Document Created in VA01 with reference to Billing Document>......
    I am trying to automate to creation of the custom RK document.
    I have been able to do so successfully using the code I posted above, however, I came across an issue. If the original sales order had discounts applied, when I was creating my Custom RK Document, it wasn't picking up the discounts and therefore we would be giving the customer back more than they were owed.
    However, after a number of days of working on this issue I figured out the problem. The discounts that were being applied on the original sales order were as a result of a TPM Trade Promotion, the only way those discounts would be applied to my new document is if I passed in the trade promotion GUID into the ls_sales_items_in-campaign field. I found this value using this code
        SELECT SINGLE campaign
          FROM cmpb_asgn
          INTO ls_sales_items_in-campaign
          WHERE vbeln = lt_icr-vbeln_o
          AND posnr = lt_icr-posnr_o.
    Thank you for your interest and advice. I hope this proves useful to someone in the future.

  • Regarding purchase order pricing conditions using exits or badi

    Hi friends can anybody help me and  let me know the solution.
    Please explain how the change in the pricing condition amount value should update the cost in PO.
    and which EXITS or BADI use for .
    if anybody have the solution send me reply AS SOON AS
    Thanks,
    srinivas

    OK
    But the problem is pricing conditions like transport cost. Because when I do a new purchase order the system use last transport cost and i don´t want it.
    What I want (if possible) with infoupdate is:
    - Update ( PBXX & PB00)
    - Don´t update (other conditions like transport).
    Thanks....

  • Deleting pricing conditions using FM /AFS/VBAK_SALESDOCUMENT_CHANGE

    Hi all,
    following the instructions in oss note 593246 I have succesfully implemented code to delete a discount condition from a sales order using FM /AFS/VBAK_SALESDOCUMENT_CHANGE. But now I also want to delete a condition from a sales order position which has an item which has the AFS 'price by size' characteristic (an item with a shirt for example,  with 10 pieces, which are divided in 3 smalls, 4 mediums and 3 large).
    Using the same code that was succesful earlier, it deletes the discount condition, but also all standard pricing conditions, making the pricing in the order invalid obviously.
    Has anyone else had this problem? And more importantly: has anyone found a way to do this succesfully?
    Thanks in advance
    Arjan

    update:
    setting the condition to value zero is possible I found... so at least I have that option. But deleting would be the tidy solution, so any help is still aprreciated.
    If there is anyone also struggleing with this AFS module and pricing, I can share the code I am using to update to zero or delete (when the material is not price by size-ed.

  • Regarding adding new pricing condition using BAPI_SALESORDER_CHANGE

    Hi All,
    I am trying to add a new pricing condition at item level using Bapi_salesorder_change, but it is not getting updated. I am also doing Bapi_transaction_commit as the next step.
    I am passing the sales order number and the Update flag in the header. Tried passing G as the logic switch-pricing and also tried with logic_switch-COND_HANDL = X.
    I am passing the data in structure CONDITIONS_IN with the value for item numebr, condition step number, condition count , condition value, currency and unit.
    Also I am passing data in CONDITIONS_INX with the required flags set and update flag as 'I'.
    The output says that order is changed and saved successfully, but the condition type is not there when i check the pricing coinditions inside the order at item level.Please help.
    Regards,
    Kaustubh B. Khasnis

    Hi,
    In the condition tab..
    Press the determination analysis button..
    There it will show the why the pricing condition type is not added..
    Thanks,
    Naren

  • Create Global Condition using SCCM 2012 SDK programmaticaly

    Could someone please help me in creating some simple Global Condition in SCCM 2012 with SDK.
    First, I thougth that it will be pretty easy just creating a SMS_GlobalCondition WMI objet instance, but then I found that there is no any information about rules in that object and it seems to be impossible to create just SMS_GlobalCondition instance. So
    there should be some another object containing information about rule or expression assigned to global condition.
    For now, I found that it seems to be possible to use DcmObjectWrapper, may be someone can give me a piece of advice on how that exactly can be done.
    Appreciate any help.

    Juke,
    Thanks for your reply.
    Actually for now I'm trying to do what you recommended.
    I found an
    article describing the way to retrieve all Global Conditions as a part of assigning them to an application. This part works for me, I'm just checking objects which they use and looking for properties I should specify, but I still was not able to successfully
    create Global Condition.
    Seems that I still miss some parameters.
    When I save wrapper object which is of type DcmObjectWrapper like
    ((IResultObject)wrapper).Put();
    after specifying necessary parameter I got an error:
    ConfigMgr Error Object:
    instance of SMS_ExtendedStatus
    Description = "Access denied when attempting to retreive configuration item.";
    ErrorCode = 1078266380;
    File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspconfigurationitem.cpp";
    Line = 2130;
    ObjectInfo = "";
    Operation = "PutInstance";
    ParameterInfo = "";
    ProviderName = "ExtnProv";
    StatusCode = 2147749889;
    That would be great if someone could provide me with working example or give some advice on what parameters are required for that objects. Or maybe I'm using wrong way to do that in general.

  • Problem in Creating Pricing Condition Table...

    Friends,
    I am creating a condition table.
    i selected perticular fields (S.org, D.ch, Div, So-to-Party,Mat)
    When i click on Generate Icon
    I Got error message:
    Customer Object VKOS A505 cannot be assigned to package

    Hello,
    Which is the number you have given for your table?
    The best way is to search for the table which is having most of these fields and copy that table to a new table. When you create table give a table number after 900 and copy from another table. After this you can add/delete the fields and generate the table.
    Prase

  • Creating additional conditions using BAPI_CONTRACT_CHANGE

    Hi Guru's,
    I am using the BAPI 'BAPI_CONTRACT_CHANGE' to create some new conditions records for future validity periods.
    But I am getting series of errors with the test data provided. Please let me know what are mandatory parameters to pass for successful creation of new condition record for a contract item.
    Right now I am getting an error 'Unit of measure PC not a unit of mass'.
    Regards,
    Praveen.

    I have used BDC method ( MEK1) to update the future prices for contract .
    Thanks
    Pavee

  • Can idoc COND_A04 be used to update/delete existing pricing conditions?

    Hi all,
    I am designing an interface from an external pricing system to SAP, and am currently looking at the COND_A04 idoc as a mechanism to load the prices into SAP.  In testing I've found that this idoc creates pricing conditions very nicely, but I'm wondering if the idoc can also be used to change existing pricing conditons or mark existing pricing conditions for deletion.  Has anyone ever done this with COND_A04?
    I tried deleting an existing condition by populating E1KONH-KNUMH with the condtion record number of the existing condition, and populating E1KONP-LOEVM_KO (deletion indicator) with an 'X'.  Instead of marking the existing condition with the deletion flag, what this did was create a new condition record (same validity period and price) that is marked for deletion.  While functionally this does in fact delete the price (the previous condition is 'overlapped' by the new condition and therefore ignored going forward), it doesn't seem like a clean solution and the resulting change history is very confusing.
    Are there are fields on the idoc that can be set to perform a true change or deletion, vs. simply creating a new condition record???  Any ideas will be most appreciated!
    Thanks,
    Allison

    There could be numerous reasons for the IDoc failure because the message that you are getting is too generic. Btw, Is this the only message you get, check if there are more than 1 status 51 in your IDoc to get some more information.
    Also see the longtext of the message by double clicking on the status message, probably you will get a more comprehensive reason for the failure.
    If nothing of the above helps, try to see the message number and class and see where it is used in the posting program and put a break point at the spot where this message is triggered.
    regards,
    Advait

  • Module function to create and read pricing condition

    Hello,
    I am looking for an easy function module that enable us to get the pricing condition record ?
    (As transaction for example VK13)
    And I am looking for a function module to create pricing condition ?
    (As transaction XK15 or at least VK11)
    Thanks in advance,
    Maxime

    for creating try BAPI_FTR_CONDITION_CREATE (no experience with this one..)
    for reading use Function SD_COND_ACCESS
    consider more than one Condition Table may be involved via AccSeq for your KSCHL.
    Fill KOMK and KOMP accordingly for all Tables of AccSeq for the KSCHL
    Cheers
    carsten
    example:
    *& Report  ZCAWA_CONDR
    TESTREPORT
    Konditionen lesen via Zugriffsfolge des eingegebenen KSCHL
    C.Wagener, 11.02.2009
    REPORT  zcawa_condr.
    PARAMETERS:
      p_kappl TYPE kappl DEFAULT 'V',
      p_kschl TYPE kschl DEFAULT 'ZGRA',
      p_vkorg type vkorg default '0100',
      p_vtweg type vtweg default  '00',
      p_datum TYPE sydatum default sy-datum,
      p_mlfb  type YYBCEZNDR default '6MD90001AA'.
    DATA: ls_komk TYPE komk.
    DATA: ls_komp TYPE komp.
    DATA: ls_konp TYPE konp.
    DATA: lt_t682i TYPE TABLE OF t682i  WITH HEADER LINE .
    DATA: ls_koprt TYPE koprt.
    DATA: lt_conditions TYPE TABLE OF a000  WITH HEADER LINE.
    DATA: ls_sdprothead TYPE sdprothead.
    ls_komk-prsdt       = p_datum.
    ls_komk-vkorg       = p_vkorg.
    ls_komk-vtweg       = p_vtweg.
    ls_komp-zzyybcezndr = p_mlfb.
    Tabellen der Zugriffsolge zur Konditionsart ermitteln
    SELECT * FROM t682i AS a
    JOIN t685 AS b ON
      akvewe EQ bkvewe AND
      akappl EQ bkappl AND
      akozgf EQ bkozgf
    INTO CORRESPONDING FIELDS OF TABLE lt_t682i
    WHERE b~kvewe EQ 'A'
      AND b~kappl EQ p_kappl
      AND b~kschl EQ p_kschl.
    pro ZugFolgen-Tab-Eintrag FuBa aufrufen
    LOOP AT lt_t682i.
      CALL FUNCTION 'SD_COND_ACCESS'
        EXPORTING
          application          = p_kappl
          condition_type       = p_kschl
          date                 = p_datum
          header_comm_area     = ls_komk
          position_comm_area   = ls_komp
          t682i_i              = lt_t682i
          koprt_i              = ls_koprt
        TABLES
          condition_records    = lt_conditions
        EXCEPTIONS
          field_is_initial     = 1
          not_read_unqualified = 2
          read_but_not_found   = 3
          read_but_blocked     = 4
          t682z_missing        = 5
          t681v_missing        = 6
          t681z_missing        = 7
          mva_error            = 8
          OTHERS               = 9.
    und raus, wenn Treffer
      READ TABLE lt_conditions INDEX 1.
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM konp INTO ls_konp
        WHERE knumh EQ lt_conditions-knumh.
        IF sy-subrc EQ 0.
          IF ls_konp-konwa EQ '%'.
            ls_konp-kbetr = ls_konp-kbetr / 10.
          ENDIF.
          WRITE ls_konp-kbetr.
          EXIT.
        ENDIF.
      ENDIF.
    ENDLOOP.

  • Pricing conditions EK01 and PR00 in pricing procedure

    Hi Gurus,
    We have a process in which a SD billing request is generated by using DIP profile (DP90). Pricing condition used in the pricing procedure for the sales document is EK01 (which brings the actual cost of the service order that creates the Billing request through DP90) but it happens sometimes that EK01 is not desired but instead PR00 ( another price agreed with a certain client instead of the actual cost in the order).
    In order to match this need, best would be to combine both conditions (EK01 and PR00) in the same pricing procedure, and as a general rule, EK01 will apply in the billing request price, but in case PR00 condition exists, then this one will prevail and EK01 will be in the price conditions but will not be taken into account in the price calculation--> how can this be done in the pricing procedure?
    Another possibility would be using different pricing procedures so that one has EK01 as pricing condition and  the other one has PR00. The pricing procedure will be assigned by using document pricing procedure assigned to a different document type but this is not the desired solution as it makes much more tricky the design: another dynamic item profile would be needed so that proper document type is assigned.
    Thanks for your great help in advanced!
    VL

    Hi Victor,
    You can put both of the conditions in the same pricing procedure and use the exclusion group to compare the conditions and choose the favourable as per you requirement.
    I hope this will certainly help you in solving your problwm.
    Regards,
    VB

Maybe you are looking for

  • Portege M800 - System hangs after fingerprint login

    I just got my Portege M800 weeks ago and frankly speaking, this model has been giving me much trouble. Earlier it is the heat problem at the palm rest and there is no solution to it. Now I am facing another issue with the fingerprint login. I am runn

  • IPhone 3Gs stuck in recovery mode, NO DRIVER!

    I clicked the update to install. After it finished iTunes poped up and error and said it did not complete. After that, my phone went into recovery mode and is asking for a driver that is not on my pc. It states "Apple Mobile Device (Recovery Mode)" i

  • ITunes showing wrong artist artwork. how do i find the image and delete it?

    iTunes is showing the wrong artwork for an artist.  What is strange and frustrating is that the image is not the artwork for any of the artist's albums.  iTunes seems to be pulling it from nowhere.  I can't figure out where iTunes is pulling the imag

  • How to remove a hidden link in a pdf?

    There is a hidden link on the left of the following pdf page. Does anybody know how to remove it from the pdf? https://rapidshare.com/files/4090233161/Pages_from_0702685v1.pdf

  • Xperia Z1 stuck in boot loop after upgrade to lollipop!

    Hi, I tried to upgrade my Xperia Z1 to lollipop on my macbook - but it failed due to something about update server error. Now , the phone just tries to boot, shows the sony and xperia logo, backlight comes on - and then shuts down and cycles through