BADI for updating condition rate in CRMD_ORDER

Hi Gurus,
I am creating a sales order using CRMD_ORDER and trying to update the condition rate in ABAP. I need to know how exactly i can do the same.
I have identified CRM_COND_COM_BADI and CRM_PRICING_I_BADI but I don't know which parameters to alter in order to update the condition rate.
Regards.

Hi Charles,
Here is a piece of code which i used to update pricing conditions.
From here you can see what all fields are to be passed to maintain price conditions.
                      y_lwa_pric_cond_change-stunr = y_lwa_pric_cond-stunr.
                      y_lwa_pric_cond_change-zaehk = y_lwa_pric_cond-zaehk.
                      y_lwa_pric_cond_change-waers = y_lwa_pric_cond-waers.
                      y_lwa_pric_cond_change-kbetr = y_lwa_pridoc-ypriccndp.
                      INSERT y_lwa_pric_cond_change INTO TABLE y_li_pric_cond_change.
                y_lwa_pridoc-cond_change = y_li_pric_cond_change.
                INSERT y_lwa_pridoc INTO TABLE p_it_pridoc.
                y_lwa_input_fields-ref_guid = y_lwa_pridoc-ref_guid.
                y_lwa_input_fields-ref_kind = 'B'.
                y_lwa_input_fields-objectname = 'PRIDOC_COM'.
                y_lwa_field_names-fieldname = 'LIST_PRICE'.
                INSERT y_lwa_field_names INTO TABLE y_li_field_names.
                y_lwa_field_names-fieldname = 'DISCOUNT'.
                INSERT y_lwa_field_names INTO TABLE y_li_field_names.
                y_lwa_field_names-fieldname = 'NET_PRICE'.
                INSERT y_lwa_field_names INTO TABLE y_li_field_names.
                y_lwa_input_fields-field_names = y_li_field_names.
                INSERT y_lwa_input_fields INTO TABLE y_ct_input_fields.
                REFRESH y_li_field_names.
                CALL FUNCTION 'CRM_ORDER_MAINTAIN'
                  EXPORTING
                    it_pridoc       = p_it_pridoc
                  CHANGING
                    ct_orderadm_i   = p_it_orderadm_i
                    ct_input_fields = y_ct_input_fields.
Let me know if you need any clarrification.
Regards,
Vinay Sah
Edited by: Vinay Sah on May 26, 2009 11:17 AM

