CCM BAdI implementation debuging

Hello,
I'd like to debug my BAdI implementation (/CCM/CTLG_ENRICHMENT) but I can't. What is the good debugging method for CCM BAdI-s?
I tried to insert a never ending loop in the code and debug the looping process (in sm50) but it doesn't work.
Please give me some idea.
Thanks and regards
Almos

Hello Masa,
Thanks for the helpful advice, the debugging is working now. Do you know some documentation or material where I can find some useful detailed infomation about using CCM BAdI?
I don't know exactly the differences between the /CCM/CTLG_ENRICHMENT and the /CCM/CHAR_VALUATION BAdI. What is the prefered BAdI when you'd like to change or append uploaded CCM catalog data?
Thanks and regards
Almos

Similar Messages

  • CCM enrichment BaDI implementation - exception handling

    Hello CCM Gurus,
    We're using CCM 2.0 version. I'd like to make an upload enrichment implementation, and raise an exception if one item has some problem. Every time if in the code an exception is raised according to one item, the whole catalog upload goes wrong, and the upload of the other good items go wrong as well. If it is possible I'd like to get a warning or an error message in SLG1 from the problematic items, but the correct items should be load into the catalog.
    If you have a sample implementation like this, what is solved this issue please send me.
    Thanks and regards
    Almos

    Hello Masa,
    Thanks for the helpful advice, the debugging is working now. Do you know some documentation or material where I can find some useful detailed infomation about using CCM BAdI?
    I don't know exactly the differences between the /CCM/CTLG_ENRICHMENT and the /CCM/CHAR_VALUATION BAdI. What is the prefered BAdI when you'd like to change or append uploaded CCM catalog data?
    Thanks and regards
    Almos

  • 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

  • CCM BAdi During File Upload

    Hi All,
    We are looking for a BADI during the file upload for Supplier catalog. The requirement is to modify the file ocntents during upload.
    We tried implementing BADI /CCM/CTLG_ENRICHMENT, but seems like this BADI is not called during the upload function at all..
    Please help us to fix this..
    Thanks in Advance
    Karthik

    Karthik,
    The Upload process is launched in a background task, that is why you have to 'insert a infinite loop' as Bertrand said, in order to enter in debug mode through transaction SM50.
    PS: Please be careful, and use filters in your BADI implementation, because it is called also in the mapping and publishing processes.
    Regards.
    Vadim

  • 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

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

  • 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

  • The time when the BADI implementation class really initialize.

    when I debug the cl_exithanler=>get_instance, I found that it returns the class name as: CL_IM_EX..., not the implementation class name begin with: ZCL_IM... which is created by me. So when does the BADI implementation class really initialize?

    It's not a macro, as Uwe showed you. Inside your Constructor method just enter the following code:
    break sy-uname
    Because of the '.' in your name you cannot use
    break yuan.gan.
    I am suprised to see that as a user name like that though.

  • 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

  • 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

  • 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

  • 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

Maybe you are looking for