BADI implementation in WCM

Hi,
My requirement is I want to restrict WCM:work clearance document from being created if difference between Valid from (DATEFR) & valid to(DATETO) is as decided.
T code is WCTA.
I tried Badis
1. BADI_WCM_APPROVAL
2. BADI_WCM_ASSIGNMENT
3. BADI_WCM_CATALOG
4. BADI_WCM_OBJLST
5. BADI_WCM_OPWC
6. BADI_WCM_ORDER
7. BADI_WCM_WAP_001
8. BADI_WCM_WAP_002
9. BADI_WCM_WAPI_001
10. BADI_WCM_WAPI_002
11. BADI_WCM_WCA_001
12. BADI_WCM_WCA_002
13. BADI_WCM_WCA_003
14. BADI_WCM_WCD_001
15. BADI_WCM_WCD_002
16. BADI_WCM_WCMOBJ
17. BADI_WCM_WCTM
I am little bit confused on following
BAdI: BADI_WCM_WCMOBJ
Method: SAVE_CHECK
In this badi parameters are
IV_IWERK Planning Plant
IV_OBJART Object Type
IV_OBJTYP Subobject Type
CV_COLOR Color
CV_INTENSITY-Intensity of Display
But  I want to ad check on WCD validity the fields related are Valid from & Valid to DATEFR & DATETO.
So it is not working.
Please elaborate it.
Best Regards,
Yogesh

Dear Shahin,
Thanks for your prompt reply.
I've adapted the same method (SE24) to find this BADI. I see other BADIs doesn't have the required parameters flowing in. That is the reason why I am trying to some how implement this BADI.
My requirement: After creating work order in Iw31, a list of people has to approve the work order by using permit (ech one will have the unique permit key). For this a pop window containing table control of permit keys listed in the order is provided.
I've to place a check/validation to ensure that these permits are approved in the same order as it has to be done.
for example: 1) Functional head 2) General manager 3) Managing director
I've also searched for user exits, but, on that is suitable for this req is not working.
Please suggest me a method to do this.
or
if I create ZBADI i.e. ZWCM_DECOUPLING, will this be called inside the standard program? will the exit handler call this?
Please give me your suggestion.
Thanks,
Rajan U
Edited by: Rajan Usman Basha on Jun 2, 2011 5:45 AM

