Doc Change Badi

Hi All,
Doc change badi is triggered twice. Once with old values and once with new values.
How will I know when this badi is for new values. Is there any attribute showing the values are edited.
I want to know this for item check badi also as i want to validate badi for the new values and not for the old values of the fields.
Thanks.
Edited by: santosh.p on Jan 30, 2012 7:50 PM
Edited by: santosh.p on Jan 30, 2012 8:05 PM

Hi santosh,
As I konw, the imported internal table for items only contains the changed items.
You can try to use FM 'BBP_PD_SC_GETDETAIL' to get the last changed item data, then compare them.
Hope this can help you!

Similar Messages

  • Doc change badi when storage loc change

    Hi
    How can i trigger doc change badi whenever storage location changes?
    Thanks
    Joe

    Hi,
    The Doc Change BADI will get triggerred automatically before saving the document (Create / change operations).
    So, irrespective of any data change, this BADI will be triggerred automatically (provided if implemented and proper filters are set).
    Hope this clarifies your query.
    Regards
    Kathirvel

  • PO Held:On activating BUS2201 filter in the Doc change BADI implementation

    Hello All,
    I am facing an strange issue with SRM Local POs while using the BADI : BBP_DOC_CHANGE_BADI for Local POs. We are using SRM 5.0 version with extended classic scenario and the service POs are created directly when the SC is completely approved i.e. without the 'Sourcing Cockpit' step.
    The BBP_DOC_CHANGE_BADI implementation needs to be enhanced with BUS2201 filter for introducing custom changes in the SRM Local PO. This implementation is currently active in the system with other filters.
    However, whenever the implementation is enhanced with the BUS2201 filter, after ordering the service SC the SRM PO goes strangely in the held status ! If the filter is removed, the SRM POs are created successfully without going in held status.
    On checking the PO in the SRM Portal the error thrown is "Select a location to which a plant has been assigned" and when checked on the BBP_PD it is found that the Partners data is altogether missing on the SRM PO!!
    What could be the possible resolution for this issue? What could be done to get the BADI implmentation working with BUS2201 filter activated ?
    Any pointers/suggestions/comments towards this direction are more than welcome!
    Best Regards.
    Khaja.

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Quotation number in DOC CHANGE

    I have  impolemented DOC CHANGE BADI to default the attributes maintained for the selected vendor. (BBP_QUOT_BOB)
    i have put the code in method BBP_QUOT_CHANGE.
    I used FM BBP_PD_QUOT_GETDETAIL to get the partner number , by passing the guid of the header level .
    Instead to giving the relevant bidder, it fetches all the bidders who placed the bid. ..
    I think it is bid guid instead of quotation guid?
    I need to single out the selected vendor , from  export internal table for the partner..
    Any inputs on this?

    Hi,
    Function module BBP_PD_QUOT_GETDETAIL gets only one quotation with only one partner.
    In table E_PARTNER you have Bidder with all corresponding Contact Persons.
    Basing on field PARTNER_FCT you can read Bidder or CP.
    value 00000018 for PARTNER_FCT corresponds to Bidder
    value 00000017 for PARTNER_FCT corresponds to Contact Person
    Regards,
    Marcin

  • In DOC CHECK BADI: Check if PO has a SC when coming from a BID

    Hi Experts,
    Please consider this situation and recommend best possible approach.
    From Sourcing, I raise a BID and then create a PO from the BID.
    While PO creation, I need to check if this PO had SC and if so include the SC requestor in the approval if the price has increased while Bidding when compared the created SC.
    Here I am facing a challenge - When executing the DOC CHECK BADI, the FM: BBP_PROCDOC_GETDETAIL does not result any HEADER_REL itab values that shows any history details of the PO document. Whereas by the time the logic moves to the Workflow BADI, this same FM returns values (SC and other details).
    My Query: While creating from a BID, How can I check if this PO is generating out of a SC in the DOC CHECK BADI.
    Thanks in advance.
    Vj

    Hello Asha,
    You can check this BADI "BBP_ITEM_CHECK_BADI" and this badi is called when
    u2022     a new item has been created,
    u2022     an item has been changed or the document is to be checked
    Regards
    Sameer

  • Multiple Insert in Doc Save Badi when publishing Bid Invitation

    Hi to all experts,
    Currently i need to track changes in bid invitation. What i did is using doc save badi to get the value (bbp_bd_bid_getdetail) and compare them with the value i save in a cutom table.
    Then the problem come in. Even if there is no changes, the badi will still cause an insert into my custom table. I used the debugger to go through the code and it never go to my insert statement.
    However once i finishing running the dubugger, my custom table will have a new entry...
    Why is this happening? IS it due to the different GUID in the bid invitaion?
    Points will be awarded generaously, thanks again for reading.

    Hi Disha and Marcin,
    Thank you so much for your prompt replies. I have awarded points. We are using SRM 5.5.
    Correct me if I am wrong, I have thought of using the doc_change badi but how do I confirm the changes should user cancel the transaction?
    Hi Marcin,
    I am new to this term LUW, please elaborate more on this.I have checked and confirm no other program or badi called my function modules.
    I have suspected that the badi was called n-times and insert a line into my custom tables. I tried using modify in place of insert so that such problem can be avoided but this was not successful with saving longtext.
    What I notice is after the system undergo a patch, the doc save badi started to behave in this way?
    Please kindly advise, all SAP experts! Thank you!

  • FPE2 doc changes are not saved when C4EYE is reset via workflow

    Hello All,
        I'm utilizing event # 5504 in FQEvents (in FICA) to start a workflow.
    When a user sets a payment method in FPE2, I set the C4EYE and then explicitly create a custom event which starts my approval workflow. On saving the document changes, I get a message "document changes noted" (instead of the usual "document changed" message).
    The changes made in FPE2 are only seen as a 'planned change' button in FPE2 (on the 'change item' screen) with the old and new values and the change number associated with it. Also, the check reason has been applied. Incidentally, all of the above (except ofcourse the event and start start of workflow ) happens if I all I do is merely set the check reason (C4EYE) in event 5504.
    Meanwhile, the workflow does its thing, determines agents and gets the approval and on approval, it calls  FKK_C4EYE_RESET passing the document # and change # to reset the Check reason. Despite the workflow completing successfully and resetting the check reason, my newly added changes (such as the payment method etc) are blank - meaning any changes made in FPE2 have been lost. I don't have the 'planned change' button either.
    Incidentally, to eliminate any problems with the custom-event-workflow logic, I also turned off the event and the workflow - just left the logic to set the C4EYE check reason to '01' in the 5504 fqevent in case a payment method is set. I set the payment method in FPE2 and 'saved' the change which set the check reason.
    I then ran FM FKK_DOCUMENT_CHANGE_FROM_ID passing the doc #, change number (from CDHDR) and user name. All it did was to reset the check reason but did not set the payment method (or any other changes) back.
    How can I apply the FPE2 changes (including addition of the payment method) back once my approval workflow resets the check reason?

    Folks, Sorry to have bothered you. The document change had multiple change numbers for each of the changes and I was apparently passing the incorrect CDHDR change number to the FM "FKK_DOCUMENT_CHANGE_FROM_ID" which caused it to not reset the changes. Now, I'm able to see the payment method and any other changes restored back once the C4EYE is reset.
    Thanks for your time!!

  • Trigger change badi when click a custom button

    hello guys i want to trigger the change badi when a user clicks on a button.  Any help would be create?
    I am using the set change by client setting it to true and then firing the refresh but it is not working?  Any clues?  Thank you.

    As I told you in that linked thread, I'd suggest trying to use SET_CHANGED_BY_CLIENT method on the context of your webdynpro. This is sufficient to make the system aware of a change and trigger the CHANGE badi.
    As far as I've observed doing my tests, the CHANGE badi is then triggered after an event that will follow the SET_CHANGED_BY_CLIENT execution.
    So I'd suggest two test:
    - pre-exit of the method you trigger when the user press your custom buttom: set_changed_by_client and then execute your code. See if the badi is then triggered;
    - if not: you could "force" a subsequent action after the button press, for example, a simple REFRESH of the view. Then I'm sure that, after the set_changed_by_client method, the badi will surely be triggered.
    Please be aware that I'm absolutely NOT a guru on these arguments, so I'm trying to give you some workarounds I implemented on an SRM 7 system. Probably some guru will have better and cleaner solution for your task, but as far as I've seen, these ones should meet your needs.

  • Looking for change BADI in CRMD_ORDER tcode

    Hi,
    I have a scenario in CRMD_ORDER, when user changes quantity for an existing Sales Order a BADI should trigger. I should do some validations at item level and display error message.
    I tried CRM_ORDERADM_I_BADI and CRM_SALES_BADI . they didn't work as needed.
    I'm looking for a which should trigger for each and every click of a change BADI. The change can be on any tab.
    Thanks,
    Lalitha.

    Hi Lalitha,
    Please take a look at the vision CRMV_FIELDCHECK thru transaction SM30.
    Into this vision, you can assign a customized Function Module for a specific field of transaction order.
    I hope it helps.
    Regards,
    Gabriel Santana

  • What is, "Portrait Displays" displayed: "version changed bad license file".

    Monitor: w2207h. Nvidia GeForce 8300GS 128MB graphics card. a6437c #KJ400AA-ABA. Vista Home Prem 64 bit. [email protected] 4GB memory. New July 4, 2008. Sam's Club.
    Uninstalled "My Display" (display driver), per advice this forum in '08 or '09.
    Guessing this driver enables landscape/portrait display swith when monitor rotated. Don't know what else.
    Thanks in advance
    Dean2011
    [email protected]

    Hi,
    Go to NVIDIA and download and install the latest NVIDIA video driver.
    Go into the Control Panel  ---> NVIDIA Control Panel and locate the rotate display function.
    If the above solves your issue except for the message issue then I would delete out the Pivot software.
    The "version changed bad license file" message sounds like this issue. 
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • Problems in method IF_EX_ACC_DOCUMENT~CHANGE - Badi BADI_ACC_DOCUMENT

    Hi experts,
    im trying to enhance badi BADI_ACC_DOCUMENT method Change in order to change some document items using table extension2 thru bapi.
    Im trying to understand example code to this method but im not understanding it right.
    According to the code we shoud transfer in table extension at least one structure name, accit in my case, POSNR , item number and the the fields taht we want to change but im not getting it...
    Bellow goes the example code:
    LOOP AT c_extension2 INTO wa_extension.
        AT NEW structure.
          CREATE DATA l_ref TYPE (wa_extension-structure).
          ASSIGN l_ref->* TO <l_struc>.
        ENDAT.
        CONCATENATE wa_extension-valuepart1 wa_extension-valuepart2
                    wa_extension-valuepart3 wa_extension-valuepart4
               INTO ext_value.
        MOVE ext_value TO <l_struc>.
        ASSIGN COMPONENT 'POSNR' OF STRUCTURE <l_struc> TO <l_field>.
        READ TABLE c_accit WITH KEY posnr = <l_field>
              INTO wa_accit.
        IF sy-subrc IS INITIAL.
          MOVE-CORRESPONDING <l_struc> TO wa_accit.
          MODIFY c_accit FROM wa_accit INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
    My problem it's that is giving me a dump in 
         MOVE ext_value TO <l_struc>.
      code.
    Im transfering the Accit in structure name and in the valuepart components im trying to transfer 'POSNR' '00001', only for testing but the dumps occurs. What shoul i transfer in Extension2 table?
    Can anyone help me in this subject?
    Thanks in advance
    Best Regards
    João Martins

    Hi joao,
    If you are passing the structure name (C_EXTENSION2-STRUCTURE) as ACCIT, then the concatenated value of VALUEPART1, VALUEPART2, VALUEPART3, VALUEPART4 (of C_EXTENSION2) should be similiar to the structure of ACCIT.  The error you are getting is due to mismatch structure fields.
    The way I implemented this BADI is
    - Create a custom structure with fields (which may need to be updated through BADI), field POSNR (type POSNR_ACC) should be mandatory.
       Eg : Structure ZTEST with fields : POSNR type POSNR_ACC, BSCHL type BSCHL.'
    - While calling the bapi BAPI_ACC_DOCUMENT_POST, pass the records to EXTENSION2 structure as
       Structure name : ZTEST
       valuepart1         : 000000000115 (first 10 characters is POSNR and next 2 characters is BSCHL (posting key) which is to be  
                                   updated through this BADI).
    By using this method, the updation in BADI will be dynamic upto some extent (for the fields available in Z structure).  Care is to taken while populating the fields VALUEPART1, VALUEPART2, VALUEPART3 & VALUEPART4, which should be in sync with the data declaration in custom structure.
    Regards, Vinod

  • Updating Item Description in Lead Change Badi(ORD..ADM_I  and ORDERSAVE)

    Hi
    I have to update Item(Product/Product category) Description in Lead duriing Creat/Change.
    1..I can't do same in CRM_ORDERADM_I_BADI as Ited Guid is geting created after coming out of this Badi...
    2..Also in ORDER_SAVE BadI~CHANGE_BEFORE_UPDATE does n't work as it has no export params...
    ALso tried CRM_INTLAY_put_DATA ,But this adding more lines..
    DO we have any way to update the Item(product) description in Memory....in CHANGE_BEFORE_UPDATE method..
    Thanks in Advance...

    Hi Frédéric,
    Finally I got it..ADM_I create is triggering for each line addition...
    But ADM_I change is not triggering on change of same line...
    But Item product obj - change event is triggering on change of item/product.
    Thank you for continous help..
    These 2 together ,I got the solution...
    Trans. Category BUS2000108   Lead
    Execution Time  10    End of Item Processing
    Priority        5
    Object Name     ORDERADM_I                       Administration item
    Event           AFTER_CREATE
    Attribute       <*>
    Function        ZGD_CRM_ON_CREATE_LEAD_I
    Trans. Category BUS20001     CRM Bus Transactions
    Execution Time  1     Immediately
    Priority        1
    Object Name     PRODUCT_I                        Item product data
    Event           AFTER_CHANGE
    Attribute       <*>
    Function        ZGD_CRM_ON_CHANGE_LEAD_I
    Cheers
    Prasad
    Message was edited by: Ranganatha Prasad Kurupati

  • CRM IC product change BADI

    Hi Frendz,
    I got struck with the product details change when i navigate through IC WC.
    Does CRM have BAdi link with IC WC to change product details at run time.
    tks,
    Macs.

    It is called from below function module.
    CRM_PRODUCT_I_MERGE_OW
    Thanks & Regards,
    Subba

  • Accounting Doc Change

    Hi
    Is there any function module to chage the accounting doc header and item data together? I Only want to change the editable fields that I can do through FB02. I will prefer to have a FM for that. Thanks for ur help.
    Chinmoy

    hi,
    have3 a look here:
    Function module for FI document change with G/L line items
    A.

  • Changing BADI properties

    Hi,
    Can I change properties of existing BADI?
    Suppose, for an existing method of an existing BADI, can I add more parameters?
    Does it effect existing functionality?(I think NO)
    When I try to change the BADI proprties, it is asking for ACCESS KEY.
    Thnx,
    Shivaa.

    Hi Aparna,
    You mean we cant change the BADI definition in SE18. But, rather we can change the parameters in our own implementation of the BADI in SE19.
    Please correct me, if Iam wrong.

Maybe you are looking for

  • Every now and then my SEND button for texts is greyed out and unfunctional

    I'll be texting someone just fine then suddenly the SEND button freezes up and doesn't allow me to continue the conversation. Anyone else? Thanks

  • Purchased movies suddenly won't play

    I have purchased a bunch of movies a few months ago and they would play fine whenever, then all of a sudden yesterday and today no movies will play. Every time a music playlist gets to a music video it freezes and closes and every time i try to play

  • Creating custom lookup triggers - Is it possible?

    Hi, Can we create our own custom Lookup trigger something similar to " Lookup.USR_PROCESS_TRIGGERS" ? I wanted to create a lookup for a Form (UD_*) . Or can it be done for any other proceess or table ? Is it possible ? Any guidance would be really he

  • FIX FOR SOME IPODS!!!

    This fix came from Caspar (Thank you SOOO much!). It took me 10 minutes to do this and now my beloved ipod nano is back! Hopefully this will help some of you: Original Problem: Updated iTunes(6.0.5) and iPod nano (1.2). After the update, iTunes would

  • Why can't I download photos from ipad to facebook?

    why can't I download photos from ipad to facebook?