<?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 Re: How to define, implement custom BADIs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051638#M423005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOu can do the implementations for the badis in se19 transaction.&lt;/P&gt;&lt;P&gt;YOu will find the badi definitions in se18 transaction.&lt;/P&gt;&lt;P&gt;You have to create implementation for a definition.&lt;/P&gt;&lt;P&gt;Give a z name for your implementation and also give the name of the badi definition for which you are doing the implementation.&lt;/P&gt;&lt;P&gt;Once you go into the se19 transcation, you can find different methods in that definition which can be redefined as per your requirement.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Mar 2007 10:13:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-08T10:13:38Z</dc:date>
    <item>
      <title>How to define, implement custom BADIs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051637#M423004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody tell me how to define, implement custom BADIs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the procedure to find out these custom BADIs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2007 10:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051637#M423004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-08T10:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to define, implement custom BADIs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051638#M423005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOu can do the implementations for the badis in se19 transaction.&lt;/P&gt;&lt;P&gt;YOu will find the badi definitions in se18 transaction.&lt;/P&gt;&lt;P&gt;You have to create implementation for a definition.&lt;/P&gt;&lt;P&gt;Give a z name for your implementation and also give the name of the badi definition for which you are doing the implementation.&lt;/P&gt;&lt;P&gt;Once you go into the se19 transcation, you can find different methods in that definition which can be redefined as per your requirement.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2007 10:13:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051638#M423005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-08T10:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to define, implement custom BADIs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051639#M423006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	Execute Business Add-In(BADI) transaction SE18&lt;/P&gt;&lt;P&gt;2.	Enter BADI name i.e. HRPBSGB_HESA_NISR and press the display &lt;/P&gt;&lt;P&gt;        button &lt;/P&gt;&lt;P&gt;3.	Select menu option Implementation-&amp;gt;Create&lt;/P&gt;&lt;P&gt;4.	Give implementation a name such as Z_HRPBSGB_HESA_NISR&lt;/P&gt;&lt;P&gt;5.      You can now make any changes you require to the BADI within this &lt;/P&gt;&lt;P&gt;        implementation, for example choose the Interface tab&lt;/P&gt;&lt;P&gt;6.	Double click on the method you want to change, you can now enter &lt;/P&gt;&lt;P&gt;        any code you require.&lt;/P&gt;&lt;P&gt;7.      Please note to find out what import and export parameters a &lt;/P&gt;&lt;P&gt;        method has got return the original BADI definition &lt;/P&gt;&lt;P&gt;        (i.e. HRPBSGB_HESA_NISR) and double click on the method name &lt;/P&gt;&lt;P&gt;        for example within HRPBSGB_HESA_NISR contract is a method&lt;/P&gt;&lt;P&gt;8.      When changes have been made activate the implementation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anirban M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 09:11:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051639#M423006</guid>
      <dc:creator>former_member480923</dc:creator>
      <dc:date>2007-03-09T09:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to define, implement custom BADIs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051640#M423007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have create your own BADI in transaction SE18 with the name starting z* or y* . with relevant methods etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implement the BADI in transaction SE19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Important. use the following function modules to check whether the BADI is active or not in the program where you will call your BADI. &lt;/P&gt;&lt;P&gt;If you dont use this funcitonality then there is no point in writing your own badi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CO_BADI_GET_BUSINESS_ADD_IN&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;HR_GET_BUSINESS_ADD_IN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Reward if Helpful ****&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 12:38:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051640#M423007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-09T12:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to define, implement custom BADIs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051641#M423008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Neela,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go throught e following Steps  for defining &amp;amp; Implement BADI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto Tcode SE18 for BADI Definition Creation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give definition Name : ZBADI_CUST--&amp;gt; Press F5 button for Creating the Definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give Description for the BADi Definition : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Attributes tab you will find "TYPE" Tab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there you will check the Check Box as "Multiple" because this badi definition is active for multiple BADI Implementations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save &amp;amp; check the Badi Definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on "Interface" tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Double Click on the Interface Name that is "ZIF_EX_BADI_CUST" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here the screen is take you to tcode SE24 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you will declare the methods &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give method name as "GET_MATERIAL" as INSTANCE Level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on Parameters Button just above your Method"GET_MATERIAL"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and Give Parameters as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P_MATNR IMPORT Type  MATNR press enter&lt;/P&gt;&lt;P&gt;X_MARA CHANGING      MARA  press enter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save check and activate your badi Definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : you just declare the method in BADI Definition Section you will write the Method Implementation &lt;/P&gt;&lt;P&gt;       in BADI IMPLEMENTATION Section.Because BADI's are pure Abstact class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto Tcode SE19:&lt;/P&gt;&lt;P&gt;      give Implementation name as : ZBADI_CUST_IMPL and press "F5" for Creation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it asks BADI Definition name as "ZBADI_CUST" just you create .&lt;/P&gt;&lt;P&gt;      and press enter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;		and you give the BADI Implementation Description : XXXXXXXXXXXXXXXXXXXX&lt;/P&gt;&lt;P&gt;      save this Implementation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click on the Interface tab and double click on the Implementation Class as "ZCL_IM_BADI_CUST_IMPL".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     then you have the GET_MATERIAL Method . double click on the Method it opens the Code window for that method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as looks like bellow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method ZIF_EX_BADI_CUST~GET_METERIAL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you will write the coding part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not p_matnr is initial.&lt;/P&gt;&lt;P&gt;  select single * from mara&lt;/P&gt;&lt;P&gt;                  into x_mara&lt;/P&gt;&lt;P&gt;                  where matnr = p_matnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;save,check &amp;amp; activate &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;come back and activate again.&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;then you need to use this badi in SE38 program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZCUST_BADI1_IMPL_CALL.&lt;/P&gt;&lt;P&gt;TABLES : MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*creatingthe BADI interface ref to following class&lt;/P&gt;&lt;P&gt;DATA : OBJ TYPE REF TO ZIF_EX_CUST_BADI1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : P_MATNR LIKE MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*passing the BADI interface ref var to following class method to get obj of BADI business add in class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD CL_EXITHANDLER=&amp;gt;GET_INSTANCE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXIT_NAME                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NULL_INSTANCE_ACCEPTED        = SEEX_FALSE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ACT_IMP_EXISTING              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    INSTANCE                      = OBJ&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_REFERENCE                  = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_INTERFACE_REFERENCE        = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_EXIT_INTERFACE             = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CLASS_NOT_IMPLEMENT_INTERFACE = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SINGLE_EXIT_MULTIPLY_ACTIVE   = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CAST_ERROR                    = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXIT_NOT_EXISTING             = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DATA_INCONS_IN_EXIT_MANAGEM   = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   others                        = 9&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2007 15:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-define-implement-custom-badis/m-p/2051641#M423008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-09T15:10:42Z</dc:date>
    </item>
  </channel>
</rss>

