Change pricing using FM

Hi experts
I need change the pricing of an exiting order.
I would do this using the FM CRM_ORDER_MAINTAIN but it doesn't work....
Can anybody show me the right code for change princing using this FM??
best regards
Marco

Hi try this and let me know if fulfills your needs
  ls_pridoc_tab-stunr = ln_cond-stunr.
ls_pridoc_tab-zaehk = ln_cond-zaehk.
ls_pridoc_tab-waers = ln_cond-waers.
ls_pridoc_tab-kbetr = '70'.
INSERT ls_pridoc_tab INTO TABLE lt_pridoc_tab.
ls_pridoc-ref_guid = ln_cond-kposn.
ls_pridoc-cond_change = lt_pridoc_tab.
INSERT ls_pridoc INTO TABLE lt_pridoc.
ls_input_field-ref_guid = ln_cond-kposn.
ls_input_field-ref_kind = 'B'.
ls_input_field-objectname = 'PRIDOC_COM'.
ls_field_name-fieldname = 'KBETR'.
INSERT ls_field_name INTO TABLE lt_field_name.
INSERT ls_input_field INTO TABLE lt_input_field.
REFRESH lt_field_name.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
   EXPORTING
     it_pridoc       = lt_pridoc
   CHANGING
     ct_input_fields = lt_input_field.
IF sy-subrc EQ 0.
   ls_header_guid = guid.
   APPEND ls_header_guid TO lt_header_guid.
   CALL FUNCTION 'CRM_ORDER_SAVE'
     EXPORTING
       it_objects_to_save = lt_header_guid
     IMPORTING
       et_saved_objects   = gt_saved_objects.
   COMMIT WORK.
ENDIF.
Bye
Il gemello disperso