Similar Messages

  • Need exit or Badi for updating Warranty data in IE02 while Prod Order conf.

    Hi All,
    I need a user exit or Badi for updating the Warranty data in IE02(Equipment Master) while production order confirmation(CO15)?
    I need to update the Begin guarantee date from Production order and warranty master type in IE02 while confirming the production order.
    Thanks,
    Sudha

    Hi,
    Are you saying first create notification,then service order
    and then Sales order.
    But the requirement is create notification then sales order and when you go in va02 and while modifying the sales order and create service order.
    Thanks & regards,
    chetan.

  • User Exit or BADI for Updating Tax code (MWSKZ) using ME21N

    Hi all,
    I am trying to fin out an exit or badi for Updating Tax code (MWSKZ) and Unit of Measure in transaction ME21n.
    The scenario is like this...
    For Purchase Orders Tax code will be defaulted from Purchasing info record or contract or parameter id for that item-vendor-plant.
    If the Tax Code is not defaulted and account assignment is blank then tax code on the PO is updated according to the below mentioned table
    Table
    Supplying Plant/              Receiving Plant                      Tax code
    Vendor/Country
    Any plant/vendor/
    country                           5050(NA)                               20
    2300                              6700                                     E0
    If the tax code on PO cannot be updated by the above table, then buyer needs to put tax code on the purchase order manually.
    Thanks,
    Shiva, Bangalore

    Hi Siva.,.,.,
    These r the exits.,..,which will be called while calling ME21N/ME22N/ME23N
    EXIT_SAPMM06E_006
    EXIT_SAPMM06E_007
    EXIT_SAPMM06E_008
    EXIT_SAPMM06E_009
    EXIT_SAPMM06E_012
    EXIT_SAPMM06E_013
    EXIT_SAPMM06E_014
    EXIT_SAPMM06E_016
    EXIT_SAPMM06E_017
    EXIT_SAPMM06E_018
    U want to default some values while the Initial screen will come right,
    while u Enter ME21N in command Prompt.,.,two exits will get triggerd,
    EXIT_SAPMM06E_014
    EXIT_SAPMM06E_016
    If u want to Default some values u can use these two exits.,.
    Try using EXIT_SAPMM06E_016.,.this will solve ur purpose.
    and if the user changes some values on screen.,,and you want them to get reflected .,.,.that means if user changes and saves data .,.
    While saving.,.,EXIT_SAPMM06E_012 and EXIT_SAPMM06E_013 will get triggerd
    Try using EXIT_SAPMM06E_013.,,.it was somehow the same requirement as mine.,.,IN my case it worked fine.,.,
    Regards
    Debasish
    Message was edited by:
            Debasish Das

  • BADI For updating BP in CRM

    Hi Experts,
    I am looking out for a BADI to update the BP through transaction BP before saving it.
    I found couple of them which get triggered but any changes made in these BADIs are not to be seen in the transaction after saving.
    1. ADDRESS_UPDATE and
    2. BUPA_ADDR_UPDATE.
    Please suggest me how to proceed as I am blank at the moment. Please answer me as soon as possible as it is an urgent issue.
    Maximum Points will be rewarded.
    Thanks in advance.

    Hi Gautham,
    No good, It did not help me Gautham.
    Can you please suggest me some other way of dong it.
    I have 2 badis to use one is address_update and the other is addres_check.
    I implemented address_check which had a address structure as a changing parameter and I update it there, it works absolutely fine.
    But my requirement is to update the structure based on the condition of BUT000. That is the BUT000-type, which means I need to update the structure only for person and not for organization and group.
    so in the badi address_check i need the BUT000 details, which I am not able to trace even from the local memory as I am getting the error saying "Memory is not yet instantiated"
    and If i use the other badi address_update.
    I have the problem the other way round here. I have all the BUT000 details here I can put the condition to update only for person, but I am not able to update the address structure.
    Please help me. This is required very urgent.
    Maximum points will be rewarded.
    Thanks in advance.
    Arul.

  • Function modules etc for Updating condition records

    Hi Guys ,
                   Anybody have any idea on how to update condition records in CRM . I have used CRMXIF_COND_REC_SLIM_SAVE but this only updates product conditions ( condition table SAP004 ) . I want to update condition table SAP012 which is maintained in transaction /SAPCND/GCM .
                   Any ideas ?
    Regards,
    Radha

    Hi Radha,
    Even I am using the FM CRMXIF_COND_REC_SLIM_SAVE   to update conditions in the conditions table SAP004 and SAPSC012 , but for me the conditions are getting updated in table SAPSC012 but not SAP004.
    I want to update using the conditoin record guid and want to
    update the condition rate value.
    Can you please help .
    Thanks,
    Poonam.

  • Updating Condition Rate in SO using BAPI 'BAPI_SALESORDER_CHANGE'

    Hi,
    I want to update the price related to condtions(both automatic and manual) in Sales Order items from input file. I am using bapi 'BAPI_SALESORDER_CHANGE' to for this.
    I used follwing code,
    wa_so_cond-itm_number = wa_input-so_item.
    wa_so_cond-cond_type  = wa_input-kschl.
    wa_so_cond-cond_st_no = '011'.
    wa_so_cond-cond_count = '00'.
    wa_so_cond-cond_value = wa_input-kbetr.
    APPEND wa_so_cond TO i_so_cond.
    CLEAR wa_so_cond.
    wa_so_condx-itm_number = wa_input-so_item.
    wa_so_condx-cond_type  = wa_input-kschl.
    wa_so_condx-cond_st_no = '011'.
    wa_so_condx-cond_count = '00'.
    wa_so_condx-updateflag = c_u.
    wa_so_condx-cond_value = c_x.
    APPEND  wa_so_condx TO i_so_condx.
    CLEAR wa_so_condx.
    But this is creating a new line in conditions instead of updating the existing line, even though the existing line is a inactive by crerating a new line I want to update the exsting line with new condition rate instead of creating a new line. Please help me if you have any soultion for this.
    Thanks in Advance,
    Prasad JVV.

    Hi Sandipan,
    I used APPEND to fill the conditions_in & conditions_inx, without filling the tables how can I modify?
    Thanks,
    Prasad JVV.

  • BADI for updating changing output medium in PO

    Hi,
        Is there any BADI or exit present for updating the output medium in PO , based upon some criteria ?
        In my requirement I want to make output medium as <b><b>'email'</b></b> and set email address to email ID of one of the partner function maintained in PO.
    Thanks and Regards,
    Amit R

    Hi
    <b>At runtime, you will get the GUID in the BADI Interface.</b>
    Incase this BADI does not help, go for another BADI
    1) <u>BBP_SEND_MEDIUM_MODE</u>     
    (Determines the Default Settings for the Send Medium)
    2) '<u>BBP_OUTPUT_CHANGE_SF'</u>.
    <u>Here are some related links -></u>
    Re: PO output medium issue
    Re: SRM PO SMARTFORM
    Re: Control PO output to vendor
    Re: Add a Printer ?  -> LP01
    Hope this will help.
    Regards
    - Atul

  • Need user-exit/BADI for my requirement in transaction CRMD_ORDER...

    Hello Experts,
    I was just given a development task under CRM module. The transaction that I would enhance
    would be CRMD_ORDER. What I need to do is that I need to check the customer class
    in table CRMM_BUT_FRG0041-classific if it falls under 09. If true, then search for the
    condition exclusion from the table PRCC_EXCL_PROC for a given combination and by checking the
    fields KAUGR1 and KUAGR2. If found, then bypass this exclusion for customer class 09 so that it will
    be given a trade discount and bypass the pricing procedure.
    Hope you can help me guys as I am fairly new to CRM module. Thank you and take care!

    Hi,
    You will have to put the required Logic there and test.
    But what I feel is you need to use IPC Pricing routines, which are assigned in the Pricing Procedure. They are java routines.
    According to my understanding, you will have to first check the customer class from table CRMM_BUT_FRG0041. If it is 09 than u read the condition exclusion groups, the condition type assigned and bypass it.
    Wish it helps.
    Regards,
    Shalini Chauhan

  • User exit/BADI for updating custom table in MB1B transaction-

    Dear All,
    When performing a material to material conversion in MB1B transaction for  batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
    The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
    Kindly suggest a user exit/BAIi available for updating the same in the custom table.
    Regards,
    Deepak

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • User exit / BADI for updating STO when change in subcontracting PO

    Hi
    The requirement is to update the STO (stock transfer order ) when their any change in subcontracting PO at item level. Is there any exit or BADI available where STO quantity and delivery date will be updated after any change in PO at item level ?
    Thanks
    Manas

    Deepak, Exits for MB1B are
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.

  • Exit/Badi for Updating Actual Start Date in CJ20N

    Dear Experts,
    In transaction CJ20N, under Dates Tab for a particular Activity, there is one field viz. Act i.e. Actual start: Execution (date). My requirement is to display PR date in this field. Besides this, Actual finish: Execution (date) should also get updated depending on the Duration field.
    I searched all the exits in the package 'CN' and 'CORU', but none of them seems to be useful
    Please suggest a user exit/BAdI which could help resolve this.
    Thanks in advance

    Hi,
    That BADI would trigger when you change any thing on the WBS and hit save.
    WORKORDER_UPDATE-for network
    Regards,
    Himanshu

  • BADI for Updating work order component data

    Hi,
    I need to update the field special stock indicator for the work order component data when it is saved. I am using the BADI WORKORDER_UPDATE for the same, but when I implemented the ZWORKORDER_UPDATE_IM using the standard defenition  WORKORDER_UPDATE , the code does not allow me to change the it_component internal table belonging to the BEFORE_UPDATE method. Could you please help me in this.
    Basically if we are implementing a standard defenition how to change the parameters of the methods in it.
    Regards,
    Prabaharan.G

    Hi ,
    It is giving the below dump. The parameter is importing parameter and it does not allow to change even using field symbol. Is there any other way. Is there an user exit which will be called when pressing enter button in component screen. The exit EXIT_SAPLCOBT_001 did not work for this.
    Error analysis                                                                     
        The program tried to assign a new value to the field "<F_FS1>" even though     
        it is protected against changes.                                                                               
    The following objects are protected:                                           
        - Character or numeric literals                                                
        - Constants (CONSTANTS)                                                        
        - Parameters of the category IMPORTING REFERENCE for functions                 
          and methods                                                                  
        - Untyped field symbols to which a field has not yet been assigned             
          using ASSIGN                                                                 
        - TABLES parameters if the corresponding actual parameter is protected         
          against changes                                                              
        - USING reference parameters and CHANGING parameters for FORMs if              
          the actual parameter for this is protected against changes    
    Regards,
    Prabaharan.G

  • User exit/BADI for updating Purchase Order Item

    I am would like to update the purchase order item - specifically field EKPO-REPOS in a user exit or BADI. I haven't been able to find one that allows you to update the purchase order item.
    Any input would be appreciated.
    Derick

    You can use BADI ME_PROCESS_PO_CUST for you requirement
    Method PROCESS_ITEM
    * Retrieve item data.
        CALL METHOD im_item->get_data
          RECEIVING
            re_data = v_data_item.
    Do you validations and changes here
    *update changes
    CALL METHOD im_item->set_data( v_data_item ).

  • BADI for Me21N - Condition types

    Hi All,
    wat ever condition type given in the header should be copied to all the items in the item level. then they want to change the condition type at item level for one or two items rest all are same like header condition types.
    see we have a condition type optioned as header as well as item condition type So I have given this condition type in the header of PO . It will be automatically copied to all the items in the item level
    right
    Now for a selected item like let suppose third item i want to delete one condition type and want to give a new one for this it is not allowing me
    Is there Any BAdI / Screen Exits which will allow me to copy the header condition type to all the items in Me21N and also it should allow me to Delete or modify that in the Item level
    Awaits for the reply  .......................
    Its a high priority ticket
    Pls Respond
    Thnx in Advance
    Regards
    KAMAL

    Hi Kaml ,
    have u checked with ur functional pplz abt the possibility of doing it thru Config ?, i think they can do some value addition in this .
      if you want to access those condition data u can  try  in these user exits but i'm not sure whether they can help u out in this requirement.
    SPRO->MM-->Purchasing >Conditions->Enhancements.
    regards
    Prabhu

  • Am I correct to say there's no BAPI/BAdI for updating an MSEG extension ?

    SAP allows you to append to MSEG in dictionary, although many customers agree this is not a good thing to do.
    But suppose your customer has decided to extend MSEG.
    As far as I can tell, SAP does not allow update of this extension via any of its BAPIs or BAdIs.
    My reason for claiming this is that:
    1) MSEG is received "importing", not changing, by the screen-handling interface  IF_EX_MB_MIGO_BADI that allows you to put a custom tab on MIGO
    2) MSEG is received "importing", not changing, by the standard MIGO update interface BAdI  IF_EX_MB_DOCUMENT_BADI.
    3) There are 79 flavors of Goods Movement BAPI, and so far as I can tell, none of them have "extension" capability (like the PR or PO BAPIs.)
    Do you all agree that:
    there is no way to update the custom portion of an MSEG record using an SAP provided BAPI or BAdI.
    If you disagree, please point me to the BAdI or BAPI that does this.

    Also, please note that extension capability, even in CREATE mode, is only available in a "new-style" BAdI, and therefore only at level ECC6 or above - this is spelled out specifically in Note 906314 - where it indicates that the BAdI is a "new-style" BAdI.
    So at ECC5, there is no extension capability for MSEG in any BAPI or BAdI, and at ECC6, it is still an open question in my mind as to whether there is extension capability in change mode.

