<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic BADI in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903997#M936482</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we find BAdI's available for a program or a transaction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2008 16:30:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-29T16:30:01Z</dc:date>
    <item>
      <title>BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903997#M936482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we find BAdI's available for a program or a transaction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 16:30:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903997#M936482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T16:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903998#M936483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go through this process&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Goto se24 (Display class cl_exithandler)&lt;/P&gt;&lt;P&gt;2) Double click on the method GET_INSTANCE.&lt;/P&gt;&lt;P&gt;3) Put a break point at Line no.25 (CASE sy-subrc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now&lt;/P&gt;&lt;P&gt;4) Execute SAP standard transaction&lt;/P&gt;&lt;P&gt;5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.&lt;/P&gt;&lt;P&gt;6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.&lt;/P&gt;&lt;P&gt;7) This way you will find all the BADIs called on click of any button in any transaction&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 16:30:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903998#M936483</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T16:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903999#M936484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lavanya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition to the above answer I will give you the piece of code &lt;/P&gt;&lt;P&gt;just paste in and execute it. You will be getting the list of exits and BADI's available for that particular Tcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  ZSWAMY_BADI_FINDING.


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.


do 2 times.

enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;gt;First go to any transaction-&amp;gt;iN THE menu bar SYSTEM-&amp;gt;STATUS-&amp;gt;Get the program name -&amp;gt;double click-&amp;gt;u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;gt;Goto SE24-&amp;gt;Give class name as CL_EXITHANDLER-&amp;gt;Display-&amp;gt;double click on get_instance mathod-&amp;gt;Now u will go inside the method-&amp;gt;Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if useful.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Swamy Kunche&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Swamy Kunche on May 29, 2008 6:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 16:41:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3903999#M936484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T16:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3904000#M936485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1)  The procedure to discover BAdIs by a Performance Trace&lt;/P&gt;&lt;P&gt;/people/alwin.vandeput2/blog/2006/04/13/how-to-search-for-badis-trace-it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)Follow the below steps to find a BADI thourgh class CL_EXITHANDLER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.&lt;/P&gt;&lt;P&gt;2. In 'Display' mode, go to 'Methods' tab.&lt;/P&gt;&lt;P&gt;3. Double click the method 'Get Instance' to display it source code.&lt;/P&gt;&lt;P&gt;4. Set a breakpoint on 'CALL METHOD cl_exithandler=&amp;gt;get_class_name_by_interface'.&lt;/P&gt;&lt;P&gt;5. Then run your transaction.&lt;/P&gt;&lt;P&gt;6. The screen will stop at this method.&lt;/P&gt;&lt;P&gt;7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran Sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 16:46:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3904000#M936485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3904001#M936486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses. Now I found the BADI and trying to figure how to copy data from SDATA to other fields. Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 16:49:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3904001#M936486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T16:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: BADI</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3904002#M936487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that menthod....code something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: ls_segnam type E1XXXXXX.,
        lv_fld1        type fld1.

case.
when edidd-segnam eq 'E1XXXXXX'.
move edidd-sdata to ls_segnam.
endcase.

move ls_segname-fld1 to lv_fld1.
............................................
...........................................&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 16:53:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/badi/m-p/3904002#M936487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T16:53:07Z</dc:date>
    </item>
  </channel>
</rss>

