Preventing re-pricing in CRM for document created in MSA

Hi All,
I am trying to prevent a document (specifically a quotation) that was created in MSA being re-priced in CRM as we have differences in the pricing, specifically user exits for field catalogs which result in errors in the pricing if it is redone in CRM.
As I understand this, you should be able to control this by implementing the BADI CRM_30A_USER_EXITS Method USER_EXIT_UPLOAD_SALESDOC and set the Pricing parameter to 'A' in structure BAD_BUS_TRANSN_MESSAGE-ACTIVE_SWITCH.
However, even after implementing the code below, pricing is still re-determined in CRM, if I look at the mBDOC in TR SMW01 the entries that I wrote into the ACTIVE_SWITCH table in the BADI are not present.
Any help with this would be greatly appreciated, I've been tearing my hair out for a day and this is a major problem on our project.
Many thanks
Jason
Data declarations
  FIELD-SYMBOLS: <fs_sdgen_object> TYPE /1crmg0/sdgen_object01,
                 <fs_active_switch> TYPE bad_active_switch_mess.
  DATA: lt_fields_active TYPE STANDARD TABLE OF smog_sfldn,
        wa_fields_active TYPE smog_sfldn,
        lt_ddfields TYPE STANDARD TABLE OF dfies,
        wa_ddfields TYPE dfies,
        lv_sfavbak TYPE smo_sfavbk,
        lv_auart TYPE smo3auart,
        lv_sendbits TYPE smog_sinc-sendbits.
  CONSTANTS: lc_active_struct TYPE smog_sname VALUE 'BAD_ACTIVE_SWITCH_MESS'.
Get the order details
  LOOP AT salesdocgen_write-sdgen_object[] ASSIGNING <fs_sdgen_object>.
    lv_sfavbak = <fs_sdgen_object>-sfavbak.
    lv_auart = <fs_sdgen_object>-auart.
  ENDLOOP.
Check the order is relavant for pricing - THIS SHOULD BE CHANGED TO A CONFIG TABLE
  CHECK lv_auart = 'ZD01' OR lv_auart = 'ZD02'.
Get the active switch details
  LOOP AT bus_trans_msg-active_switch[] ASSIGNING <fs_active_switch>.
Get the table structure
    CALL FUNCTION 'DDIF_NAMETAB_GET'
      EXPORTING
        tabname   = lc_active_struct
      TABLES
        dfies_tab = lt_ddfields
      EXCEPTIONS
        not_found = 1
        OTHERS    = 2.
    LOOP AT lt_ddfields INTO wa_ddfields.
      CLEAR wa_fields_active.
      wa_fields_active-fieldname = wa_ddfields-fieldname.
      wa_fields_active-position = wa_ddfields-position.
      INSERT wa_fields_active INTO TABLE lt_fields_active.
    ENDLOOP.
Fill Sendbits
    CALL FUNCTION 'SMO_SNDBITS_SETX'
      EXPORTING
        structurename       = lc_active_struct
      TABLES
        sfields             = lt_fields_active
      CHANGING
        sndbits             = lv_sendbits
      EXCEPTIONS
        structure_not_found = 1
        wrong_fieldname     = 2
        OTHERS              = 3.
    CHECK sy-subrc = 0.
Switch off the pricing
    <fs_active_switch>-sendbits = lv_sendbits BIT-OR <fs_active_switch>-sendbits.
    <fs_active_switch>-ref_guid = lv_sfavbak.
    <fs_active_switch>-pricing = 'A'.
    <fs_active_switch>-task = '2'.
   MODIFY bus_trans_msg-active_switch FROM <fs_active_switch>.
    APPEND <fs_active_switch> TO bus_trans_msg-active_switch.
  ENDLOOP.
ENDMETHOD.

Hi,
I am quite sure that there is no need to do this in some BADI but on customizing level itself (depending on process type or pricing determination), at least for 4.0.
Regards,
Wolfhard