Maybe you are looking for

  • Can't log in with old account

    I've had an account on technet for several years now. Today when I tried to use it, it told me that I was using the wrong password. I used the password finder, but it just confirmed the username and password that I had entered. I even copied and past

  • How do I get the Converting to Adobe PDF process to stop hanging?

    I installed Adobe Acrobat 8 Professional on a machine running Windows 7 Professional 64bit.  I have tried creating PDFs from MS Office files (using the Acrobat PDFMaker toolbar).  I have also tried printing to Adobe PDF, from within MS office but als

  • How to update the Input message data in OSM

    hi, I am using OSM 7.0.2. can we update input message data before the orchestration execution. I want to add some more order line item to the input xml by calling some external webservice. Suppose CRM submits order with 3 order line item. Now once we

  • Extracting and Loading XML document

    We need to extract and load an XML document into the database For e.g. <ROW> <EMP_ID>1</EMP_ID> <EMP_NAME>SSK</EMP_NAME> <RESUME> Resume of sssk </RESUME> </ROW> We need to load emp_id, emp_name to emp_id, emp_name field in the database and <RESUME>

  • How to i18n your html title?

    Hi guys, I was trying the following: <html>      <head>      <title><h:outputText value="#{main_msg['title']}" /></title>      <link rel="stylesheet" type="text/css" href="css/stylesheet.css"/>      </head> and I got the following exception: javax.se