Similar Messages

  • 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.

  • How to change the name of a BADI Implementation?

    Hello experts,
    Does anyone knows how to change the name of the BADI Implementation? I just create a new Implementation but we need to rename it.
    Thanks in advance,
    AK

    Hi,
    Please go to transaction SE19, enter your implementation name.
    Then go to menu: Implementation -> Rename -> ...
    Regards,
    Ferry Lianto

  • BADI implementation for NOTIF_EVENT_POST not getting triggered

    Hi All,
            We have created an implementaion for the NOTIF_EVENT_POST. And it was working fine previously. Now it is not working for some reason. In fact issue is that the implemetation is not getting triggerd at all. I have put a BREAK-POINT statement in the code, but does not even goes into the code.
    I have checked all the properties. It is active. The table V_EXT_IMP has a entry corresponding to the BADI definition and implementation.
    I tried to debug the standard transaction IW52 (which uses this). The program runs till the FM call for CL_EXITHANDLER=>GET_INSTANCE. It created a instance also. But it does not get inside the call for the method of the BADI LR_BADI_INST->CHECK_DATA_AT_POST.
    I am at a fix now. Can somebody answer this issue? It would be very helpful.
    Regards
    Barada.
    Edited by: Baradakanta Swain on Aug 5, 2008 4:06 PM

    I did not get the issue with the BADI implementation. But as our time line was very tight, we moved the code to BTE event for Updating Notifications.
    This required a little tweaking of the code and now it is working.
    I am marking it ANSWERED so as to remove it from the list of unanswered questions.
    Regards
    Barada

  • BAPI Check in BADI Implementation

    Dear All,
    We have made an enhancement through BADI in ME21N / ME22N transaction like validating certain entries, in that I am checking the t-codes ME21, ME21N, ME22 and ME22N. If it fails then PO wonu2019t create and populate some messages.
    Now there is one custom program which creating POu2019s through calling BAPI in the program and itu2019s not validating the above as its calling through custom program.
    (i.e  SY-TCODE eq SE38)
    Now how I should put a condition on BAPI in my BADI implementation?? If it is normal user exit, we can use runtime structure T158 and check the TCODE in that. But as I am using the BADI ME_PROCESS_PO_CUST with the method CHECK doesnu2019t have any transaction code info.
    And currently I have an idea of using the GET / SET Parameters and need to set in the custom program and get that info in BADI? But I donu2019t know whether this idea good or not?? If anyone has any idea please let me know?
    Thanks,
    Raghu.

    Hi Raghu,
    If sy-tcode ne 'ME21'
    and sy-tcode ne 'ME21N'...
    IMPORT lv_data ....
    do processing...
    endif.
    Best regards,
    Prashant

  • Accessing internal table declared outside of BAdI  implementation

    I am working on a BAdI implementation and within the BAdI, I need to manipulate the data of an internal table that is declared in the calling routine.  This internal table is not a parameter to the BAdI call.  I am wondering is there a way to access the internal table that is not recognized by the BAdI implementation?  If so, what's the syntax to do this?
    I know in debug mode, I am able to access the content of the internal table by using (Program)Itab.  But I get a syntax error when accessing the internal table using (Program)Itab syntax. 
    Any help is appreciated!

    Thanks, Max.
    I tried your method, but I am getting a short dump due to type conflict.  I think it's because the internal table I'd like to access is declared using the following syntax:
    data: begin of itab occurs 0,
          end of itab.
    Therefore, when processing the assign statement, the field-symbol is being treated as a structure...
    I tried to change the field-symbol type to any, but after that, I can't modify the table content using loop at type of syntax..
    Do you have any other suggestions? 
    Thanks very much!

  • 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

  • Migrated BADI Implementation not triggering in ECC 6.0

    Hi Experts,
    Need your urgent assistance how to deal with migrated BADI implementation which is not triggering in ECC 6.0. This is for PO (ME_PROCESS_PO_CUST). In the original version (4.6) it was working fine. But when this is migrated to ECC 6.0, it's not firing. Please help to trigger this one in ECC 6.0.
    Points will be awarded and thanks in advance,
    LM

    Hi LM,
    Can you just paste the code in the BADI.(The method in which code is there)
    Is this BADI implemented and in the Active status.
    Check in SE19 if the implementation exist or not?
    There may be chances that some condition is not met which can trigger this BADI. Have you read the documentation of the BADI?
    Regards,
    Atish

  • 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

  • Calling Search Help in BAdI implementation.

    Hi All,
    I have created my search help with search help exit function. Now I need to call this Search Help in my BAdI Implementation ( Method of BAdI) . Please suggest me which function I should use to call my search help.

    Hi,
    Please use the following FM. It might be helpful.
    F4IF_SELECT_VALUES
    Regards
    Bhupal Reddy

  • BAdI implementation FIAA_BW_DELTA_UPDATE inactive in source system DEV

    Hi all.
    I'm trying to execute an infopackage to get 0ASSET (texts delta initialization). But it shows me the next error message: "BAdI implementation FIAA_BW_DELTA_UPDATE inactive in source system DEV".
    But when I look at this BADI implementation in the source system (Transaction code se19) there are no errors on it.
    "BAdI implementation FIAA_BW_DELTA_UPDATE does not contain any errors".
    Do somebody knows what's happenning?

    Hi,
    If you are in version 3.1, then this BADI has an issue.
    Kindly refer to the following note:
    [SAP Note 590034 Deactivating implementation FIAA_BW_DELTA_UPDATE|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bct/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d353930303334%7d]
    Cheers...

  • Regarding BADI implementation in Debugging

    Hi,
       i have a doubt regarding BADI.There are multiple badi implementations for VA02 transaction. now i am processing the VA02 transaction. Can i know which implementation is processing for the transaction.

    Hi Praveen,
    Use this code to find out the BADI of a Transaction code:
    *& Report ZGET_BADI
    REPORT ZGET_BADI.
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA wa_tadir type tadir.
    START-OF-SELECTION.
    IF NOT P_TCODE IS INITIAL.
    SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
    ELSEIF NOT P_PGMNA IS INITIAL.
    TSTC-PGMNA = P_PGMNA.
    ENDIF.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'PROG'
    AND OBJ_NAME = TSTC-PGMNA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM TRDIR
    WHERE NAME = TSTC-PGMNA.
    IF TRDIR-SUBC EQ 'F'.
    SELECT SINGLE * FROM TFDIR
    WHERE PNAME = TSTC-PGMNA.
    SELECT SINGLE * FROM ENLFDIR
    WHERE FUNCNAME = TFDIR-FUNCNAME.
    SELECT SINGLE * FROM TADIR
    WHERE PGMID = 'R3TR'
    AND OBJECT = 'FUGR'
    AND OBJ_NAME EQ ENLFDIR-AREA.
    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
    ENDIF.
    ENDIF.
    SELECT * FROM TADIR INTO TABLE JTAB
    WHERE PGMID = 'R3TR'
    AND OBJECT in ('SMOD', 'SXSD')
    AND DEVCLASS = V_DEVCLASS.
    SELECT SINGLE * FROM TSTCT
    WHERE SPRSL EQ SY-LANGU
    AND TCODE EQ P_TCODE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) P_TCODE,
    45(50) TSTCT-TTEXT.
    SKIP.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(105) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    *Sorting the internal Table
    sort jtab by OBJECT.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type C.
    clear : wf_smod, wf_badi , wf_object2.
    *Get the total SMOD.
    LOOP AT JTAB into wa_tadir.
    at first.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Enhancement/ Business Add-in',
    41 SY-VLINE ,
    42 'Description',
    105 SY-VLINE.
    WRITE:/(105) SY-ULINE.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    FORMAT COLOR COL_GROUP INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 wf_object2,
    105 SY-VLINE.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    SELECT SINGLE MODTEXT into wf_txt
    FROM MODSAPT
    WHERE SPRSL = SY-LANGU
    AND NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    when 'SXSD'.
    *For BADis
    wf_badi = wf_badi + 1 .
    select single TEXT into wf_txt
    from SXS_ATTRT
    where sprsl = sy-langu
    and EXIT_NAME = wa_tadir-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    endcase.
    WRITE:/1 SY-VLINE,
    2 wa_tadir-OBJ_NAME hotspot on,
    41 SY-VLINE ,
    42 wf_txt,
    105 SY-VLINE.
    AT END OF object.
    write : /(105) sy-ULINE.
    ENDAT.
    ENDLOOP.
    WRITE:/(105) SY-ULINE.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No.of Exits:' , wf_smod.
    WRITE:/ 'No.of BADis:' , wf_badi.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'No userexits or BADis exist'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
    data : wf_object type tadir-object.
    clear wf_object.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(8) EQ 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    when 'SXSD'.
    SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
    CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
    endcase.
    Reward if useful
    Regards
    Ravi

  • How to find which Badi Implementation is causing Short Dump

    Hi Experts,
    We are getting short dump on IW32 transaction when the users hit SAVE button.
    The Dump Details:
    Runtime Errors SYNTAX_ERROR
    Short text
    Syntax error in program "WORKORDER_UPDATE==============CP ".
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_EX_WORKORDER_UPDATE========CP" had
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program
    "WORKORDER_UPDATE==============CP " in include
    "WORKORDER_UPDATE==============CM000 " in
    line 12:
    "The specified type cannot be converted into the target variable
    The current ABAP program "CL_EX_WORKORDER_UPDATE========CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    The following syntax error was found in the program
    WORKORDER_UPDATE==============CP :
    "The specified type cannot be converted into the target variables."
    Information on where terminated
    Termination occurred in the ABAP program "CL_EX_WORKORDER_UPDATE========CP" -
    in "IF_EX_WORKORDER_UPDATE~AT_SAVE".
    The main program was "SAPLCOIH ".
    After going through the dump analysis, I found that there are around 25 BADI Implementations got created on Enhancement Spot "WORKORDER_UPDATE".
    How to find out which BADI Implementations is causing this dump?
    Please let me know.
    Thanks.
    Edited by: ravi kumar on Feb 22, 2011 1:12 PM

    Yes, I tried the Active Calls Stack also. The Short Dump is occuring exactly at the line :-
    method IF_EX_WORKORDER_UPDATE~AT_SAVE.
    in Class:-
    CL_EX_WORKORDER_UPDATE
    I was informedby the user that this is working perfectly fine in DEV System. The Short Dump is occuring in SBX System.
    When I executed the Class "CL_EX_WORKORDER_UPDATE" and Method "IF_EX_WORKORDER_UPDATE~AT_SAVE" via SE24 in SBX, I got the same dump. However it worked fine in DEV System.
    I am wondering if the issue is with the Standard Program itself?
    Any ideas?
    Thanks a lot again.
    Another thing is: It is short dumping even before calling any of the BADI Implementations.
    Wanted to give some more info on this: I put a break point in Function "CO_ZV_ORDER_POST" after the CALL FUNCTION 'CO_BADI_GET_BUSINESS_ADD_IN'.
    And the program dumps right after that when it calls the: CALL METHOD lp_badi_if->at_save.
    Thanks.
    Edited by: ravi kumar on Feb 22, 2011 1:51 PM
    Edited by: ravi kumar on Feb 22, 2011 2:11 PM

  • "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.

Maybe you are looking for

  • HT1918 what is the postal-code for lebanon ? I cand find it :(

    what is the postal-code for lebanon ? I cand find it

  • Dragging image from minibridge to frame which isn't on top (CS5)

    Hi there, I'm working with InDesign CS5 I've created a frame on a page, dragged an image to it. I now need to replace it with a new image. I do this by: 1) selecting the frame 2)dragging from mini bridge. This works fine if the frame is the top most

  • Can't print PDF from an email

    I recently received an email with a link to a pdf file.  I can view it, but cannot print it. I tried going to another website to print out a manual, same thing.  I can see it, but can't print. I can print from my email, Textedit, iPhoto with not prob

  • Aggregate=aggravating!

    OK, so I've got my M-Audio Firewire 410 plugged in and ready to go for my first recording. (Following the Logic Pro Training book). Obviously there's no sound coming through my headphones because I spend an hour trying to figure it out myself before

  • CProjects 4.0 - Evaluations

    Hi... When some users get to Evaluations tab, all that they get to see is a 'Loading' Page. And this loading continues till eternity - nothing follows. And as such they aren't able to user Evaluations. This is not a login issue because things work go