<?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 handle execption with badi implementation ?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4651001#M1094430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since there is not any exception in the definition of the method, it is not advisable to raise any kind of exception from the BADI implementation. Becuase the caller application (which call the BADI) is not able to handle those exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For perticular this BADI, Method AT_SAVE has only one parameter IM_PROJECTDEFINITION which is importing parameter - means you are not able to change anything using that parameter. Now, if you are saving your data in to some Ztable from the BADI Implementation, than you might &lt;/P&gt;&lt;P&gt;1. Catch the exception which are caused by your logic&lt;/P&gt;&lt;P&gt;2. Give the Status Message with the appropriate details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other way is you can generate an Application Log in case of any errors in the BADI implementation and at last give the Information message if the application log has been generated. You can find more details on [Generate Application Log|http://help-abap.blogspot.com/2008/10/generate-application-log.html]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some BADI definition have the option for error handling. For example, Badi Defintion LE_SHP_DELIVERY_PROC method SAVE_DOCUMENT_PREPARE has a parameter CT_LOG which can be filled up in case of errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2008 13:28:44 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2008-10-21T13:28:44Z</dc:date>
    <item>
      <title>how to handle execption with badi implementation ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4650999#M1094428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm curious what I have to do with the badi implementation of PROJECTDEF_UPDATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created my own implementation ZPROJECTDEF_UPDATE and want to run a check in the method AT_SAVE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when the check is ok than the it may continue to save the project if not then it has to raise an error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use ofcourse message to create the error message and it's also working but I was wondering if I could also use the exception ERROR_WITH_MESSAGE in this  ??&lt;/P&gt;&lt;P&gt;can I also pass allong the errormessage text when raising an exception ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ofcourse I can't alter anymore the coding outside of the badi ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the proper procedure how to use this badi and to raise the error message with my own text ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in which language is it most likely documentation or examples exist of a method or badi ? english or german ? in this case I couldn't find any example in either &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;&lt;P&gt;arthur de smidt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 13:13:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4650999#M1094428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T13:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to handle execption with badi implementation ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4651000#M1094429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way for message within raise exception&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MESSAGE e000(00) WITH 'Error' RAISING ERROR_WITH_MESSAGE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 13:19:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4651000#M1094429</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-10-21T13:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to handle execption with badi implementation ??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4651001#M1094430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since there is not any exception in the definition of the method, it is not advisable to raise any kind of exception from the BADI implementation. Becuase the caller application (which call the BADI) is not able to handle those exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For perticular this BADI, Method AT_SAVE has only one parameter IM_PROJECTDEFINITION which is importing parameter - means you are not able to change anything using that parameter. Now, if you are saving your data in to some Ztable from the BADI Implementation, than you might &lt;/P&gt;&lt;P&gt;1. Catch the exception which are caused by your logic&lt;/P&gt;&lt;P&gt;2. Give the Status Message with the appropriate details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other way is you can generate an Application Log in case of any errors in the BADI implementation and at last give the Information message if the application log has been generated. You can find more details on [Generate Application Log|http://help-abap.blogspot.com/2008/10/generate-application-log.html]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some BADI definition have the option for error handling. For example, Badi Defintion LE_SHP_DELIVERY_PROC method SAVE_DOCUMENT_PREPARE has a parameter CT_LOG which can be filled up in case of errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 13:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-handle-execption-with-badi-implementation/m-p/4651001#M1094430</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-10-21T13:28:44Z</dc:date>
    </item>
  </channel>
</rss>