Similar Messages

  • How to create a block key default for documents created by MIRO?

    Hi All,
    How to create a block key (BSEG-ZLSPR) default for documents created by MIRO?
    Could anyone tell me?
    Thanks
    Gandalf

    HI,
    The payment block--BSEG-ZLSPR can be made defaulted by two  ways.
    Means you want to fix one value all the times for the same ,you have to do the same in Vendor master
    ie in the Vendor Master in the Payment Transactions Selection screen. make the Payment Block you want to be defaulted in MIRO.
    you can do for all vendor master in mass change -- XK99.(LFB1)
    if you are not OK with the Above .then there is another way to do the same
    it is by Screen layout setting in SHD0
    in this enter the Transaction MIRO and create a Transaction variant Z*** and click on create
    and also create a Screen variant in OMLRLIST 
    T code MIRO
    Screen variant name Z**
    Program-SAPLFDCB
    Screen Number 0020
    and create it .
    in creating ---enter the default value in the Payment block and in the varinat just check the box w.content
    KNow in SHd0 add this screen variant for the above Trasaction variant
    and then activate this trasaction variant by going into the tab Standard variants.
    so that when ever you do miro this variant will be called and you can get this payment block defaulted.
    hope so it helps
    Regards
    Anjanna

  • Creating a block key default for documents created by MIRO?

    Hi All,
    Could anyone tell me how to create a block key default for documents created by MIRO?  
    Thanks
    Gandalf

    Hi,
    I cannot find substitution field BSEG-ZLSPR in GGB1.
    My prerequisite is to check if SYST-TCODE = MIRO and unplanned delivery cost <> 0.
    How to define unplanned delivery cost field in the prerequisite. I cannot find the field name.
    You can see this field when you create MIRO, tab details.
    The purpose for my substitution is to block all unplanned delivery cost invoices.
    When I click on substitution the choices I got is only as below :
    BSEG  ABPER       Settl.Period
    BSEG  AUGGJ       Clrg Fiscal Yr
    BSEG  DOCLN       Line Item
    BSEG  FIPOS       Commitment Item
    BSEG  FISTL       Funds Center
    BSEG  FKBER       Functional Area
    BSEG  FKBER_LONG  Functional Area
    BSEG  GEBER       Fund
    BSEG  GMVKZ       Execution
    BSEG  GRANT_NBR   Grant
    BSEG  HKTID       Account ID
    BSEG  HZUON       Sp.G/L assgt
    BSEG  INTRENO     RE code
    BSEG  KSTAR       Cost Element
    BSEG  MEASURE     Funded Program
    BSEG  PARGB       Trdg Part.BA
    BSEG  PPA_EX_IND  Excluding/Includin
    BSEG  PPRCT       Partner PC
    BSEG  PRCTR       Profit Center
    BSEG  PRODPER     Prod.Month
    BSEG  PRZNR       Business Proc.
    BSEG  PSEGMENT    Partner Segment
    BSEG  SAMNR       Collect.inv.
    BSEG  SCTAX       FI-CA Tax Portion
    BSEG  SEGMENT     Segment
    BSEG  SRTYPE      Addit.Receivab.
    BSEG  UZAWE       Pmt meth.supl.
    BSEG  XREF1       Reference Key 1
    BSEG  XREF2       Reference Key 2
    BSEG  XREF3       Reference Key 3
    BSEG  ZUONR       Assignment
    Can anyone help me ?

  • I'm experiencing major synchronisation issues on ICloud, especially for documents created on my Mac in pages, keynote and numbers. Contacts and agenda items work fine. I checked all my account settings.

    I'm experiencing major synchronisation issues on ICloud, especially for documents created on my Mac in pages, keynote and numbers. Contacts and agenda items work fine. I checked all my account settings. But while I can upload documents from my MAC onto ICloud, they don't show on my IOS devices (whereas previously this worked without issues).

    On this Mac I did move all the visible iCloud documents out of iCloud, into another folder, then disabled syncing, exactly as you suggested.  But there were, apparently, documents remaining in my Mac's local iCloud store, "~/Library/Mobile Documents/" that I could not see (so could not remove). The Pages file "CSU-PD-UN1.pages" was one such document.
    The act of disabling iCloud's document sync'ing, in System Prefs, just renames the local "iCloud" store to "~/Library/Mobile Documents/<appleid#>/" effectively shielding the it from the sync'ing mechanism.  Looking at this renamed folder (the screenshot above) revealed that "CSU-PD-UN1.pages" (and other files) had not been removed; it would be reasonable to assume that one, or more, of these "undeletable" files were related to my original problem, and when I re-enabled doc sync'ing, those bad files would just clog up the works again.
    So I deleted them with the Finder on both Macs (the other Mac had bad files too, but different ones), then re-enabling sync'ing on the two Macs and doc sync'ing between the Macs (and iCloud.com) appears to now work as intended.
    Sadly, iOS devices (iPhone and two iPad) now do not sync at all.  Newly created documents do not migrate to any other devices, and documents on other devices do to migrate to the iOS devices.
    Your suggestions have certainly done some good, but something is now keeping my iOS devices out of the the iCloud doc sync'ing process.  I suspect it's a similar problem as the Macs had ("invisible" files gumming up the works), so I'm going to apply some nasty tricks to explore the iOS devices file system and see if I can find them, and delete them by brue force.

  • Problem in delta changes from ECC to CRM for Customers created in CRM systm

    Dear all,
    I am replicating customers between CRM and ECC and vice versa. The Delta changes are replicating from CRM to ECC system, but not happening from ECC to CRM system.
    I have created some customers in CRM system and changed some address data, those changes are perfectly updating in back end ECC system.
    But when I make some changes for the same customer from ECC system, those changes are not updating back in the CRM system.
    I could not get the problem where exactly is coming. I request your expertise to help me in resolving this issue. I believe all middleware and pide settings are correct.
    Your suggestions are highly appreciated.
    Best regards
    Raghu ram

    Hi Shanthala,
    Thank you very much for your prompt response, I have checked Customer_main adapter object in R3AC1, no filter has been found there.
    and in R3 table TBE31, I could not find entry for CRS_CUSTOMER_COLLECT_DATA for APPLK = BC-MID.
    As well in CRMRFCPAR table I could see X assigned to field named with 'In Queue Flag', but I could not find DISCARDDAT for CRM (User) settings.
    Kinldy help me to resolve the issue.
    Your suggestions will be highly appreciated.
    Best regards
    Raghu ram

  • Number range for document created through transaction MR11

    Hi All
    I am using transaction MR11(Maintain GR/IR clearing account).I want to know where we configure the number range for the document which gets created on posting through transaction MR11.

    HI,
    SPRO --> MM -->LIV --> Clearing Account Mainteance --> Maintain Number assignment for Account Maintenance Document --> Maintain Number Range for Account Maintenance Document - Tcode - OMRJ or check in OMR4
    Regards
    KK
    Edited by: Kishore Kumar Galla on Mar 24, 2010 3:30 PM

  • Split criteria for document creating

    Hello Gurus,
          if I want to split a document (such as delivery document) into several target documents (such as billing documents), where can I set this split criteria ?
    thanks very much!

    Hi Bo,
    Basically, all fields which are copied to the header of the delivery (table LIKP) via the routines of the copy control lead to a delivery split. Furthermore, some fields are copied to the header by all means and are relevant for the split there.
    Split fields that cannot be changed are:
    VSTEL     Shipping point
    KUNNR     Goods recipient
    ROUTE     Route
    The following split-relevant fields can be affected via the copy control, however, they should not be filled differently from the defaults since they are necessary for the control of the shipping process:
    VKORG     Sales organization
    AUTLF     Full delivery indicator
    VSBED     Shipping condition
    FKARV     Billing type (customer billing document)
    LIFSK     Delivery block
    STAFO     Update group for statistics
    STWAE     Statistics currency
    KKBER     Credit control area
    KNKLI     Account number of the customer with the credit limit default
    GRUPP     Customer credit group
    SBGRP     Processor group for credit management
    CTLPC     Credit management: Risk category
    CMWAE     Currency key of the credit control area
    WAERK     Currency of the sales document
    INCO1     Incoterms 1
    INCO2     Incoterms 2
    KZAZU     Indicator order combination
    KDGRP     Customer group
    PERFK     Invoicing dates (calendar identification)
    In the table with delivery header data LIKP, there is the field ZUKRL. which can be filled with any values by using copying control. The contents of this field act as a splitting criterion during delivery creation.
    If you have access to SAP Market place, then you can review the below SAP Notes:
    546668     FAQ: Delivery split when creating deliveries
    355404     Why was there a delivery split during creation?
    Hope this helps you,
    Regards
    Nikhilesh

  • No quicklook/preview for documents created with Pages 5.5!

    Before opening files and find you can hit the spacebar and have a preview of most of the file types.
    This always worked well with Pages until the newest version 5.5. Now I can only preview the files created with older versions of Pages.
    Every file created with the new version only shows the icon or a very blurred image but not a readable preview of the file itself like before. Even worse, if you change a file with Pages 5.5 you also can't see a preview any more.
    Apple's telephone hotline had no solution.
    Any idea for a solution would be very helpful as my DevonThink database also uses the preview feature and opening any file before being able to have a quick look on it is really annoying.
    Has anybody experienced this problem?

    There's no preview on iPad or iPhone either for these files. You can't see the content in DevonThink to go.

  • Search for documents created "today"

    There used to be a "today" button to use when I want to find a document to attach to an e mail, but the button is now gone.   "Yesterday" is still there.   How do I get "today" back?
    nancy

    What you're not seeing is that a smart folder or saved search is not actually a Finder object.  a normal Finder window is a visual representation of an actual directory of files on the disk; a smart folder is a Spotlight search that is mocked up in a Finder window to look like a folder.  Think of it like this - if you need to get everyone on some committee to sign a document, and you go to a committee meeting to get the document signed, you'll have no problems if it's a normal committee meeting but you'll be utterly stumped if the all the members are telecommuting via skype.  the meetings may look the same from the outside, but you're really dealing with two entirely different kettles of fish.
    Applescript has lots of tools for dealing with normal directory structures, but doesn't (as of yet) have much support for 'virtual' folders like smart folders. 

  • While we create Sales order in CRM for Madhya Pradesh State JIVP (VAT Payable) showing twice in order

    Dear SAP,
    While we create Sales order in CRM for Madhya Pradesh State JIVP (VAT Payable) showing twice in order, but calculation has taken one time i.e. 14%, only JIVP displaying twice (Attached Screen shot S3.JPG) in CRM order, when comes to ECC side it is showing correct entry (Attached Screen shot S4.JPG) .
    Due to duplicate condition records exist in CRM table CNCCRMPRCUS956 (Attached Screen shot S1 & S2.JPG).
    This happens for MP state, as duplicate entry exist with MP state only,
    Please guide us to resolve the same.
    Regards,
    JK

    Hi JK,
    There is two thing. first is that when you create a sales order very same time pricing conditions added in the transaction as per the pricing procedure add for transaction type. these pricing procedures are transaction type specific not state or country specific so it will work. check here you are getting duplicate condition ?
    When ever you add material in the transaction that very time one the basis of the pricing condition added in the transaction IPC method do pricing. check after adding material in transaction duplicate condition is coming ?
    Secondly whenever the document replicates in ERP re-pricing again happening on conditions so theses conditions get corrected in ERP. Here if document is re-priced then system will consider it as change so again there suppose to be Bdocs get created from ERP to CRM again overwrite document so condition will be synchronized in CRM . I would request check the same too and revert.
    Thanks,
    Prem,

  • FM to count pricing data for document for todays date

    Hi
    I would like to find function module that will count pricing data for offer in CRM 5.0 and will store it in some internal table.
    it cannot change pricing data on document.
    I am writing module for comparing pricing data on document with these that pricing will give for todays date.
    Regards
    Radek

    not solved

  • Sales document created from CRM 4.0 needs to be updated from ECC 6.0

    Hello experts,
    When I create one sales document from CRM 4.0 this document is moved to ECC 6.0. But updating sales document from ECC 6.0 I receive message
                 "Process the original document in the CRM system"
    and updates are not moved to CRM.
    How could I avoid this ?
    Usually I need update some fields from ECC 6.0 and move the information to CRM.
    Regards
    Juan

    Hi Juan,
    Please check the Note 541113 - Data exchange scenarios for orders (CRM-R/3) in which as per your requirement its the scenario Z i.e you want some data to flow from ECC to CRM for which below are the settings that needs to be done to make it effective.
    Activation of the scenario in table CRMPAROLTP of the R/3 plug-in:
    PARNAME:   CRM_SCENARIO
    PARNAME2:  UPLOAD_ORDER
    PARVAL1:   Z
    Go to SM30 and give the table name and put in the above values.
    And if you want to make amutual change situation then proceed as follows:
    Settings in the CRM Server: Table SMOFPARSFA
               Key: R3A_SALES
               Parameter Name 1: INT_CHANGE_ORDER
               Parameter Name 2: <sales document type> , for example TA
               Parameter Value 1: Z
    Settings in the R/3 system: table CRMPAROLTP
               Parameter Name: CRM_SCENARIO
               Parameter Name 2: INT_CHANGE_ORDER
               Parameter Name 3: <sales document type> , for example TA
               Parameter Value: Z
    Hope it helps.
    Regards
    Sidd

  • Pricing procedure determination for complaint document with reference to billing

    Hello Guys,
    I am configuring complaint process for project purpose and I got stuck. I need to change the pricing procedure which is determined for complaint
    document . Right now the pricing procedure is copied from Billing Document for which complaint refers to.
    I am searching a place in configuration where I could change the pricing procedure determination for complaint document with reference to billing doc.
    Could you please advise where I can find it ?
    Thank you in advance!
    Br,
    Frederic

    Hello Frederic,
    I would check the following in SPRO:
    - CRM
    - Basic Functions
    - Pricing
    - Pricing in the Business Transaction
    - Determine Pricing Procedures
    Here the pricing procedure depends on sales organization, division, distribution channel, document pricing procedure and and customer pricing procdure.
    Best regards,
    Thomas Wagner

  • CRM Copy control: CRM_COPY_BADI for document relationship

    Hello!
    I need CRM copy control from an opportunity to another opportunity. The implementation of badi CRM_COPY_BADI should include document relationships: target document should be related to the same documents linked in the source document.
    I cannot find a method to do this.
    Please, could anyone suggest me a solution?
    Thank you.
    Kind regards.
    Elena

    Hello Elena,
    Please follow the steps below:
    1) Go to transaction CRMV_EVENT
        Click on "Object Function/Callback" button
        Create a new entry with following values:
        Function Module: ZCRM_DOCFLOW_COPY_EC
        Object Function: CRM_DOC_FLOW
    2) Go to IMG Path: Customer Relationship Management -> Transactions -> Basic Settings -> Edit Event Handler Table :
    Here create a new entry with the following details
    Trans. Category       BUS2000111     Opportunity
    Execution Time        1                                Immediately
    Priority                    99
    Object Name            ORDERADM_I                       Administration item
    Event                       AFTER_CREATE_WITH_REFERENCE
    Attribute                   <*>
    Function                  ZCRM_DOCFLOW_COPY_EC
    Perform Function for Doc.Header = "Checked"
    Perform Function for Document Item = "Checked"
    Call Callback = space
    3) Create function module ZCRM_DOCFLOW_COPY_EC with the following signature:
    *"  IMPORTING
    *"     REFERENCE(IV_STRVAL_OLD) TYPE  ANY OPTIONAL
    *"     REFERENCE(IV_STRVAL_NEW) TYPE  ANY OPTIONAL
    **Code:
    DATA:
      FIELD-SYMBOLS:
              <ls_orderadm_i_wrk>  TYPE crmt_orderadm_i_wrk,
              <lu_orderadm_i_wrk>  TYPE crmt_orderadm_i_wrk.
      ASSIGN iv_strval_new TO <ls_orderadm_i_wrk>.
      ASSIGN iv_strval_old TO <lu_orderadm_i_wrk>.
    4) Now in this function module you can read the docflow of old opportunity (<lu_orderadm_i_wrk>) using 'CRM_DOC_FLOW_READ_OB'
    Build the new docflow entry for the new opportunity and call 'CRM_DOC_FLOW_MAINTAIN_OW'
    Please let me know if any questions.
    Thanks,
    Sandeep

  • Pages 5.5.1: When opening a document created with Pages '09 (Version 4.0) with Pages 5.5.1 the page header and the page footer are deleted. How can this be prevented? Or is this a bug in Pages 5.5.1?

    Pages 5.5.1: When opening a document created with Pages '09 (Version 4.0) with Pages 5.5.1 the page header and the page footer are deleted. How can this be prevented? Or is this a bug in Pages 5.5.1?

    Same problem here (no graphics in header or footer) and the problem has been reported months ago. It is another bug/feature lost when Apple moves from 09 to the iCloud-compatible versions.  Complain to Apple, you may have better chance than me and they may finally listen to their users....

