Filter on BAdI implementation

Dear all,
We developed a implementation for Write Back BAdI and we wonder if it is possible to refine the filtering of the module that trigger the BAdI implementation. Specifically, out BAdI must be triggered by manual input (MAN) and data manager packages (DM) but we don't want to have it run for all packages but only for selected package.
Is there a standard option for that ?
Regards
Thomas

Hi Thomas,
In the badi code you can inspect some memory variable that will be initialized by custom logic badi called at the beginning of particular DM package/ We have done it like this:
By default it's prohibited in write back badi to write to ACT category. But for specific DM we use:
//*************************************************** ALLOW WRITE TO ACT
*START_BADI WRITE2ACT
WRITE=OFF
QUERY=OFF
DEBUG=OFF
*END_BADI
//*************************************************** Clear data in ACT
*XDIM_MEMBERSET PERIODS=%PERIODS_SET%
*XDIM_MEMBERSET BE=%BE_SET%
*XDIM_MEMBERSET PLANTYPE=ACT
*WHEN INACCT
*IS *
   *REC(EXPRESSION=0)
*ENDWHEN
WRITE2ACT badi code:
method IF_UJ_CUSTOM_LOGIC~EXECUTE.
" Enable write to ACT
DATA l_importact TYPE C.
   l_importact = 'X'.
   EXPORT importact = l_importact TO MEMORY ID 'Z_VALIDATOR_IMPORTACT'.
   cl_ujk_logger=>empty_line( ).
   cl_ujk_logger=>log( '=========================================================' ).
   cl_ujk_logger=>log( '# Access to ACT is allowed now!                         #' ).
   cl_ujk_logger=>log( '=========================================================' ).
endmethod.
In write back badi we check it:
IMPORT importact = l_importact FROM MEMORY ID 'Z_VALIDATOR_IMPORTACT'.
Vadim
Message was edited by: Vadim Kalinin - code comment translation done