Similar Messages

  • 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

  • Change Pricing procedure in sales order create

    Hi,i need to create a return with reference to an billing document by using FM BAPI_CUSTOMERRETURN_CREATE. I can able to create Return sales order with reference to billing document. But i am not able to copy pricing as per billing document item. It is getting created correctly when i do manual.
    Or Can i change Pricing procedure when i create sales order by using any enhancement ?
    Kindly help.

    Hi,
    Please try using the below EXITS:
    USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA)
    In the standard SAP system, it is predefined which condition categories and classes can be copied or recalculated per pricing type. You can change the predefined standard procedure for each pricing type.
    USEREXIT_CHANGE_PRICING_RULE (module pool SAPMV61A, program MV61AFZA)
    You can use this user exit to change the pricing type that has been predefined in the copying control table in billing.
    Hope this might be helpful.
    Regards,
    Shashwath

  • Change pricing procedure in Sales order based on SHIP-TO Location..

    HI SAP Friends,
    Based on the SHIP-TO location of the sales order, we want to have tax calculated including Freight Amt. I was thinking to come up with 2 pricing procedure; one that calculates tax including Freight amt AND the other procedure that does not calculate tax including freight amt. Hence, We want to dynamically change 'Pricing procedure' based on Ship-To location. DO we have any user exits for this ?

    Nirnjan
    Tax calculation is based on the simple logic:
    Region of Shipping Plant - region of Ship to Customer location.
    In case of freight  apply the acces sequence using the ship to party location field as part of condition type aqccess.
    cheers
    nandu

  • Changing Pricing Conditions in SRM

    Hi,
    Has anyone ever used either BADI PRC_DATA_SOURCES to change pricing conditions linked to a SC in SRM 5.0?
    Kind Regards,

    Hi,
    did you find a solution to your question ? I am trying to find an answer to the same subject.
    thanks,
    Isaac

  • How can we change Pricing condition price date

    Hi SAP Gurus,
    I have requirement as following.
    When we create a sales order if any contract is available it should be populated in a diaglog box, and when user select a one , we keep this as a z-field in the sales order header level, so far fine.
    And the requirement includes the pricing date for one of pricing condition should be the first delivery date(schedulelinedate).
    We have the condition records with the pricing date as document date, we cannt keep commited delivery date as pricingdate(komv-kdatu).
    So i need a solution, thru i can modify the KOMV-KDATU
    for the condition type,with the first schedule line date.
    could anybody knows how to modify the KOMV structure values?????
    The quick answer will be highly apreciated?
    Thanks & Regards,
    Praveen

    Hi Praveen,
    You can use user exit "USEREXIT_PRICING_PREPARE_TKOMK" to change Pricing Condition Table at header level & "USEREXIT_PRICING_PREPARE_TKOMP" at item level. These exits are present in include "MV45AFZZ" of Sales Order program "SAPMV45A".
    Cheers,
    Gajendra

  • Change in Useful life of asset in mid year, but the previous posted depreciation should not be changed

    Dear Experts,
    I have a requirement in one of my client, We need to extend the useful life of asset in mid of an asset fiscal year and the depreciation which was posted in the previous should not be changed.
    Requirement:
    Useful life of asset  is to be extended after completing depreciation for 4 years and in-between the current asset fiscal year. Provided the present asset value has to be taken as the new book value of the asset and the depreciation posted henceforth to be posted based on the new asset value till the remaining useful life.
    Previously posted depreciation should be unchanged.
    Analysis:
    1.      The fiscal Year followed - October to September.
    2.      The useful life of asset will be changed, and the depreciated value posted till 31/mar 2014 will have the old depreciation value ( based on the original acquisition value)
    3.      The Depreciation key used in of type LINR (linear), depreciation value will be calculated based on the Book value till the asset value becomes ZERO at the end of useful life of the asset.
    4.      We can change the useful life of the asset at the end of a Asset fiscal year say FY- 2014, if this is done the existing configuration will take the Book value of the asset at the end of the Fiscal as the asset value and the new depreciation will be calculated based on the new useful life of the asset. The asset value will become ZERO at the end of the newly changed Useful Life.
    5.      But the requirement is that the useful life of the asset will be changed exactly half way in between existing Asset fiscal (i.e., 31/03/2014), if this is done system will change the depreciation value based on the new useful life ( since the Dep Key is LINR), but the depreciation value will change from the fiscal start say October 2013 to September 2014 ), which will not satisfy the requirement of the client. Since the depreciation which is already posted from October 2013 to March 2014 should not be changed.
    Note:
    1. We are not willing to retire the asset and create a new asset with the remaining book value as asset value and start depreciation.
    Kindly let me know if the requirement can be fulfilled without retiring the asset.

    Dear All,
    This requirement has been completed.
    1. I created New Multi level valuation method with base 26 ( Net book value w/o Revaluation ).
    2. New depreciation key was created and the above method was assigned to it. I never changed the Base method.
    3. new interval was created in the depreciation area, with this created dep key and extended the useful life of the asset. The depreciation was calculated according to the requirement.
    Originally the asset had useful life of  5 Years, I changed the asset useful life to 8 years now with new Depreciation key 2001.
    Depreciation was already posted to the asset till 04- 2013 for an amount of 148.27 SAR.
    Net Book value carried forward to 2013 = 1575.56 SAR
    Depreciation already posted till 4th period =   148.27 SAR
    Current Net book value after useful life extension           = 1427.29 SAR .
    Now the new depreciation key 2001 with Multilevel method 201, will take this Net-book value as Asset value and will depreciate along the useful life of the asset till it becomes zero.
    Planned depreciation of 2013 ( remaining 6 months) = 166.24 SAR
    Planned depreciation of 2014 = 225.96 SAR
    Planned depreciation of 2015 = 225.96 SAR
    Planned depreciation of 2016 = 225.96 SAR
    Planned depreciation of 2017 = 225.96 SAR
    Planned depreciation of 2018 = 225.96 SAR
    Planned depreciation of 2019 = 131.25 SAR
    Total      = 1427.29 SAR ( the Asset value becomes zero at the end of its remaining useful life.
    The previously posted depreciation from 01.01.2013 to 30.04.2013 was untouched.

  • HOW TO CHANGE THE USEFUL LIFE FOR MORE ASSETS AT A TIME FOR ASSET CLASS

    Hi All,
    Asset which is under Asset Class Support system-B700. Here every thing is ok but the problem in USE FULL LIFE which is come by default. It must be 4 instead of  5.   So can any body help me out from this how to change the Useful life in that Asset class.  In that Asset Class we have the morethan 200 Assets. It was happend in Prdocution system so now the problem is where i can change the useful life for the asset class either in DEV or PRD.
           Also i want to know the information of How these assets are Uploaded into the system (Lsmw or etc). this is very urgent for me.
    Thanks in Advance,
    Regards,
    Siva.

    Hi Ashok,
         Can i know the reason how it was happend. i mean instead of 4 years the system showing is 5yesrs any reason is there behind that.
    Thanks in Advance.

  • How to change pricing conditions

    Hello Experts,
    i'm trying to change pricing conditions in routines.
    SPRO --> SD --> System Modifications --> Routines --> Define Copying Requirements (double click any activities) -->  it will open "Maintain Requirement and Formula"
    select from menubar "Formulas --> Condition Value"
    Routine Number --> 36 - Cumulation condition.
    i want to change conditions in this Routine 36, so i copy this routine and create a new routine name
    901 - Cumulation condition
    i want to change Pricing Conditions in this routines. this standard routine adding all sub-total pricing values. but i want to display all sub-total pricing value separately in there respective field.
    i'm checking this result in VA11.
    any ideas? i know i have to change code in this copied rotines for this calculations. but i'm not finding any clue where this value is getting added in each sub-total field level.
    if any more clarification needed, please ask.

    Hi Rabindra
    For Net Price you can refer this Note 80183.
    Neha

  • Can we change pricing date for line item in billing

    Hi Expert,
    Can we change pricing date , while raising inoice for particular line iteam

    Hi,
    We can not change the pricing date for perticular line item at billing document level, the only option is we can enter the required date at the time of invoice creation in VF01 screen.
    If your requirement is copying the same pricing date that is entered at sales order, then do the following.
    Go to T Code:VTFL and choose your DElivery Type and Billing Type, then choose your item category and then change the pricing type as 'D' .
    Regards,
    Pasapula.

  • Changing quantity using bapi_salesorder_change function

    hi ,
    i am changing quantity using 'bapi_salesorder_change' function.what are the minimum parameteres that needs to be passsed to the function.i am not able to change the quantity for some items.also for some sales orders i am not getting any error message but commit work is not working.
    thanks ,
    nitin

    Hi Nitin,
    After you call the BAPI_SALESORDER_CHANGE, specifically call BAPI_TRANSACTION_COMMIT , as BAPI_SALESORDER_CHANGE does not run a database commit.(as per the documentation provided by SAP for BAPI_SALESORDER_CHANGE)
    Thanks
    Lakshman

  • I am no longer able to change songs using my headphones

    After updating to iOS 6.0 on my iphone 4S I am no longer able to change songs using the headphone controls and when i double click on the home button it no longer allows me to turn my music on and off without unlocking the screen and going into the music app on the phone.
    Any ideas why this is?  Is it a known bug?

    Start by opening Disk Utility, from Applications > Utilities, then select the internal storage MacIntosh HD, and then Repair Permissions.  You should see some printer libraries noted as having the wrong permissions, that may be part of the problem.
    Be sure you have the latest printer/scanner drivers installed by going to the Canon site and download the latest available.
    You can also try using the Mac OS X built-in scanning software by going to Applications > Image Capture and see if that handles the scanning for you - works great with my Epson scanner.

  • Look for a progarm that will let me have 2 moniters but one will lock on and will not change when using spaces

    look for a progarm that will let me have 2 moniters but one will lock on and will not change when using spaces

    ok so i have one moniter to the right of me and i want to keep my google chrome on that one but still be abel to use space on the many monter. cuz when you go to spaces it movies both moniter i hope that help and i hope that you can help me.

  • Slaes pricing using simulation version

    Hi experts,
    Is it possible to create sales pricing using simulaton version project ?

    Hi Ravi
    Thanks for your response
    Please look at the link http://help.sap.com/saphelp_erp60/helpdata/en/0b/ba853488601e33e10000009b38f83b/frameset.htm
    There is an illustration which depicts that,
    - Project P1234/version 0001 --> Project 1234 --> Project P1234/Version 0002 --> Project P1234
    As per this illustration, the project number remains same.
    As you said, the transaction CJ20N is not allowing me to transfer the simulation version to operative project.
    But, i am experiencing a dump error while trying to transfer simulation to operative in CVJ4.
    At the conclusion, i mean to say that irrespective of transaction code, this may be allowed.
    Please comment.
    warm regards
    ramSiva

  • I have iMac osx  version 10.8.5 and i forgot my account login password. i can't change it using my apple ID nor i remember my password.also my fire vault is not on and my keychain won't help. PS i can't also use the terminal idea it always not found.help

    have iMac osx  version 10.8.5 and i forgot my account login password. i can't change it using my apple ID nor i remember my password.also my fire vault is not on and my keychain won't help. PS i can't also use the terminal idea it always not found please help !!

    You need to restart the iMac and hold down the Command and R keys immediately.
    You will then have the utilities drop down and you choose Terminal
    When Terminal opens, type exactly:
    resetpassword
    and press Return.
    When the Reset Password window opens, select the user for which you want to change the password.
    Enter the new password twice, and then click Save.
    Accept the next dialog window,
    And then Apply
    When finished click the apple at the left side of the menu bar, and the Restart.

Maybe you are looking for

  • Blackberry Desktop Software 6.0 & Windows 7 64 Bit, Won't launch after install

    Hi, I've been using previous versions of the desktop software before just fine. I updated to Desktop Software 6.0 on my Windows 7 64 Bit machine and the install finishes without any errors. When I attempt to open it, I get a title bar that says Black

  • Connection problems w/HTC Mogul PPC phone via Missing Sync & Bluetooth

    Can anyone help me connect my HTC Mogul phone to my Mac with Missing Sync using bluetooth? It syncs great using USB, but will not work with bluetooth. Is this an issue with the Mac, the bluetooth profile, or the phone? Any help would be appreciated!

  • Industry Sector and Material Type list of values in cFolders

    Hi,   How to transfer the List of Values for Industry Sector & Material Type from R/3 to cFolders system? We have R/3 Production system running for the past 3 years. We are implementing cFolders now. While Material creation in cFolders, the List of V

  • Acrobat Pro form getting MAPI spooler error

    I have a form created in Acrobat Pro. The users are using Reader 9.3.1. When the user clicks the Submit button, they get a MAPI Spooler error. For some Windows Services closes Reader. Any thoughts on what is causing this and how to fix? Thanks, MDawn

  • First projects

    My first few projects are done in Illustrator, can you guys give my some comments and also tips to improve? Do you see i've never worked before with illustrator? Please look at my banners on my sites: 4you2wear, 4you2scent and 4you2sleep Looking forw