Implementing BADI MD_ADD_COL_EZPS in extending MD04 transaction.

Hello Experts,
I have a query in regard to extending MD04 transaction.
Currently MD04 is enhanced with 3 custom buttons (used buttons are: BUTTON1_EZ, BUTTON2_EZ and BUTTON3_EZ)  being displayed based on which a new column gets displyed in the table control.
Now when I have to  add a new custom button, I try to use BUTTON1_PS in same implementation of BADI "MD_ADD_COL_EZPS" to display another column in table control.
The problem here is that it isn't getting displayed on MD04 screen nor can I use it from path in Menu Bar:
Settings --> User Exit Periods. Here it isn't showing in activated mode.
Kindly provide your inputs.
Regards,
Ansh

Any inputs would be of great help.
Regards,
Ansh

Similar Messages

  • BADI's for the MD04 Transaction ?

    Hello All ,
               I want to know the BADI's for the MD04 Transaction.
    I want to incorporate one Custom-Authorization Object in this Transaction.
    Is it Posible ?
    If yes can anyone help me out ?`
    Regards,
    Deepu.K

    There are multiple ways of searching for BADI.
    • Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
    • Finding BADI Using SQL Trace (TCODE-ST05).
    • Finding BADI Using Repository Information System (TCODE- SE84).
    1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for ‘CL_EXITHANDLER=>GET_INSTANCE’.
    Make sure the radio button “In main program” is checked. A list of all the programs with call to the BADI’s will be listed.
    The export parameter ‘EXIT_NAME’ for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter ‘INSTANCE’ will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
    2. Start transaction ST05 (Performance Analysis).
    Set flag field "Buffer trace"
    Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
    Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
    Push the button "Deactivate Trace".
    Push the button "Display Trace".
    The popup screen "Set Restrictions for Displaying Trace" appears.
    Now, filter the trace on Objects:
    • V_EXT_IMP
    • V_EXT_ACT
    Push button "Multiple selections" button behind field Objects
    Fill: V_EXT_IMP and V_EXT_ACT
    All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
    So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
    3. Go to “Maintain Transaction” (TCODE- SE93).
    Enter the Transaction VD02 for which you want to find BADI.
    Click on the Display push buttons.
    Get the Package Name. (Package VS in this case)
    Go to TCode: SE84->Enhancements->Business Add-inns->Definition
    Enter the Package Name and Execute.
    Here you get a list of all the Enhancement BADI’s for the given package MB.
    Also have a look at below report which will list BADIs.
    *& Report  ZNEGI16                                                     *
    REPORT  ZNEGI16                                 .
    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.
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Implementing BADI MD_ADD_COL_EZPS for MD04 custom column

    Hi there,
    I'm using BADI MD_ADD_COL_EZPS to display 3 new buttons and three new columns in MD04.
    For each line item that is displayed, the custom column is filled, after the button is hit -This works fine.
    My Question is:
    Is there any way to limit the value that is filled into the new column so that it only appears on the FIRST line item/row?
    (At the moment it is repeated all the way down the page - the new value is a material characteristic, so doesn't change, will always be the same for each line)
    I've looked at all the available structures/tables in the FILL_ADD_COLUMNS method of the BADI, and none seem suitable
    to determine the "first" row. (ie. something like the way SY-TABIX or SY-INDEX might be used)
    Any help appreciated.
    Thanks,
    David.

    Hi Shubhendu,
    in the method 'ACTIVATE_ADD_COLUMNS', you can set the flag EZ1_MODE to '1' to make the first column visible always. (it's been a while, but I think setting it to '2' makes it visible when the button is pressed.)
    Same applies to EZ2_MODE for second column, EZ3_MODE for third.
    look at the flags/parameters in this method, and also in FILL_ADD_COLUMNS, to fill the data.
    here you need to fill structure EMDEZX_USEX1 (for column 1) etc.
    The code is hit for each record displayed in MD04
    Hopefully this helps you.
    Regards,
    David

  • Need Ways to implement Badis in ECC 6.0 (Enhancement Points)

    Hi experts,
    I am new to BADIs. I've a requirement to find a BADI for changing Customer number while posting customer invoice in SAP (the data is coming from XI system in IDOC format). I want to know any BADIs or userexits are there for my requirement. At the same time I want to know how to implement a BADI in ECC 6.0 .Any docs releated to this topic will be of great help.
    points will be awarded for sure..........

    hi Poorna Chandras... ,
    These steps should enable you to find any BADI related to any transaction in a matter of minutes.
    Procedure 1:
    1) Go to the transaction SE37 to find your function module.
    2) Locate the function SXV_GET_CLIF_BY_NAME.
    3) Put a breakpoint there.
    4) Now open a new session.
    5) Go to your transaction. 6) At that time, it will stop this function.
    7) Double click on the function field EXIT_NAME.
    8) That will give you name of the BADI that is provided in your transaction.
    Business Add-Ins
    Procedure 2:
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    4) Now Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction
    SAP Business Add-Ins (BAdIs) are one of the most important technologies used to adapt SAP software to specific requirements. BAdIs were introduced with Release 4.6 and replace function module exits. This technology is not limited to SAP applications. BAdI calls can be integrated in customer applications. These can then be enhanced by other customer applications. In the various SAP applications, BAdI calls are implemented at places where enhancements are appropriate.Business add-ins are enhancements to the standard version of the system. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
    In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, country-specific versions, industry solutions, partner, customer, and so on). You can create definitions and implementations of Business Add-Ins at any level of the system landscape.SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to differentiate between Add-In implementations using the filter Country or other criteria.
    The enhancement technique is set up in such a way that it is possible to define interfaces for ABAP soure code, screens, GUI interfaces, and tables. These allow customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
    BADI is just an object-oriented version of user-exit. Instead of entering program code into some function module (as in customer-exit), you define some class which has to implement predefined methods and those methods are fired at predefined points just like an old user-exit. Some BADI can have multiple independent implementations which is much better for software deployment as several developers can implement the same BADI independently. BADI/UserExists are used to enhance R/3 For customer Needs.
    Actually there is no transaction to find when and where the BADI
    is called.
    1. You can see the BADI description to find why it is called.
    2. Once you implemented and activated the BADI, put some break points
    in the BADI and see "where else used" option to check in what all
    programs this BADI is called. In the ITS debug, when you are doing
    the operation what exactly the BADI description tells, it will take
    to the break points and you have to do manually debug the whole thing.
    I know its bit difficult to do manual debug the whole thing, it
    takes lot of time, but you have to be very patience when you are
    dealing with BADI's.
    Transaction SE18 is the BADI equivalent of transaction SMOD
    Transaction SE19 is the BADI equivalent of transaction CMOD .
    To find the BADI to be implemented and then implement this via SE19.
    Check this blogs 2 find a BADI:
    How to find if we have a BADI in Transaction VB02
    Re: BADI for screen enhancement in MM01  transaction
    Re: BADI and User exits
    How To Define a New BAdI Within the Enhancement Framework (Some Basics About the BAdI,BAdI Commands in ABAP,
    When to Use a BAdI?)
    /people/thomas.weiss/blog/2006/04/03/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
    /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
    Introducing Business Add-Ins
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f3202186-0601-0010-6591-b832b1a0d0de
    How to implement BAdi in Enhancement Framework
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702
    Business Add-Ins
    http://help.sap.com/saphelp_47x200/helpdata/en/ee/a1d548892b11d295d60000e82de14a/frameset.htm
    BAdI: Customer-Defined Functions in the Formula Builder
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    Difference Between BADI and User Exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    To Use BADI - Business Add In you need to Understand ABAP OO Interface Concept
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    You can check the links for Step by Step Badi Implemntation
    (very helpful self learning docs).
    BADI Step by Step Implementation.
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/63ee7f486cc143a560799d8803ce29/content.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/badi-general+information&
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    The specified item was not found.
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    http://www.allsaplinks.com/badi.html
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-serieshttps:///people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    /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 /people/thomas.weiss/blog/2006/05/03/source-code-enhancements--part-5-of-the-series-on-the-new-enhancement-framework
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40921dd7-d5cf-2910-1894-bb62316afbd1
    http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /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
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
    Difference Between BADI and User Exits
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    New to Badi`s
    New to BADI
    New to BADI long question
    Badi
    /message/4866901#4866901 [original link is broken]
    Hope this helps
    Rewards if useful.........
    Cheers
    Kripa Rangachari.

  • Orders, deliv. and conRel fields in MD04 transaction code

    Hi All,
    I want to know the database tables and fields for Orders, deliveries and conrel fields in MD04 transaction code.
    In MD04 if you give material and plant as input details and say continue, we are getting the Stock requirement list. In that MRP elements : Orders, deliveries and conrel  and the quantity fields against to these elements ,, from where we are getting the data. Is there any function modules for the same?
    Kindly advice me.
    Thanks in advance.
    Regards
    Ramesh.

    Hi Ram Kumar,
    I'm not sure about the screen enhancements can be done for the transaction FBCJ as we don't have any screen exits.
    But we have only BAdI for FBCJ transaction called CJ_DOCUMENT - Change to External Document before Cash Journal Doc. Check.
    Workaround on the method CHANGE with the changing parameter C_ITCJ_SPLIT_POSTINGS.
    Enhance the structure ISCJ_POSTINGS to add your new fields and write the logic in the BAdI method to populate the values to these fields.
    Please give a try and let us know.
    Regards
    Gangadhar
    Message was edited by: Gangadhar Ragula

  • Implementing Badi: BADI_MAT_CUST_SCR

    Hello Experts!
    I'm trying to insert customer defined fields in material component in CJ20N. I'm implementing Badi: BADI_MAT_CUST_SCR.
    Customer tab appeared. But next I have some problem: i need to extended 2 methods GET_SCREEN_DETAILS and GET_CUST_FEILDS. If someone extended this methods, please help me, i need simple example of realization this 2 methods.
    Thank you.

    Hi Ruslan,
    Just go through this link.[Enhancement in PRj|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60ccc737-d6ea-2b10-32ad-e9020b000e43?QuickLink=index&overridelayout=true]
    If need you can do through exit also.
    Regards,
    Madhu.

  • Implementing badi in /sapapo/ccr

    Hi
    The requirement is to implement badi /SAPAPO/CIF_DELTA3 for Filtering of objects not relevant for the comparison (RELEVANT_FOR_COMPARE_APO). When this report runs for purchase requisition, we see error code 182. We do not want to see the error code 182 appearing for those Product locations (PRs) that are deliberately stopped from moving to R3.We are  maintaining a list of these Product location combinations in a custom table in APO. How this BADI will be implemented ?
    Thanks
    Manas

    Hi,
    CCR will try to compare transaction data of APO with ECC. Your developer needs to write the logic in BADI that for these product- location combination (mentioned in Z table) do not compare purchase requisitions.
    At the same time you need to stop these purchased requisitions coming from APO to ECC in the userexit :CIFPUR01
    EXIT_SAPLCPUR_001 (enhancement to change purchasing data (purchase requisitions, purchase orders) in ERP inbound)
    Thanks,
    Pavan Verma

  • Implementing BADI - SMUM_ASSIGN_ROLE

    Hello All,
    I am into implementing BADI SMUM_ASSIGN_ROLE, As first time I am going to do it, I encountered a problem. I went into se19 I gave the implementation name as Z_SMUM_ASSIGN_ROLE and then on the second popup I gave the definition name as SMUM_ASSIGN_ROLE. When next screen comes I tried to do a syntax check it says BADI imlementation Z_SMUM_ASSIGN_ROLE does not exist and when I save it it says "Please specify filters type".
    Could any one tell me what are the steps to implement a BADI.
    Thanks,
    Mark

    Hi Mark,
    Plz follow the following steps to implement the BADI.
    a)     The list of Business Add-ins available in the system can be found through SAP Reference Implementation guide (IMG) or in component hierarchy. Badi’s definition is included in IMG so that the customer/partner can create suitable, company-specific implementations. 
    b)     In the SAP menu, choose ABAP Workbench -> Utilities -> Business Add-ins or transaction code SE19.
    c)     Enter the implementation name and click on the create button.
    d)     Enter the BAdi name
    e)     Enter the short description for the BAdi implementation and implement the interface in the class appearing in the BAdi implementation screen.
    f)     Double click on the implementation class and insert the desired source code for the implementation between the method ZIF_EX_BUSINESSADDIN~CONVERSION. And Method. In this particular example enter the statement translate parameter to upper case.  Save and activate your entries and return to the change implemention screen.
    g)     Choose Activate, now you can use this implementation when the application program is executed. Several implementations may exist for a Business Add-in but that is not used in multiple use basis. However only one implementation can be activate at any one time. But in case of multiple use of the BAdi, we can have multiple implementations activate. The instance generation of the implementing class must set the attribute as public and not as private, protected or abstract. System will give dump if you do so.
    <b>Reward points if it solves ur query</b>
    Thanks
    Chinmay

  • Help needed implementing badi IWO1_ORDER_BADI

    Hi guys!
    I have a problem.
    When I create an order with reference in trx IW31, that reference order HAS to be released. I need to check this after the first screen.
    I found this badi, IWO1_ORDER_BADI. I did a trace and this badi appears. I created a "Z" implementation, but this didin't work. I even set a breakpoint in the standard badi and the system never stoped there.
    I'm a newbie in this BADI thing. Maybe I'm missing something, I don't know.
    I have Sap 4.7.
    Any ideas on what I'm doing wrong???
    Any help is welcome!

    I think I had similar issue, I was on 4.6. I know that method for finding a BADI starts on a later version of SAP. Here is some code for finding a BADI of you know the transaction:
    *& Report  Y_TMM_FIND_BADI
    *&  This will find a BADI or Exit.
    REPORT  Y_TMM_FIND_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.

  • Implementing BADIs CFX_STATUS_TRANS and CFX_STATUS_TRANS_UI

    How would I go about implementing BADIs CFX_STATUS_TRANS and CFX_STATUS_TRANS_UI?  I have never used a BADI before but I have read documentation on implementing BADIs.  One example of such is https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702 
    What would I need to do to use either of these BADIs?  Specifially, I will need to
    •     Get Project Details such as Description, Dates, etc and return these to cFolders for population in the Document
    •     Get Project Partner details such as Names, addresses, email addresses etc for selection and population
    Is it possible in these BADIs?  I was asked to begin with the two BADIs that I listed above but I am unsure how they will help.
    Regards,
    Davis

    Hi Davis,
    If you run the transaction SE18 using the Badi you mentioned, click of 'Display', then you will find a button 'Document', which you can find out, which purpose has the involved Badi.
    Kind regards,
    Zhenbo

  • How to find out which Badi is triggering in which transaction

    Hi SAP gurus,
    Can any one tell me How to find out  which Badi is triggering in which transaction.
    If I have a BADI . I want to know in how many transaction it will trigger.
    Can you help me in this issue. Its very important and urgent.
    Points will be rewarded.
    Thanks,
    Satish.

    Hi Satish,
    Check this blog -
    /people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it
    Check Clemens reply in this thread, its great-
    BADI
    <b>Reward Points if this helps,</b>
    Satish

  • Problem on Implementing badi ME_GUI_PO_CUST

    Hi Expert,
    I have implement BADI ME_GUI_PO_CUST, to add the new tab.
    I have managed to View the tab in Both ME21N, and ME22N with implement SUBSCRIBE and MAP_DYNPRO_FIELDS.
    method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE
      DATA: ls_subscriber LIKE LINE OF re_subscribers.
      CHECK im_application = 'PO'.
      CHECK im_element = 'ITEM'.
      CLEAR re_subscribers[].
      ls_subscriber-name = subscreen1.
      ls_subscriber-dynpro = '0002'.
      ls_subscriber-program = 'ZRPP_ME_GUI_PO_CUST_SCREEN'.
      ls_subscriber-struct_name = 'CI_EKPODB'.
      ls_subscriber-label = text-001.
      ls_subscriber-position = 7.
      ls_subscriber-height = 7.
      APPEND ls_subscriber TO re_subscribers.
    METHOD : IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS
      FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
      LOOP AT ch_mapping ASSIGNING <mapping>.
        CASE <mapping>-fieldname.
          WHEN 'ZCNUM'.      <mapping>-metafield = mmmfd_cust_01.
        ENDCASE.
      ENDLOOP.
    Method IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS
      DATA: lw_fieldselection LIKE LINE OF ch_fieldselection.
      LOOP AT ch_fieldselection INTO lw_fieldselection.
        lw_fieldselection-fieldstatus = '+'.
        MODIFY ch_fieldselection FROM lw_fieldselection.
      ENDLOOP.
    I need to store the value, and some of thread said it required methods:
    TRANSPORT_FROM_MODEL
    TRANSPORT_TO_DYNP
    TRANSPORT_FROM_DYNP
    TRANSPORT_TO_MODEL
    I have click on the subcreen, or enter at the field, but it will not able to trigger the Above Methods.
    How do I do for the to trigger above Methods? Or Should I added some additional code at screen program? I want SAVE the data actually into EKPO.
    Thanks in advance.

    Hi Sim,
    Recently we have the same reqirement.
    You can have a look at the below code..
    First method: SUBSCRIBE  
    DATA: ls_subscriber LIKE LINE OF re_subscribers.* we want to add a customer subscreen on the Header tab
        CHECK im_application = 'PO'.
        CHECK im_element     = 'HEADER'.* each line in re_subscribers generates a subscreen. We add one subscreen in this example
        CLEAR re_subscribers[].
    * the name is a unique identifier for the subscreen and defined in this class definition
        ls_subscriber-name = subscreen1.
    * the dynpro number to use
        ls_subscriber-dynpro = '0001'.
    * the program where the dynpro can be found
        ls_subscriber-program = 'SAPLZKMMM_KAU86037'.
    * each subscreen needs his own DDIC-Structure
        ls_subscriber-struct_name = 'CI_EKKODB'.
    * a label can be defined
        ls_subscriber-label = text-001.
    * the position within the tabstrib can be defined
        ls_subscriber-position = 13.
    * the height of the screen can be defined here. Currently we suport two screen sizes:
    * value <= 7 a sevel line subscreen
    * value > 7  a 16 line subscreen
        ls_subscriber-height = 7.    APPEND ls_subscriber TO re_subscribers.Here, parameter u2018im_elementu2019 is defined as u2018HEADERu2019 as we are adding new tab in header section of PO.  
    Define a function group and take the main program and define it in ls_subscriber-program.
    Also define a sub screen with the required fields and assign it to the parameter ls_subscriber-dynpro.  
    Then method MAP_DYNPRO_FIELDS  
    FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
        LOOP AT ch_mapping ASSIGNING <mapping>.    CASE <mapping>-fieldname.      WHEN 'ZZPAYMENT_AGRE'.      <mapping>-metafield = mmmfd_cust_03.
          WHEN 'ZZPROJECT'.                     <mapping>-metafield = mmmfd_cust_04.
        ENDCASE.  ENDLOOP.  TRANSPORT_FROM_MODEL:
    DATA:     l_header       TYPE REF TO if_purchase_order_mm,
                  ls_mepoheader  TYPE mepoheader,
                  ls_customer    TYPE CI_EKKODB.*--------------------------------------------------------------------*
    * system asks to transport data from the business logic into the view
    *--------------------------------------------------------------------*    CASE im_name.      WHEN subscreen1.* is it an Header? im_model can be header or item.
            mmpur_dynamic_cast l_header im_model.
            CHECK NOT l_header IS INITIAL.* transport standard fields
            ls_mepoheader = l_header->get_data( ).* store info for later use
            MOVE-CORRESPONDING ls_mepoheader TO dynp_data_pbo.
          WHEN OTHERS.
        ENDCASE.    TRANSPORT_TO_DYNP:
    Define a FM 'ZK_KAU86037_PUSH' to push the values.CASE im_name.      WHEN subscreen1.        CALL FUNCTION 'ZK_KAU86037_PUSH'
              EXPORTING
                im_dynp_data = dynp_data_pbo.      WHEN OTHERS.
        ENDCASE.    TRANSPORT_FROM_DYNP:
      Define another FM 'ZK_KAU86037_POP'.CASE im_name.      WHEN subscreen1.        CALL FUNCTION 'ZK_KAU86037_POP'
              IMPORTING
                ex_dynp_data = dynp_data_pai.        IF dynp_data_pai NE dynp_data_pbo.
    * something has changed therefore we have to notify the framework
    * to transport data to the model
              re_changed = mmpur_yes.
            ENDIF.      WHEN OTHERS.
        ENDCASE.  TRANSPORT_TO_MODEL:     
            DATA: l_header             TYPE REF TO if_purchase_order_mm,
              ls_mepoheader        TYPE mepoheader,
              ls_customer          TYPE CI_EKKODB,
              l_po_header_handle   TYPE REF TO cl_po_header_handle_mm.*--------------------------------------------------------------------*
    * data have to be transported to business logic
    *--------------------------------------------------------------------*    CASE im_name.      WHEN subscreen1.* is it an item? im_model can be header or item.
            mmpur_dynamic_cast l_header im_model.
            CHECK NOT l_header IS INITIAL.        ls_mepoheader = l_header->get_data( ).* standard fields changed?
            IF dynp_data_pbo-zzpayment_agre   NE dynp_data_pai-zzpayment_agre
            OR dynp_data_pbo-zzproject        NE dynp_data_pai-zzproject.* update standard fields
              ls_mepoheader-zzpayment_agre   = dynp_data_pai-zzpayment_agre.
              ls_mepoheader-zzproject  = dynp_data_pai-zzproject.
              CALL METHOD l_header->set_data
                EXPORTING
                  im_data = ls_mepoheader.
            ENDIF.
          WHEN OTHERS.    ENDCASE. 
    Then we have to implement one more BADI to display the tab and update the values.
    Implement the BADI ME_PROCESS_PO_CUST. This cannot be used multiple times.  
    In this, we have methods (PROCESS_HEADER,PROCESS_ITEM).if we need to any validations for the fields we can write the logic here in this methods. In my case I need to check for the document type which I implemented in the method (PROCESS_HEADER).  
    Hope it helps you.
    Thanks
    Arbind

  • Implementing BADI ALM_ME_001_ORDER

    Hi All,
    <i>MAM30 SR1</i>
    <i>MI25 SP15</i>
    I followed the guide for implementing BADI ALM_ME_001_ORDER to get more fields for the ORDER_OPERATION details.
    In the MI server, merep_mon says my fields and values are there and enhancement flags, and so as in the device - if I look in start.jsp.
    But they are nowhere to be found on the screen.  What did I miss?
    Here's what I did:
    1) added fields in CI_ALM_ME_ORDER_OPERATION structure
    2) implemented BADI method MAM30_GETDETAIL
    METHOD if_ex_alm_me_001_order~mam30_getdetail .
      DATA: l_oper     TYPE mam_30_order_operation,
            lce_oper   TYPE alm_me_custom_order_operation.
      LOOP AT order_operation INTO l_oper.
        clear lce_oper.
        lce_oper-zusr00 = l_oper-usr00.
        lce_oper-zusr01 = l_oper-usr01.
        lce_oper-zusr02 = l_oper-usr02.
        lce_oper-zusr03 = l_oper-usr03.
        lce_oper-key_activity = l_oper-activity.
        lce_oper-key_sub_activity = l_oper-sub_activity.
        APPEND lce_oper TO ce_order_operation.
        l_oper-enhancement_flag = 'X'.
        MODIFY order_operation
          FROM l_oper TRANSPORTING enhancement_flag.
      ENDLOOP.
    ENDMETHOD.
    3) implemented BADI method MAM30_GETLIST
    METHOD if_ex_alm_me_001_order~mam30_getlist .
      DATA l_order_list TYPE mam_30_order_header.
      LOOP AT order_list INTO l_order_list.
        l_order_list-enhancement_flag = 'X'.
        MODIFY order_list
          FROM l_order_list TRANSPORTING enhancement_flag.
      ENDLOOP.
    ENDMETHOD.
    <i></i>

    Hi Kuya!
    Did you activate your BADI implementation in SE19?
    Thank You
    Gisk

  • Implementation of DragManager in extended Panel class

    Hi,
    I'm facing a problem during implementation of DragManager in
    extended Panel class. I've a component which is extending the Panel
    class where I've attached four Images with their corresponding
    dragging features.
    Say, the four images' x positions as these: x1 = 10, x2 = 20,
    x3 = 30, x4 = 40. After adding the DragManger class and
    implementation of dragging feature to those Images, the dragging is
    works fine. But, the problem is, when I'm dragging x1 image, the
    imageProxy associated to x1 starts showing from exactly the x1
    position, but also all the three images' (x2, x3, x4) imageProxy
    starts dragging from x1 position only! When the expected result is,
    the x2 imageProxy shud starts drag from x2 x position itself, and
    for other x3 imageProxy from x3 position and x4 is their also.
    Except the x1 image, all the other three's imageProxy are not
    starts from their respective image x position.
    Anyone can give any idea.. how to overcome this?
    tnks.
    ASB

    What are the:
    DragManager.doDrag(initiator, ds, event, imageProxy, x, y,
    1.0);
    x and y parameters in your drag manager's doDrag method? They
    should be calculated from the point of mouse click that would
    event.localX and event.localY.
    ATTA

  • Implementing BADI TRIP_WEB_NUMBER, problem reading a field

    Hi All,
    Have anyone implemented BADI TRIP_WEB_NUMBER before,
    Interface : IF_EX_TRIP_WEB_NUMBER
    Method:     USER_EXIT_NUMBER_INTERNAL
    I need a help.
    In this method i have exporting parameter NUMBER_RANGE TYPE INRI-NRRANGENR
    so my requirement is just to change this parameter for particular conditon.
    Problem is to make condition i need a field SCHEMA
    You can check Structure HEAD_PERIO-SCHEM
    or elset T706S OR T706T...
    I need to read that field at runtime somehow, how can i achieve that pls help.
    i can able to read only the date....
    Pls help..
    Thanks

    Find out the main program name where the variable HEAD_PERIO-SCHEMA is declared. Then you can use the ABAP call stack method to retrieve the variable like below. This method can only be used to read a variable from ABAP call stack memory, that is the variable should be available in the scope of the program which is present in the run time call stack your BADI gets called in.
    DATA: lv_name_xvbak(30)  VALUE   '(SAPMV45A)VBAK'.
    FIELD-SYMBOLS: <xvbak> TYPE  vbak.
    * Retrieve Sales order details from abap stack
    ASSIGN (lv_name_xvbak) TO <xvbak>.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.
    In the above code you can replace SAPMV45A with the main program name where field SCHEMA is available and VBAK with HEAD_PERIO (the structure or internal table where the field you want is available)
    For accessing internal tables similarly
    DATA:  lv_name_xvbap(30)  VALUE   '(SAPMV45A)XVBAP[]'.
    FIELD-SYMBOLS: <xvbap> TYPE TABLE OF vbap.
    ASSIGN (lv_name_xvbap) TO <xvbap>.
    IF sy-subrc NE 0.
      EXIT.
    ENDIF.

Maybe you are looking for