Similar Messages

  • Problem in creating new implementation for filter dependent badi

    Hi Experts,
       I want to use badi NOTIF_EVENT_POST.It is a filter dependent badi. It is asking filter type while implementing thro se19. Could anyone pls tel me how to create new implementation for the filter dependent badi. Existing filter type is QMART. is there any problem if i change the filter type?
    Thanks in Advance!

    Hi ,
    NOTIF_EVENT_POST is filter dependent and filter values are based on QMART value in table TQ80. You need to specify the filter value ie : QMART value before implimentation , before that check all active implimentations for the same , if u have to impliment on same filter value , you need to deactivate the one which is implimented on same filter value .
    You are not supposed to change the filter type.
    Regards,
    Vamsi
    Edited by: CH. VAMSHI on Sep 29, 2009 11:58 AM

  • More than one filter in a BAdi implementation

    Hi Experts,
       Is it possible to have more than one filter value for one BAdi implementation?
       Or should I create separate implementation for every filter value?
       I tried creating second filter in an existing BAdi implementation and it is not allowing.
    Thanks and regards,
    Venkat.

    Hi,
    I agree with Sandeep.
    You can create n number of filter values according to the bussiness need.
    Thanks
    Arbind

  • "Specify filter names" error in BADI Implementation

    Hi everyody,
    I am trying to create a BADI Implementation for the standard badi BADI_LAYER in SE19. When I try to save this, it gives an error saying "Specify filter names".
    Can somebody kindly tell me what this problem is and how I can fix it?
    Thanks,
    Max

    Hi Max,
    You need to enter a BADI definition as filter value in the Properties Tab
    PLease refer the following link for more details.
    http://www.erpgenie.com/index.php?option=com_content&task=view&id=462&Itemid=77
    Reward points for useful answers.

  • Filter for BAdi CRM_ORDER_STATUS does not work in WebUI

    Hello,
    we have made an implementation for BAdi CRM_ORDER_STATUS for our sales cycle.
    In detail:
    The BAdi implementation shall be triggered if the user sets a special user status within an opportunity.
    Therefor we have used the standard filter functionality provided by this BAdi (giving the correct header status profile and user status).
    Using transaction CRMD_ORDER in SAP GUI, creating an opportunity and setting the special user status -> the BAdi implementation is triggered as expected.
    But: If we are using the WebUI the done BAdi implementation is triggered at every roundrip caused by creating/editing an opportunity and not only at setting the user status.
    Does anybody of you made similar experiences with using BAdis in WebUI (SAP CRM 7.0)?
    Cheers,
    André
    **EDIT***
    It´s possible coding the filter within the BAdi implementation.
    But we prefer using the provided SAP standard.
    Edited by: Andre Schillack on Apr 23, 2009 8:47 PM

    Hi Andre,
    I just checked my system CRM2007 and below is what I found in WebUI mode:
    During the build of DDLB for Status field, it calls method cl_crm_uiu_status_info=>get_status_info. What it does is:
    1. It derives all status codes for the user status profile (based on customizing)
    2. And then for each status code, it triggers the BADI based on filter value. In the BADI, customer can decide whether the particular status (filtered value) is allowed to see in the DDLB.
    Since it is building the DDLB for Status field every time there is change on the opportunity and therefore DDLB method calls the BADI every time to build the Status code list.
    If you want to do further processing based on status change in the method BEFORE_CHANGE, you can try the following code.
    if is_status_wrk-active_old = 'X' and
           is_status_wrk-user_stat_proc = 'CRMACTIV' and
           is_status_wrk-status = 'E0002'.
    Do something
    endif.
    I hope I have not confused you.
    I feel that this is standard behaviour in WebUI. You may want to check with SAP OSS also.
    Regards,
    Paparao Undavali

  • Query in Badi Implementation!!!!

    Hi all,
                     I have a requirement which requires me to Implement the Badi 'DOC_PERSONALIZE_BCS' .
    This is a filter dependent Badi.
    When I try to Implement this Badi , I am required to give a filter value.
    When I give the filter value and try to activate the Badi , I get a message as follows:
    "There are already Active Implementations for these Filter types"
    I checked and found out that there is already a Standard Implementation for this Badi.
    I want my Badi to get activated.
    Please tell me how I can activate my Badi for the Filter type.
    Kindly reply immediately as this is bit urgent.
    Regards,
    Vijay

    Hi,
    You can get your BADI activated even though the filter value is already defined in other implementation. This condition should not give any problem in activitating the BADI. But this condition should be avoided. Because if two implementations are present in BADI with same filter value then whenever the BADI is called, all implementations with the given filter value are executed which is not desirable.
    You need to deactivate the std implementation and then create new implementation or copy the std implementation and make changes in it as per your requirement.
    Please reward if useful.
    Regards,
    Ashlesha

  • BADI  implementation in ECC 6.0

    I want to put a validation when changing business partner details using tcode BP but it seems there no user exists but BADIs but the BADIs that i am getting i think can only be used after the update has taken place. i have BADI ADDRESS_UPDATE and i need to know ho i can implement it in ECC 6.0. I tried SE18 but its saying "Create" operation is possible only for enhancement spots. how best can implement it

    Hi Willard,
    Identify ur enhancement spot. Go to SE18, give the enhancement spot name and display.
    You can see your BADI in that spot. Click on the button 'Implement Enhancement Spot (F6)'.
    Give a name for your enhancement implementation, select ur badi to be implemented in that spot. Give proper name to ur badi implementation.You can now put ur code in that implementation.
    Check this blog of Thomas Weiss.
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    It clearly explains how you can implement BADI of an enhancement spot in ECC 6.0
    Regards,
    Soumya.
    Edited by: Soumya Jose on Feb 5, 2009 2:14 PM

  • Filter Dependent BAdI

    Assume I have implemented the following BAdI:
    BBP_DOC_SAVE_BADI
    Furthermore, assume I have defined a single filter value: BUS2200
    Does this mean that my BAdI implementation will be called ONLY
    when the filter value is BUS2200.
    Is it possible that the implementation will be called for other
    filters like BUS2121 and BUS2201?
    The reason I ask is this:
    Do I have to check the filter value in my implementation to make sure
    it is being called for BUS2200?  If so, what's the purpose of defining
    the filter value in the BAdI implementation?

    Do I have to check the filter value in my implementation to make sure
    it is being called for BUS2200? If so, what's the purpose of defining
    the filter value in the BAdI implementation?
    In the filter you need to specify the variable which contains the desired value.
    Like:
    W_BO_TYPE = 'BUS2201'.
    GET BADI badi_inst
                  FILTERS bo_type = W_BO_TYPE.
    This code will not get any instance of the BADI as you don't have the implementation for this BUS2201. If your variable W_BO_TYPE contains the value BUS2200 than you would get the BADI instance which contains your implementation.
    Regards,
    Naimesh Patel

  • Configure HRHAP00_GET_LIST_FLT BADI implementation in appraisal template using OOHAP_BASIC T-code

    Hi Experts,
    I want to modify List of Incomplete Appraisal Documents in appraisal template, for which I have found a BADI HRHAP00_GET_LIST_FLT (Displayed in further Badis section of RHHAP_BADI_OVERVIEW program).
    I have created implementation of this BADI but I am unable to see BADI in OOHAP_BASIC transaction (I have checked all the enhancement areas).
    Please let me know how can I configure the implementation of BADI HRHAP00_GET_LIST_FLT in OOHAP_BASIC T-code.
    (I have also checked that BADI implementation was not getting triggered by simply activating the implementation)
    Thanks in advance
    Ninad shevade

    Hi Tarun,
    I am facing the same problem can you please help me on the same.
    I want to filter the appraisal templates how i can do?
    Rajneesh

  • QISR1  BADI implementation Transport

    Hi ,
           I have created a Z implementation for badi definition QISR1 .I have entered my Z scenarios as filter types here .My Z scenarios and implementation ( flow logic ) is working fine in Dev server .
                                                                But after transporting to Quality , my Z BADI implementation
    is not getting trigerred ie my Z forms are coming up but not pulling data apart from PERNR .
    Although the standard scenarions and standard badi implementation HRWPC_PCR is working properly .
                                                      When i debug cl_ex_qisr1  my Z badi implementation is not called in
    Quality . Although my implementation is active with all dependant methods also active.
    It throws an exception at  get badi L_badi   in class cl_ex_qisr1.
                                  Is there something I am missing in the BADI transport .
    Also ,
    I made the standard Badi implementaion HRWPC_PCR inactive and only the Z implementation active .
    But still standard scenarios work .
    Is this a server issue - executing inactive badis implementation and not active ones .
    Will refreshing portal server work ?
    points will be suitably rewarded.
    thanks,
    Sahiba
    Edited by: Sahiba Gandhi on Nov 21, 2008 6:54 PM
    Edited by: Sahiba Gandhi on Nov 21, 2008 7:42 PM

    what version are you on? on ECC6, I guess the Classic BAdI implemenattaion needs to be converted into an Enhancement Spot ( explicit) implemementation.
    ~Suresh

  • Filter Dependent BADI - All Country codes to be included

    Hi,
    I am using a BADI 'CMS_RE_LR_DIALOG' which has a filter type 'CMS_RE_DTE_LR_ID'.
    This BADI is used in conjunction with a screen field that can take as inputs the 'country codes'. However currently this BADI has only one implementation for the country code 'DE' (Germany) and this is a SAP implementation and should not be modified. The requirement is that I need to include all the country codes in this BADI so that the associated transaction is executed for all country codes.
    Could anyone brief me how this could be done? One procedure would be to create an impl each for every country code, however this is not a feasible solution. Is there any other way in which we can pass all values in a structure to the filter type? I tried using the data element LAND1 for this purpose, but not getting the required output with it.
    Kindly pitch in your inputs as to how this could be implemented.

    filter is implemented in se18 in badi definition.
    certain times u may require to implement certain checks based on country so u can specify the country element as key and implementa filter dependant badi.
    кu03B1ятu03B9к
    Edited by: kartik tarla on Feb 15, 2009 12:46 PM

  • ISR SCENARIO BADI Implementation not called

    Hi All,
    I have an issue when trying to run standard ISR scenario(SMC1).
    I have an external breakpoint at QISR1 BADI implementation method if_ex_qisr1~int_service_request_check of class CL_IM_QISR1_SMC1, but it doesn't stop when i clicked check button.
    The application i am running QISR_UI_FORM with parameters SCENARIO=SMC1&MODE=CREATE.
    I have a feeling that it is not even calling the implementation method, as it submits the form blank without doing any checks though the implementation exists and is active. I have also checked that the filter is also specified for implementation as SMC1.
    I have tried a custom scenario as well, same thing happens in this case as well.
    What is that i am missing?
    We are on ERP 6.0 EHP 4.0. I am starting to use ISR framework to implement the standard forms SAP delivered as well to do some custom scenarios.
    Another question: which framework is right to implement for doing (some standard forms, travel, PM forms and some hr forms) , i am also thinking about HCM Processes and Forms. Which one is right way to go ISR Framework or HCM P&F?
    I understand that HCM also needs ISR scenario.
    Please answer my question.
    Thanks
    Anu

    Can you please write the note number.... I think this BAdI thing frustrates a lot of people....
    THX,
    Gregor

  • Difference between Enhancement Implementation and BadI Implementation

    What is the difference between Enhancement Implementation and BadI Implementation?

    Hi Rajendra Prasad,
    Enhancement spot : It is the point where you can add your code. It can have multiple implementations. All the implementations can active at a time but the sequence of executions of the implementations can be anything.
    (or)
    Enhancement points are regions where can insert our code to suit customer needs...Spots are subsets of points and created inside these points..for an enhancement point multiple active spots can exist.
    For enhacement-sections : the main idea is to provide a spot to customise the existing process..eg:SAP has done a select criteria..but you need to filter it more by adding a where condition..in that case SAP suggests using Enhancement sections..At any time the first active enhancement section works...even if multiple sections are created(though ideally multiple sections are not allowed to be created)..if you do the procedure below you can see that enhancement-section when a spot is created for it...the code in the parent section is copied and given in the editable mode
    Creating spots implementations for points/sections are given below................................................................
    to Create a spot in the standard code...click on the spiral icon..screen changes to a different color...place cursor on ENHANCEMENT-POINT/ENHANCEMENT-SECTION keyword of the spot you require to create implementation for...righ click -> "enhancement implementation -> "create" -> a table control comes -> at the bottom "CREATE" button to be clicked" ...give a name and text in customer name space and save -> select the same name just given in the table control ..press 'Tick' .....you will get a space where code can be written..write the code.....save and activate
    Also check the following blogs on enhancement framework
    /people/thomas.weiss/blog/2006/01/24/what-the-new-enhancement-framework-is-for-150-its-basic-structure-and-elements-for-beginners
    The new Enhancement Framework Part 2 - What Else You Need to Know Before Building an Enhancement
    How To Define a New BAdI Within the Enhancement Framework - Part 3 of the Series
    How to implement a BAdI And How to Use a Filter - Part 4 of the Series on the New Enhancement Framework
    Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework
    Please go through this link also.
    implicit enhancement and explicit enhancement
    Reward points if it helps you
    Cheers,
    Swamy Kunche

  • Sending Email using cl_bcs from a badi implementation

    Hi,
    I have written my code to send Email, inside AFTER_SAVE method of BADI Implementation of DOCUMENT_MAIN01.
    Now this method of cl_bcs requires COMMIT WORK for the mail to be sent. And inside BADI implementation, we cannot write a COMMIT statement.
    What is a workaround for this? While going through few other posts, I came across remote enabled FMs.
    Is that the only way? Can I use some additions like STARTING NEW TASK etc. Following is the call used in case of cl_bcs:
       CALL METHOD G_REF_SEND_REQUEST->SEND(
              EXPORTING
                I_WITH_ERROR_SCREEN = 'X'
             RECEIVING
                RESULT              = G_SENT_TO_ALL ).
    I also tried using SO_NEW_DOCUMENT_SEND_API1 STARTING NEW TASK and it works fine. But the subject length is a constraint their.
    Please suggest.
    Thanks in advance.

    Hi friend.
    *& Report  ZTEST_273068_EMAIL_CL_BCS
    REPORT  ZTEST_273068_EMAIL_CL_BCS.
    CONSTANTS:
        gc_subject TYPE so_obj_des VALUE 'ABAP Email with CL_BCS',
        gc_raw     TYPE char03 VALUE 'RAW'.
      DATA:
        gv_mlrec         TYPE so_obj_nam,
        gv_sent_to_all   TYPE os_boolean,
        gv_email         TYPE adr6-smtp_addr,
        gv_subject       TYPE so_obj_des,
        gv_text          TYPE bcsy_text,
        gr_send_request  TYPE REF TO cl_bcs,
        gr_bcs_exception TYPE REF TO cx_bcs,
        gr_recipient     TYPE REF TO if_recipient_bcs,
        gr_sender        TYPE REF TO cl_sapuser_bcs,
        gr_document      TYPE REF TO cl_document_bcs.
      TRY.
          "Create send request
          gr_send_request = cl_bcs=>create_persistent( ).
          "Email FROM...
          gr_sender = cl_sapuser_bcs=>create( sy-uname ).
          "Add sender to send request
          CALL METHOD gr_send_request->set_sender
            EXPORTING
              i_sender = gr_sender.
          "Email TO...
          gv_email = '[email protected]'.
          gr_recipient = cl_cam_address_bcs=>create_internet_address( gv_email ).
          "Add recipient to send request
          CALL METHOD gr_send_request->add_recipient
            EXPORTING
              i_recipient = gr_recipient
              i_express   = 'X'.
          "Email BODY
          APPEND 'Hello world! My first ABAP email!' TO gv_text.
          gr_document = cl_document_bcs=>create_document(
                          i_type    = gc_raw
                          i_text    = gv_text
                          i_length  = '12'
                          i_subject = gc_subject ).
          "Add document to send request
          CALL METHOD gr_send_request->set_document( gr_document ).
          "Send email
          CALL METHOD gr_send_request->send(
            EXPORTING
              i_with_error_screen = 'X'
            RECEIVING
              result              = gv_sent_to_all ).
          IF gv_sent_to_all = 'X'.
            WRITE 'Email sent!'.
          ENDIF.
          "Commit to send email
          COMMIT WORK.
          "Exception handling
        CATCH cx_bcs INTO gr_bcs_exception.
          WRITE:
            'Error!',
            'Error type:',
            gr_bcs_exception->error_type.
      ENDTRY.
    Just Execute it.
    Regards,
    Thrimu

  • BADI implementation is not working in background for MRRL

    Hai frnds,
    BADI: MRM_WT_SPLIT_UPDATE is used for deducting withholding tax in MRRL(Invoice verification). This BADI was implemented and working fine in foreground, but not working in background.
    After implementing the BADI, the standard method of calculating TDS(from vendor master) is over written by BADI implementation.Now standard deduction is also not workijng in background.Plz help me to solve it.
    Bala.V

    HI,
    COR6N is the Enjoy Transaction and sap does not suggest to write the BDC on these transaction as most of these transaction uses the GUI elements foe better display and which cannot be recorded while processing the BDC in back ground.
    Check for the Normal transaction and write the BDC for it.
    Or
    Pass X to Rcommit flag in the CTU_PARAMS option and check.

Maybe you are looking for

  • How do I backup an SD card in Windows 8?

    I have a 128 GB Microsoft Surface Pro (win 8 pro) with a 64 GB microSXDC card inserted.  The card was formatted using NTFS with the Surface Pro and mounted as an NTFS folder  I'm able to read/write to the card without issue, but the volume (or the mo

  • Business Rule Erro

    Hi All, I am facing errors in eas. If i click the Business Rule in EAS, it throwing the error as "*Error logging in to Business Rules. The repository has not been configured or you not authorized to use Business Rules"*. Thanks, PC

  • Update itunes on Windows XP computer

    I keep getting the error message when trying to install update to my Windows XP computer get error message about privileges and Apple mobile device failed to start  won't retry or ignore

  • How to return a String

    i have a program that needs to return a String (or a variable that holds test). String is not a return type variable so how do i return a string-like variable (or object). I tried returning a Vector but it doesn'w work the same problem ocurs. Vector

  • Only runs with "optimized" settings

    Hi All,    I have a 1GB kit of dual channel Mushkin Blue PC3200 installed on my K7N2 Delta2-LSR. Everything runs great except for when I attempt to change the memory settings to something other than "Optimized". The computer will then lock up while X