BADI for BP open (display or change mode) event

Hi,
When a user opens a BP (via BP transaction or open method of BOR object) in CRM, I want to do some custom check. Based on the check, I want to decide whether this user is allowed to open this BP or not. If this check fails, I want to display an error message (No authority to display this BP). Only if the check is successful, that BP should open.
Any idea where can I write this type of code?
I checked a few BADIs (BUPA_LOCK, HRSYNC_P etc.), but didn't find anything useful.
Regards,
Kaushal

Kaushal,
For transaction BP in CRM we need to do the following(this won't work in the PCUI).
1. Create a new class that implements: IF_BUPA_DIALOG_JOEL_EXIT
2. Create a new function group that has a subroutine called bupa_dialog_joel_exit_create which is coded similar to the subroutine in function group BUPA_DIALOG_JOEL, but calls the class you created in step 1.
3.  Implement the method IF_BUPA_DIALOG_JOEL_EXIT~CAN_CHANGE_PARTNER in your new class.
4.  Add Z-entries to the application tables below that will reference the new funciton group created above.
TBZJ4 -> V_TBZJ4
TBZJ4C -> V_TBZJ4C
The class CL_BUPA_DIALOG_JOEL_EXIT is an example of the implemented class.
This enhancement mechanism should allow you to do want you want to do and at the right timing in the BP transaction.
Good luck,
Stephen

Similar Messages

  • Header net value different in display and change mode in Sales Order.

    Hi All,
    I am facing a strange problem. When I check an order in display mode, I can see the header net value as 120047 Euro.  However, If I open the order in change mode, it shows value as 133099.
    Do not understand why?
    Please help me to solve the issue.
    Regards,
    Neha

    Dear Neha
    Can you please clarify as to whether any header condition type is flowing in the sale order, so that  I will try to give a suitable solution accordingly.
    thanks
    G. Lakshmipathi

  • Userexit or BADI for MM41/ MM42 article create/change

    Hi Experts,
    My requirment is do some validations for custome fields before save the article while create or change. Please let me know any user exit and BADI's for suitable for my requirment. The user exit and BADI should be execute when i create/change article through BAPI. & handle errors. How to handle error in BADI without throw error message to GUI screen.
    <removed by moderator>
    Thanks
    jayabanda
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 25, 2011 11:13 PM

    Hi Jonathan,
    Appreciate your reply. As you know the validations kick in based on your input on the screen, kind of mostly part of PAI of the screen (0750 in this case). But my requirement is to prevent this change in the first place, not validating the user's input after a change option is given to the user.
    If you know if and how we can achieve this, please share your thoughts.
    Thanks & Regards,
    Venu

  • ALV from Display to Change Mode

    Hello,
             I created an application that starts with a selection screen and then the user selects either a Create/Change/Display. Then a call screen is done in which i added an ALV with some editable fields.
    The point is that when the user first selects 'Display' the ALV is all in the display mode. If he makes a BACK then goes to 'Change' the ALV is still displayed in the output mode. and vice-versa.
    Is there a reason for this??
    Please help

    hi emym,
    try this it may be helpful
    Making ALV Grid Editable
    ->To make a column editable, it will be sufficient to set the field “EDIT” in the field catalog. The ALV Grid perceives if there are some editable fields and adds buttons for editing purposes. If you do not need these new buttons, you know how to exclude them.
    ->To make individual cells editable, we will utilize the table we used for making a cell a pushbutton. As you remember, it was of type “LVC_T_STYL”. If you have not added this inner table, add it now. For this procedure; add the name of the field to the field “FIELDNAME”, and pass “cl_gui_alv_grid=>mc_style_enabled” to make a field editable and “cl_gui_alv_grid=>mc_style_disabled” to make a field non-editable, to the field “STYLE”. You can use the one with “disable” when you make an entire column editable and want just a few of cells along it non-editable.
    ps_layout-stylefname = ‘CELLSTYLES’ .
    If we want our column “SEATSMAX” entirely editable except the case “CARRID” is ‘XY’ which is a rare case and we want our cells along the column ‘PLANETYPE’ editable if their respective ‘CONNID’ fields contain the value ‘02’.
    Assume we have added our style table (“CELLSTYLES”) to our list data table and tell the layout structure about it and we adjust the field catalog so that the column “SEATSMAX” has the property “EDIT” set to ‘X’.
    refer this:
    FORM adjust_editables USING pt_list LIKE gt_list[] .
    DATA ls_listrow LIKE LINE OF pt_list .
    DATA ls_stylerow TYPE lvc_s_styl .
    DATA lt_styletab TYPE lvc_t_styl .
    LOOP AT pt_list INTO ls_listrow .
    IF ls_listrow-carrid = 'XY' .
    ls_stylerow-fieldname = 'SEATSMAX' .
    ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled .
    APPEND ls_stylerow TO lt_styletab .
    ENDIF .
    IF ls_listrow-connid = '02' .
    ls_stylerow-fieldname = 'PLANETYPE' .
    ls_stylerow-style = cl_gui_alv_grid=>mc_style_enabled .
    APPEND ls_stylerow TO lt_styletab .
    ENDIF .
    INSERT LINES OF lt_styletab INTO ls_listrow-cellstyles .
    MODIFY pt_list FROM ls_listrow .
    ENDLOOP .
    ENDFORM
    Conditionally setting fields to be editable or non-editable
    ->As usual, cell based settings override entire column settings. You can dynamically switch between cases in any proper part of your execution. Just fill your inner table as required and refresh table display; for entire column settings, set or unset the property “EDIT” of the field catalog for the column and reset the field catalog using “set_frontend_fieldcatalog”.
    ->As the last condition to be met for editability, you must call the method “set_ready_for_input” passing ‘1’ to the parameter “i_ready_for_input”.
    Using this method you can switch between editable and non-editable mode. As you guess, passing ‘0’ to the parameter while calling the method, switches to non-editable mode.
    rewrad if helpful
    regards,
    sravanthi

  • User Exit/BADI for Sales Order Line Partner Change

    I am looking for a user exit or BADI which gets triggered when partner function of a sales order line is changed.
    My detailed requirement is-We have created a new Partner Function - END CUSTOMER(EC). Requirement is to trigger a business logic whenever the End Customer partner function is changed from its default value to anything else.
    If you have any suggestions please let me know.

    Hi
    have a look at function module EXIT_SAPLV09A_004 .
    Cheers

  • Userexit/Badi for vendor or enduser addition/change in sales order creation

    Hello Gurus,
    I need a userexit/badi that gets triggered on the addition/change of partners in sales orders
    I need to make some validations when the user adds/changes the vendor or
    enduser in the sales order creation.
    I tried many exits that I could find from forum but they were not able to asist.
    Any help would be much appreciated.
    Thanks in Advance,
    Sumit.

    Well, if all else fails, USEREXIT_MOVE_FIELD_TO_VBAK will definitely be called when you change partners... but of course it will be called much more often than at only partner changes. Still, internal table XVBPA shows the current partners, so you could compare its content with the earlier state of the table to recognize a partner change you're interested in.
    Strangely, the usual Y-table (YVBPA) is not populated, not sure why, otherwise the comparison would be even easier.

  • How to handle "Display/Change" mode in XD0x with CUSTOMER_ADD_DATA_CS

    Hi,
    I've implemented customer fields to the debitor master data screen with BADI CUSTOMER_ADD_DATA_CS,
    using methods SET_DATA and GET_DATA and created a new screen within a Z-function group.
    So I have a new tab with the custom fields. If I do nothing further, the fields are input enabeld also within transaction XD03.
    At the moment, I'm using the value of sy-tcode to check for display (=XD03) or change/create (XD02/XD01) mode to handle
    the enable/disable mode of this fields.
    This is my coding in the PBO of my Z-screen.
      LOOP AT SCREEN.
        IF screen-group1 = 'Z01'.
          IF sy-tcode = 'XD03' OR sy-tcode = 'VD03'.
            IF sy-ucomm = 'ENTR'.
              screen-input = '1'.
             ELSE.
    *.. display mode
              screen-input = '0'.
            ENDIF.
          ENDIF.
       ENDLOOP.
    But if the user change form display to change mode wthin(!) the transaction, the sy-tcode is still XD03 and not XD02.
    If this is done in the screen with the custom fields, I can check for sy-ucomm (='ENTR'), but if an other screen is opened, I could not check for sy-ucomm.
    How can I handle this?
    I've found the following enhancement point:
    ENHANCEMENT-POINT MF02DFD0_01 SPOTS ES_MF02DFD0 INCLUDE BOUND.
    Or can I use the other methods in the BADI like SET_FCODE?
    Thanks in advance!
    Andreas

    Hi Andreas:
      I have to do something similar but for t-code FD02/FD03.
    I've created a program type M to control my new dynpro, and using a PBO module to change the screen depending on display/modify.
    I'm trying to add code to method SET_DATA, but my knowledge on OO programamtion is limited.
    Could you please provide the part of your code to implement the solution described in this post?.
    Best regards,
    Carlos.

  • Exit IWO10005(Profit center ) didn't work for service order change mode

    Dear Guru,
    I have built exit IWO10005 to substitute profit center, but it only work for the first initial profit center determination, it didn't work for the below scenario:
    1) Change mode on service order
    2) before service order save, change some field , it also didn't trigue profit center determination.
    And other Badi and exit can help?
    Thanks.

    GGB1?

  • Change flag deactivaion for PO output message type during change mode

    Hello All,
    WE are using automatic message output determination functionality for PO output type. This output type has been configured for creation and change mode under Fine tuning.
    Two output type are configured, for example ZAAA is output type for ALE and output type ZBBB for  archiving.
    Here  archiving functionality is used to transfer attachment from ERP system to SUS supplier portal as a pdf file. This is done via enhancement and the attachment transfer is working fine.
    During creation mode both the output types are determined and successfully processed and as a result attachment is transferred to supplier portal which is absolutely correct. In the attachment all PO line item can be seen which works well.
    Now I change the PO and add a new PO line item, system automatically default both the output type for change mode and upon saving both the output type are successfully processed.
    Now here is the problem in change mode only the added PO line item is sent as an attachment to the supplier portal. Here the requirement is see all the PO line items including the once which were newly added.
    Solution is if we uncheck the change flag for output type ZBBB during change mode then all the PO line item can be seen under the new attachment with new version.
    Please let us know how this functionality can be acheived ... is there an user exit available.
    We have a work around where we are running a background job every 3 mins and based on the last successfully processed message for output type ZAAA we are attaching first output type ZBBBfor archiving the changes and then ZAAA for sending the changes along with attachment to Supplier portal.However this solution is a temporary one , we need a concrete solution for this.
    Please advise.
    Thanks,
    Yatin

    Hello All,
    Thanks for the reply,
    But we cannot modify the existing print program as this print program is being used in different countries also.
    We already know a solution that during change mode if we remove the change flag from output type ZBBB then all the PO line items along with the recent changes can be seen under the attachment under supplier portal.
    The question comes now, how do we automate this processu2026 Is there any standard progam or user exit available.
    Manually, if you add a message type ZBBB in ME22N tranasction for creation mode then all PO line item with recent changes get transferred but we need to automate this process for create and change PO transaction.
    Thanks,
    Yatendra

  • BADI for BP to idetify change in email address

    Hi Experts,
    Please let me know the BADI Name in which i could identify whether email has been changed for BP or not.
    Please help.
    Regards,
    Piyush

    Hi All,
    My few updates on the issue!!!
    There is one function module "COM_PARTNER_GET_ADDR_SEL_OW
    "  which returns address from buffer memory
    I have implemented Z BADI for BUPA_ADDR_UPDATE. Whenever address changes, this badi will be triggered.But the above mentioned function module is not returning the address from buffer memory.
    Please give your valuable inputs.
    Regards,
    Piyush

  • Issue during Me53N -- switch to change mode

    Hi Experts,
    I use MEREQ001 to add new fields on the customer tab.
    I check during the process the fields and set to required and input a.s.o.
    f.e.
    If sy-tcode eq ME52N or ME51N.
            IF screen-name EQ 'CI_EBANDB-ZZ_ABTL'.
              screen-input = 1.
              screen-required = 1.
            ENDIF.
    Works fine except one issue.
    The user starts tc me53n and click on the pencil to switch from display in change mode.
    The problem now is that sy-tcode is still ME53N and I don´t if there is a field which know that I´m now in change mode.
    Try to find something in SYST but I´m not sure.
    These two field are changing the value during the process.
    sy-modno
    sy-oncom
    what field should I use? Or is there a field I can use instead?
    Any Ideas?
    Thanks
    Alex

    wrong forum - sorry

  • BADI for ME27

    Dear all,
    Is there a BADI available for ME27?
    The scenario is such that the client wants to make the POu2019s through ME27 only and not through ME21N
    We have used the BADI ME_PROCESS_PO_CUST and put the code in PROCESS_ITEM  and getting the required result as desired.
    But this BADI does not trigger when creating a PO through ME27.

    hi,
    check these badi's related to me27.
    Business Add-in
    ME_BAPI_PR_CREATE_01                    BAdI: Enjoy BAPIs for Purchase Requisitions
    ME_BAPI_PR_CHANGE_02                    BAdI: Enjoy BAPIs for Purchase Requisitions (Method Change)
    ME_BAPI_PR_CHANGE_01                    BAdI: Enjoy BAPIs for Purchase Requisitions (Method Change)
    ME_ACTV_CANCEL_PO                       BAdI for Activating the Cancel Function at Header Level
    SMOD_MRFLB001                           Control Items for Contract Release Order
    MM_EDI_ORDERS_OUT                       Enhancements for IDoc Output of Purchase Order: Internal
    MM_EDI_DESADV_IN                        Supplementation of Delivery Interface from Purchase Order
    MM_EDI_DELFOR_OUT                       Enhancements for IDoc Output of SA Releases: Internal
    ME_TAX_FROM_ADDRESS                     Tax jurisdiction code taken from address
    ME_REQ_POSTED                           Purchase Requisition Posted
    ME_BAPI_PR_CREATE_02                    BAdI: Enjoy BAPIs for Purchase Requisitions (Method Create)
    ME_COMMTMNT_PO_RELEV                    Check for Commitment-Relevance of Purchase Orders
    ME_PROCESS_REQ                          Enhancements for Processing Enjoy PReqs: Internal
    ME_PROCESS_REQ_CUST                     Enhancements for Processing Enjoy PReqs: Customer
    ME_CHANGE_CHARACTER                     Customer-Specific Characteristics for Product Allocation
    ME_TRIGGER_ATP                          Triggers New ATP for Changes in EKKO, EKPO, EKPV
    ME_COMMTMNT_PO_REL_C                    Check for Commitment-Relevance of Purchase Orders
    EXTENSION_US_TAXES                      Extended Tax Calculation with Additional Data
    ME_COMMTMNT_REQ_RELE                    Check of Commitment Relevance of Purchase Requisitions
    ME_COMMTMNT_REQ_RE_C                    Check of Commitment Relevance of Purchase Requisitions
    ME_RELEASE_CREATE                       BAdI: Release Creation for Sched. Agreemnts with Rel. Docs
    ME_REQ_OI_EXT                           Commitment Update in the Case of External Requisitions
    MEGUI_LAYOUT                            BAdI for Enjoy Purchasing GUI
    ME_BSART_DET                            Change document type for automatically generated POs
    ME_CCP_ACTIVE_CHECK                     BAdI to check whether CCP process is active
    ME_CCP_BESWK_AUTH_CH                    BAdI for authorization checks for procuring plant
    ME_CCP_DEL_DURATION                     Calc. of Delivery Duration in CCP Process (Not in Standard)
    ME_CHECK_ALL_ITEMS                      Run Through Items Again in the Event of Changes in EKKO
    ME_CHECK_SOURCES                        Additional Checks in Source Determination/Checking
    ME_CIN_LEINRF2R                         BADI for CIN India - Delivery charges
    ME_CIN_LEINRF2V                         BADI for LEINRF03 excise_invoice_details
    ME_CIN_MM06EFKO                         Copy PO data for use by Country version India
    ME_CIP_ALLOW_CHANGE                     Configuration in Purchasing: Changeability Control
    ME_CIP_REF_CHAR                         Facilitates Reference Characteristics in Purchasing
    ME_COMMITMENT_STO_CH                    BadI for checking if commitments for STOs are active
    ME_DEFINE_CALCTYPE                      Control of Pricing Type: Additional Fields
    ME_GUI_PO_CUST                          Customer's Own Screens in Enjoy Purchase Order
    ME_HOLD_PO                              Hold Enjoy Purchase Orders: Activation/Deactivation
    ME_PO_SC_SRV                            BAdI: Service Tab Page for Subcontracting
    ME_PROCESS_COMP                         Processing of Component Default Data at Time of GR: Custome
    ME_PROCESS_PO                           Enhancements for Processing Enjoy Purchase Order: Intern.
    ME_PROCESS_PO_CUST                      Enhancements for Processing Enjoy Purchase Order: Customer
    ME_PURCHDOC_POSTED                      Purchasing Document Posted
    reward points if hlpful.

  • Function module change mode?

    Hi,
    I created a new function module in namespace created by colleague, I cant edit the source code in created FM. It is showing only in Grey font display in change mode. I can edit other parameters but not the source code.
    Can anyone help me this out?
    Regards
    Giri

    Dear Giri,
    There must be a Insert Button, through which you can add your codes.
    BTW ... What's the name of the Function Module ????
    Regards,
    Abir
    Don't forget to award Points *

  • Problem with this new version is when i open firefox something change my home page to mozila defalut page and in the new tab open mozila firefox first run page.Sorry for my bad English

    Problem with this new version is when i open firefox something change my home page to mozila defalut page and in the new tab open mozila firefox first run page.Sorry for my bad English

    Sounds like this issue:
    * http://kb.mozillazine.org/Preferences_not_saved
    * [[Preferences are not saved]]

  • Have Operating System 10.6.8, Mail Program 4.6.  How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to m

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

Maybe you are looking for

  • Panorama is no longer working in 4.0b7 (button or new shortcut)

    I have tried using ctrl+E, pressing the button in the corner, and the option from the menu bar. None of them are working. I also have a mouse gesture extension that uses the "Browser:ToggleTabView" command and that's not working either (I'm not sure

  • Unable to "save as pdf" using Excel

    Hi, This problem concerns SharePoint 2010 We have an issue with "save as PDF" option to the library on one particular site, it appears to work but the .PDF file never appears in the library. We can save as PDF to the desktop then upload to the librar

  • 2 different battery life readings?

    Im alittle confused here. im getting 2 different battery life readings. For instance, on the iphone(small battery on the top right of the screen) it shows around 40% charge left. When i connect it to my pc the big green bar shows up. but it shows tha

  • Album cover.

    Is it possible to make the album covers smaller on the macbook pro when using iTunes with a screen size of 13" it would be a help ( should be a feature ) thanks.

  • How long does it take to restore?

    My computer crashed while itunes is updating my ophone from 4.0 to 4.1, so I had to do a restore. After 8 hours and still not finished, I disconnected it. I don't have any valuable data on my iphone. How can I do a clean install of iOS whatever versi