Adding exceptions to BADI?

Hi Experts,
I'm implementing BADI CRM_OPPORT_H_BADI, within which I need to use the exception do_not_save.
How can I add exception to a BADI implementation?
Any pointers to this would be highly appreciated.
TIA.
Regards,
Richa

Hi,
you can't add own exceptions to a standard BAdI.
But there is another BAdI 'ORDER_SAVE' where you can throw the exception 'DO_NOT_SAVE'. Try to use this instead.
If you need details for the order (you only get the GUID in this BAdI), use FM 'CRM_ORDER_READ_OW'.
Hope this helps.
Best regards,
Claudia

Similar Messages

  • Exception in BADI?

    Hi Guru,
    How can we handle exceptions in BADI, i think it is handled in class or interface level but not in BADI...please suggest me the correct answer?
    Best answer will be surely awarded points.
    Hoping for prompt reply.
    Amresh Panda

    Hi,
      The following coding is taken from a sample implementation of the BAdI:
    codeMETHOD if_ex_invoice_update~change_at_save.
    Vorhandene Objekte
    *S_RBKP_NEW
    *S_RBKP_OLD
    *TI_RSEG_NEW
    *TI_RSEG_OLD
    *TI_RBCO_NEW
    *TI_RBCO_OLD
    *TI_RBMA_NEW
    *TI_RBMA_OLD
    *TI_RBTX_NEW
    *TI_RBTX_OLD
    *TI_RBVS_NEW
    *TI_RBVS_OLD
    *TI_RBWS_NEW
    *TI_RBWS_OLD
    *I_UPDATE_FLAG
    Vorerfasste Rechnung darf nur Vollständig gesichert werden
    IF sy-ucomm = 'PARK' AND ( s_rbkp_new-bukrs = 4200 OR
    s_rbkp_new-bukrs = 6170 OR
    s_rbkp_new-bukrs = 6510 ).
    MESSAGE e208(00) WITH 'Bitte Rechnung "vollständig Sichern".'
    RAISING error_with_message.
    ENDIF.
    ENDMETHOD.[/code]
    Regards
    Kiran Sure

  • Adding field in BADI CRM_COND_COM_BADI

    Hi,
    After adding a field in FIELD CATALOG of PRICING(SPRO) I have to add the field in BADI CRM_COND_COM_BADI.
    Can anyone tell me how to add the field in BADI.
    Thanks in Advance

    Hi Ginger,
    After adding the field on the field catalog, the standard structure:CRMT_ACS_I_COM is automatically updated. On BAdI:CRM_COND_COM_BADI, the changing parameter CS_ACS_I_COM is prepared and this is based by CRMT_ACS_I_COM. So you can fill the CS_ACS_I_COM on BAdI. So the field will be transfered to IPC.
    Regards,
    Masayuki

  • Handling Exception in BADI

    *Hi Experts,*
    *I am using a badi WORKORDER_UPDATE in that i am using a method BEFORE_UPDATE  for  IW31 or IW32 Operations to give an error message, if the operation dates less than today's date but at the time of saving the tcode is giving an Error Message and it's coming out of the tcode or sometimes it's going to runtime error but i want to stay there only after displaying the error message.*
    *And for this method there is no Exception to raise so how can i handle this please let me know.*
    *Regards*
    *Shashikiran*
    Edited by: kicchaa on Dec 17, 2009 5:04 AM

    Hi Suresh,
    In some cases we can use particularly while trying to change some data. But in case of creation certainly errpr type "E" is not allowed.
    In that case Maninder can use error type "W".
    For Package BUPA you have message classes defined as :
    BUR
    BUPA_STATUS
    R1
    R11
    Code :
    IF SY-SUBRC <> 0.
    MESSAGE E001(BUR) WITH 'TEXT'.
    ENDIF.
    Regards,
    Lanka

  • Exception Form Bad Value

    Hi Experts,
    I am trying to assign the value of warehouse column of a sap document by code. Generally we have cfl to choose warehouse.
    So the problem is that it is taking the value by code but throwing the exception .The message is "Form Bad Value".
    The Code is like
                                                            EditText oItemEdit = (EditText)oMatrix.Columns.Item("10").Cells.Item(i).Specific;
                                                            string whse = "07";
                                                            oItemEdit.Value = whse.Trim();
    Thanks
    Amit

    Hi Amit,
    Try This....
    If pVal.FormType = "940" And pVal.ColUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS And pVal.BeforeAction = False Then
                Try
                    oform = sbo_application.Forms.GetFormByTypeAndCount(pVal.FormType, "1")
                    Dim omat As SAPbouiCOM.Matrix
                    omat = oform.Items.Item("23").Specific
                    Dim whs As String
                    whs = "07"
                    omat.Columns.Item("5").Cells.Item(pval.row).Specific.value = whs.Trim
                Catch ex As Exception
                    sbo_application.MessageBox(ex.Message)
                End Try
            End If
    Its working fine in my system
    Thanks
    Shafi
    Edited by: shafi_sunshine on Sep 20, 2011 9:39 AM

  • Reader X Security Sandbox - adding exceptions (plugin)

    The "Inside Adobe Reader X protected mode" articles briefly mention that the Sandbox should be programmatically configurable (using AddRule()).
    Also the reader X SDK should contain some sample code for adding rules, but I don't see the example anywhere. Searching the whole SDK for terms like "broker", "sandbox" or "addrule" also doesn't find anything.
    How to configure the security sandbox to allow writing to a specific location in the registry (under HKCU)?
    How to configure the security sandbox to allow writing to a specific directory on the filesystem?

    I've read ur post on your blog and replied to it but i didn't see my reply being posted.
    The issue with us is that whenever we open Adobe Reader our plugin opens "myApp.exe".
    with protected mode on, it gives an exception: shell execute exeception cannot launch "myApp.exe" (something like that)
    and in the protected mode Log on, i can see that we need to use the whitelist policy " process_All_exec"
    using that pointing to our "myApp.exe" this removes the initial error but tries to open "myApp.exe" from C:\Windows\sytem32 which is weird because "myApp.exe" is in programFiles.
    and in your blog i read something dangerous "The general rule seems to be: don’t try to talk to other processes " if so, why do we have process_all_exec ?
    i am kinda turning in looops in all the forums... and no real solution, no samples..

  • Why catching Exception is bad idea??

    Hi,
    Why it is said that catching an Exception is a bad idea. Any how we get the actual cause in stackTrace of Exception object.!
    Plz help

    Catching exceptions (lowercase e) is not a bad thing. Catching Exception (uppercase E) is generally bad.
    Lowercase e exceptions refer to the entire Throwable hierarchy--everything that can be thrown and caught. Often you want to catch and handle them, or catch and wrap and rethrow them.
    Uppercase E Exception is a particular class of exception, and it's the parent class of all checked exceptions and many unchecked exceptions. When your code has catch Exception, you're saying that almost no matter what goes wrong, you want to handle it the same way. And you're also assuming that if the methods that you're calling change to throw more or fewer exceptions, your code won't need to know or care about it.
    In general you want to catch more specific subclasses of Exception, so that you can handle each one properly, and you know that your code is handling precisely the correct set of exceptions.

  • After adding exception...Clean Access popup happens continous

    This has been an on going issue over several versions of NAC (IB).... Currently running 4.7.2
    Whenever I set up a clieny as an exception (bypass posture assessment) - that client is able to get past the NAC but he/she will always get a popup screen that states that the host is good to go (or something to that effect).  There is an ok button but once clicked the popup immediately re-appears.  The only way to make it stop is to right click on Clean Access tray icon and select exit.  I goota believe that more people are seeing this than just me.  Any help would be greatly appreciated.  Thanks in advance

    Did you add this client to the Exemption, or to the filtered list?  I have seen this happen in my own environment when I mistakenly added the MAC to the "Exempt Device" list instead of the "Filters" list.  Hope this helps.

  • I added exceptions for the pop up blocker but most of the time it still does not allow the pop ups for the sites I listed as exceptions

    the pop up blocker is inconsistent. i added websites to the exceptions list but most of the times when i load firefox it does not allow the exceptions...sometimes it does but i can't find any reason or consistency as to why it sometimes allows them and sometimes doesn't. They are clearly listed on the exceptions option.
    What is wrong?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/945652]]</blockquote>

  • Adding Field through BADI

    Hi All,
    I want to add a field using standard BADI HRHAP00_ADD_HEADER in  Performance Apprisal. I am using ECC 6.0. Can any one pls let me know how to modify the standard badi.
    Thanks,
    Raju

    Hi, I had similar questions and very little experience with the topic.
    I learnt the hard way and wrote a blog about it here: Challenge yourself (HR-PD Appraisal BADIs)
    Would be cool to know that it helps people and nobody has to reinvent the wheel again:))
    Cheers Otto

  • Adding exception in XML

    hi
    here is small snippet of my code that generates the XML in oracle
    i want to add the exception in the code.
    how to do so?
    XMLElement("PersonalDetails",     
                             XMLForest(NVL(to_char(to_date(a.DOB,'YYYYMMDD'),'DD-MM-YYYY'),' ') AS "DOB",
                                  NVL(a.Gender,' ') AS "Gender",
                                  NVL(a.MaidenName,' ') AS "MaidenName")))
    if the format of date is wrong, it throws the exception. i want to catch the exception here itself.

    How many different formats are there stored in the string?
    ddmmyyyy
    mmddyyyy
    ddmmyy
    mmddyy
    dd/mm/yyyy
    dd/mm/yy
    mm/dd/yyyy
    mm/dd/yy
    dd-mm-yyyy
    dd-mm-yy
    mm-dd-yyyy
    mm-dd-yyyy
    yyyymmdd
    yymmdd
    yyyyddmm
    yyddmm
    etc.
    You're going to have to string process to determine which one the string matches using CASE and then apply the correct to_date format mask for that format.
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select '01012008' as dt from dual union all
      2             select '130208' from dual union all
      3             select '12/02/2008' from dual union all
      4             select '12-02/2008' from dual union all
      5             select 'a2-02/2008' from dual union all
      6             select '01-04-08' from dual)
      7  -- end of test data
      8  select dt, case when regexp_like(dt, '^[[:digit:]\/-]*$') then
      9                  -- all numbers or numbers with seperators
    10                  case when regexp_like(dt, '^[[:digit:]]*$') and length(dt) = 8 then
    11                            to_char(to_date(dt,'ddmmrrrr'),'yyyymmdd')
    12                       when regexp_like(dt, '^[[:digit:]]*$') and length(dt) = 6 then
    13                            to_char(to_date(dt,'ddmmrr'),'yyyymmdd')
    14                       when regexp_like(dt, '^[[:digit:]\/]*$') and length(dt) = 10 then
    15                            to_char(to_date(dt,'dd/mm/rrrr'),'yyyymmdd')
    16                       when regexp_like(dt, '^[[:digit:]\/]*$') and length(dt) = 8 then
    17                            to_char(to_date(dt,'dd/mm/rr'),'yyyymmdd')
    18                       when regexp_like(dt, '^[[:digit:]-]*$') and length(dt) = 10 then
    19                            to_char(to_date(dt,'dd-mm-rrrr'),'yyyymmdd')
    20                       when regexp_like(dt, '^[[:digit:]-]*$') and length(dt) = 8 then
    21                            to_char(to_date(dt,'dd-mm-rr'),'yyyymmdd')
    22                  else
    23                    'unknown format'
    24                  end
    25             else
    26               'invalid date'
    27             end as formatted_date
    28* from t
    SQL> /
    DT         FORMATTED_DATE
    01012008   20080101
    130208     20080213
    12/02/2008 20080212
    12-02/2008 unknown format
    a2-02/2008 invalid date
    01-04-08   20080401
    6 rows selected.
    SQL>Message was edited by:
    BluShadow
    correction to lengths

  • Raise exception in badi

    Hi
    have implemented badi MRM_HEADER_CHECK where I have raised a message when validation fails using
    MESSAGE e000(00) WITH 'Error' RAISING ERROR.
    but after this error message it is locking the screen and it is not allowing to change values in MIRO, only way is to re-enter into transaction.
    with the error message it is locking the screen, can you please correct if am giong in a right way?
    any idea how to overcome this problem.
    thanks

    Hi,
    Try this.
    MESSAGE s000(00) display like 'E' RAISING ERROR.
    It will allow you to change then.
    Reward if helpful.
    Regards,
    ramya

  • I have Safari 7.02 installed. Recently, it started to drop all preferences each time I launch the app. Nothing has been added except McAfee Security.

    recently installed McAfee Security for Mac. Free download from AT&T. Since then, Safari has been dropping all preferences each time I launch the app. Is it the new install or something else?

    Step 1
    Uninstall the McAfee product by following the instructions on whichever of the pages linked below is applicable:
    How to install or uninstall McAfee Internet Security for Mac
    How to manually remove VirusScan for Mac 8.6.x using a removal script
    How to uninstall and reinstall McAfee Agent 4.x on Macintosh computers
    Note that if you have already tried to uninstall the software, you may have to reinstall it in order to finish the job. If you have a different version of the product, the procedure may be different.
    Back up all data before making any changes.
    Step 2
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Preferences/com.apple.Safari.plist
    Right-click or control-click the highlighted line and select
    Services ▹ Show Info in Finder (or just Show Info)
    from the contextual menu.* An Info dialog should open.
    Does the dialog show "You can read and write" in the Sharing & Permissions section?
    In the General section, is the box labeled Locked checked?
    What is the Modified date?
    If you don't have read and write access to the item, change the settings as directed here. Note, however, that if one file has wrong access settings, most likely others do as well. If the item is locked, unlock it.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • Bad Record MAC. exception while using urlConnection.getInputStream()

    All,
    In my SAP J2EE instance, from filter I am trying to do get data from an url (protocol is https).
    For this I am using urlInstance.openConnection() after that urlConnection.getInputStream() and then reading from this input stream.
    When I use http protocol, everything works fine. But with https, during urlConnection.getInputStream(), I get an exception saying "Bad Record MAC".
    I tried to execute the same code in a standalone java program. It went fine with both http and https.
    I get this error only when I run in SAP J2EE instance and only with https.
    From the exception trace, I can see that while running in J2ee engine, the URLConnection instance is org.w3c.www.protocol.http.HttpURLConnection.
    When I run a standalone program from command prompt, the instance is com.ibm.net.ssl.www.protocol.https.r. This runs without any issues.
    I understand that these instances are different due to different URLStreamHandlerFactory instances.
    But I didnt set the factory instance in either of the programs.
    1. Is the exception I get is simply bcoz of instance org.w3c.www.protocol.http.HttpURLConnection?
    2. In that case how can I change the factory instance in j2ee engine?
    Please help.
    Thanks.
    Edited by: Who-Am-I on Nov 28, 2009 7:54 AM

    May be my question is too complex to understand. Let me put it simple.
    After upgrading to NW 7.01 SP5, an existing communication between SAP J2EE engine and a 3rd party software is not working.
    After a lot of debuggin I came to know that its happening at the filter we implemented to route the requests through the 3rd party authentication system.
    At the filter exception is coming from org.w3c.www.protocol.http.HttpURLConnection.getInputStream.
    This instance of HTTPURLConnection given by protocol handler factory(implementation of URLStreamHandlerFactory) which SAP is considering by default. I want to replace this protocol handler with another handler as I see no problems running the same program outside SAP J2EE instance.
    Can we change this protocol handler factory? Where can we change it?

  • Exception in connect using WLST in Embedded Mode

    If I try to run the example for WLST in embedded mode, I get an exception during the connect:
    Connecting to t3://localhost:7001 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain 'TestDomain'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    Exception in thread "main" Traceback (innermost last):
      File "<string>", line 1, in ?
      File "<iostream>", line 22, in connect
    WLSTException: 'Error occured while performing connect : Error connecting to the server Use dumpStack() to view the full stacktrace'The server in question is running, and the connect command from an interactive interpreter (from the commandline) works fine. I added a call to dumpStack() in a try-catch and got:
    This Exception occurred at Fri Sep 21 15:16:48 CEST 2007.
    java.lang.NullPointerException
         at com.sun.corba.se.impl.io.ValueHandlerImpl.writeReplace(ValueHandlerImpl.java:452)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:761)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:864)
         at com.sun.corba.se.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:659)
         at com.sun.corba.se.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:232)
         at weblogic.management._RemoteMBeanServer_Stub.addNotificationListener(Unknown Source)
         at weblogic.management.scripting.WLSTHelper.addChangeListener(WLSTHelper.java:327)
         at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:315)
         at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:201)
         at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:60)
         at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:121)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
         at org.python.core.PyMethod.__call__(PyMethod.java:96)
         at org.python.core.PyObject.__call__(PyObject.java:248)
         at org.python.core.PyObject.invoke(PyObject.java:2016)
         at org.python.pycode._pyx6.connect$1(<iostream>:16)
         at org.python.pycode._pyx6.call_function(<iostream>)
         at org.python.core.PyTableCode.call(PyTableCode.java:208)
         at org.python.core.PyTableCode.call(PyTableCode.java:404)
         at org.python.core.PyTableCode.call(PyTableCode.java:274)
         at org.python.core.PyFunction.__call__(PyFunction.java:175)
         at org.python.pycode._pyx14.f$0(<string>:1)
         at org.python.pycode._pyx14.call_function(<string>)
         at org.python.core.PyTableCode.call(PyTableCode.java:208)
         at org.python.core.PyCode.call(PyCode.java:14)
         at org.python.core.Py.runCode(Py.java:1135)
         at org.python.core.Py.exec(Py.java:1157)
         at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:137)
         at weblogic.management.scripting.utils.WLSTInterpreter.exec(WLSTInterpreter.java:367)
         at com.lmco.jsf.alis.obphm.afrs.weblogic.WLSTTest.connect(WLSTTest.java:40)
         at com.lmco.jsf.alis.obphm.afrs.weblogic.WLSTTest.main(WLSTTest.java:81)What am I doing wrong?

    public static void main(String[] args) throws
    Exception{
    Very bad programming practice!Not for a simple test program where you aren't going to do anything useful. In this case, it's exactly the right thing - as soon as the test hits an error, it falls over and dumps a stack trace, which is what it exists to do.
    In general, tho, you're correct, "throws Exception" loosens your contract to the point of meaninglessness.
    G

Maybe you are looking for

  • New iPod Touch not working with G3 iMac

    I got a new iPod Touch (4 gig) for Christmas. Tried plugging it into my iMac Power PC G3, and I get an error message. ( error OxE000001). Is my iMac too old to work with the iPod touch? Also as a second issue, I have a wireless network, but I don't h

  • Hp officejet pro 8500 a910 software will not open

    I have had my printer installed for over 2 years on my laptop via the network (Dell with OS Win 8.1).  Recently, as in I have no idea why or what happened, I have an issue where I cannot open the software on my computer to scan a document.   The icon

  • Configure Solaris cluster to failover guest domain when NICs were down

    Hi, I am running Solaris 11 as the control domains on 2 clustered nodes running on Solaris Cluster 4. There is a Solaris 10 guest domain which is managed via the Solaris cluster in failover mode. 2 virtual switches connected to 2 different network sw

  • After Effects won't run after upgrading to Yosemite

    Hi there, My After Effects CS6 ill not launch in my other user accounts since I've upgraded to Yosemite. I have installed the plugin/update that was released and it works in the Administrator account, however, not on the others. Even when I go into t

  • QOS For the Voice System

    Dear .. I have been asked from the network team to implement a Mark for QOS in the Unifiued Comeunication System .. thay asked me to make - The Voice signaling mark with  dscp  CS3 - The Voice media mark with dscp ef is there any document about this