Maybe you are looking for

  • Can not open selfcreated profiles in mobilemail 3G.

    Hi there. I created a profile for our university network, using wpa2 enterprise and PEAP. Everything should work just fine, but everytime I try to send the profile on my iphone via mail, I'm not able to open the attached profile. The german errormess

  • How do i know everything has been successfully backed up before i Reset all setting on ipad

    I need to reset the ipad as some Apps are playing up. i have backed everything up to iCloud (had to purchase extra stroage), am i okay to just hit Reset all Settings?   It's my daughters ipad and she's worried i'll loose everything!!

  • Red screen and freeze... huh?

    I was happily viewing a simple .mov file before, when the computer suddenly froze and a red curtain came down from the top of the screen (not solid... but making everything on my screen tinted red). Little spinning wheel... everything else frozen. On

  • Recovering music library after restoring iPod Touch

    My uncle bought a used iPod Touch, which came with a bunch of music on it.  At some point, it froze on him, and he restarted it, and then restored it.  At that point, he lost all that music.  He is hoping to get it back.  I told him that the music is

  • S_ALR_87012357 Reverse

    Hi All, We have updated the documents for Dec 2010 and a document is also posted in tcode S_ALR_87012357. Now we have realized that there are few more documents with taxes to be posted in Dec 2010. Hence, we would like to nullify the effect of the pr