Avoid Exception

Hi gurus,
Well, I had three questions ... Please answer me ..
1) I have defined a cursor which is going to process 10,000 records of a table .. Say, while processing, may be 1,000 record, an unknown exception may get raised .. that too which I havent trapped in the exception section .. Normally whenever exception is raised, it normally goes to the exception section .. Now my problem is, I dont want any exception to be raised (whether its trapped in exception section or not) ... But still, it has to process remaining 9,000 records .. How can I achieve this ??
2) I have a table called test .. in which I have fields like empno,ename, deptno .. Now I have created a index on the field empno .. When I say
"Select empno from emp"
My explain plan shows full table scan instead of index scan .. Can I know the reason why ? and what I have to do, to make it work on index scan rather than full table scan ????
3) This is regarding the design of tables .. .. My scenario is something like this .. One employee can work in more than one department .. I will have two tables .. emp and dept .. now I have to create or design the tables in such a way, that, it should satisfy the above condition (one employee can be in more than one department) .. I have to create even the constraints like primary key and foreign key .. If I mention empno and deptno of emp table as primary key .. I may have duplicate records like this
Empno . Ename Deptno
====================
1 A 10
1 B 10
which is considered to be a bad design .. Can you people suggest me a good design of my tables ..
Regards
Seshu

Hi,
1) If you give us your code, it can help to understand what your code.
2) Select empno from emp...make it work on index scan rather than full table scan
=> it's certainly more efficiant to make a FTS than index usage, you don't have any restriction, so you get all the table.
3) empno and deptno of emp table as primary key
=> why not, but in this case, you cannot have the output which you gave. I would prefer an other table than emp table to join emp tbl to dept tbl.
Nicolas.

Similar Messages

  • Need to avoid exception w.r.t database when caching disabled, skip database

    I have a situation here.
    Want to bypass database connection if caching disabled. If caching found enable, only then try to establish a database connection.
    One part of application should work when database is down as it doesn't require connection to database at all.
    While other parts should throw exception when database connection not available.
    the piece of code looks like this:
    public byte[] getStagedSchedule(long begin, int channelID, String stage, String username, String password, Number releaseID, Number planningTypeId ) throws SchedExExportException, SecurityServiceException
    byte[] ret = null;
    try
    Date myDate = new Date(begin);
    this.stageConfig = new StageConfig(stage, new Integer(channelID), myDate);
    if(!this.stageConfig.isCached())
    IService service = null; //database connection not required here (can handle that part)
    StageAccessService myStage = new StageAccessService(service, myDate, new Integer(channelID), stage,username, releaseID, planningTypeId);
    try{
    ret = myStage.getXML();
    catch(SchedExExportException e){
    LogUtils.getExtLogger().error("PSIStopProcessException: " + e.getMessage(), null, null, e);
    throw new SchedExExportException(e);
    else{
    IService service = ServiceFactory.getInstance("TxSchedEx"); //database connection string
    StageAccessService myStage = new StageAccessService(service, myDate, new Integer(channelID), stage,username, releaseID, planningTypeId);
    ret = myStage.getXML();
    if(service != null)
    service.release();
    catch (ServiceException e)
    LogUtils.getExtLogger().error("ServiceException: " + e.getMessage(), null, null, e);
    throw new SchedExExportException(e);
    return ret;
    Now this code is working as per my requirement. for the time being.
    But have two major problems to be solved here.
    1) this piece of code :
    this.stageConfig = new StageConfig(stage, new Integer(channelID), myDate);
    is getting called in other class as well. i.e. inside this:
    StageAccessService myStage = new StageAccessService(service, myDate, new Integer(channelID), stage,username, releaseID, planningTypeId);
    have initialise method. which internally calls this method:
    private boolean initialize(IService service, Date date, Number channel, String stage, Number releaseId, Number planningTypeId) throws PSIStopProcessException
    boolean ret = false;
    if ( ( null != service ) && ( null != date ) && ( null != channel)&& ( null != stage))
    this.service = service;
    this.scheduleDate = date;
    this.scheduleChannel = channel;
    this.stageConfig = new StageConfig(stage, channel, date);
    this.planningTypeId = planningTypeId;
    this.givenReleaseId = releaseId;
    ret = true;
    initRelease(releaseId);
    else if ( ( null == service ) && ( null != date ) && ( null != channel)&& ( null != stage)) // just to handle if database connection not available.
    this.scheduleDate = date;
    this.scheduleChannel = channel;
    this.stageConfig = new StageConfig(stage, channel, date);
    this.planningTypeId = planningTypeId;
    this.givenReleaseId = releaseId;
    ret = true;
    return ret;
    Because StageAccessService is the real entry point for all other classes to access information about stage (staging). (So making StageConfig singleton, won't help me)
    Now is there any way i can avoid :
    this.stageConfig = new StageConfig(stage, channel, date);
    getting called twice in my code.
    why this is required is this method checks for caching real values.
    public byte[] getXML() throws SchedExExportException
    byte[] ret = null;
    if ( !this.stageConfig.isCached() )
    ret = dynamicLoadXML();
    else
    ret = loadReleaseFromStage();
    if (ret == null && this.stageConfig.isLazyLoading())
    ret = dynamicLoadXML();
    saveScheduleInStage(ret);
    and so on.............
    try{
    if (this.stageConfig.isTransformSchedules() && ret != null)
    etc
    2) Other workaround can be like: check if database connection is there or not. log the exception in catch block. but don't throw back.
    So that the part which doesn't require database connection can work. But if request is not calling that part, then better throw exception also.
    I don't know whihc approcah is good in this case.
    Can anyone suggest anything better then this.
    thanks.

    I'm afraid that you need to provide further info about your two databases like versions, whether they have the replication option installed etc.
    Generally speaking you have two methods available:
    1. Use the replication options (needs setup like repadmins, master sites, snapshots etc)
    2. Script it yourself (ie rewrite the replicator :-) trough DBlinks, stored procedures etc.
    I would reccommend option 1 since you do not need to re-invent the wheel.
    null

  • How to avoid exception when setting a date in an Edit control?

    I'm have made a Coded UI Test with VS 2012 for a web application of a colleague.
    In that web application is a table with some entry fields of type Edit.
    In one of these fields (called "DatumAb") i can enter a date in format "dd.mm.yyyy" (day, month and year).
    Coded UI Test identifies the control by the name "von (tt.mm.jjjj)", which is in fact just a placeholder.
    When i replay my recording i get an exception which says, that either the control is not ready or not valid.
    Next i have called the DrawHighlight method for that control.
    While the replay i can see the blue frame, so the control is accessible.
    Can anybody tell me, what's going wrong?
    Here an excerpt from the HTML-Code of the web application with the date field:
    <table class="table table-hover table-bordered table-condensed table-well table-responsive">
      <thead>
        <tr>
          <th class="ng-scope" translate="global.datum.Von">von</th>
        </tr>
      </thead>
      <tbody>
        <!-- ngRepeat: vb in vm.formData.Vorbeschaeftigungen -->
        <tr class="ng-scope" ng-repeat="vb in vm.formData.Vorbeschaeftigungen">
          <td>
            <input value="11.02.2015" rm-date-input="" ng-model="vb.DatumAb" class="form-control ng-pristine ng-untouched ng-valid ng-valid-rm-date-input ng-valid-rm-date-input-format
    ng-valid-rm-date-input-day ng-valid-rm-date-input-month ng-valid-rm-date-input-year" placeholder="von (tt.mm.jjjj)" type="text">
          </td>
    And at last the exception message.
    Sorry - only in german.
    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException wurde nicht von Benutzercode behandelt.
      HResult=-268111872
      Message=Das Steuerelement ist nicht verfügbar oder nicht gültig. Weitere Details:
    TechnologyName:  "MSAA"
    Name:  "von (tt.mm.jjjj)"
    ControlType:  "Edit"
      Source=Microsoft.VisualStudio.TestTools.UITesting
      BasicMessage=Das Steuerelement ist nicht verfügbar oder nicht gültig.
      StackTrace:
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.AddUITestControlDescriptionToException(SystemException exception, IPlaybackContext context)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, UITestControl uiControl)
           bei Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, Object parameterValue, UITestControl uiControl)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyPrivate(String propertyName, Object value)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass14.<SetProperty>b__13()
           bei Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
           bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetProperty(String propertyName, Object value)
           bei Microsoft.VisualStudio.TestTools.UITesting.WinControls.WinEdit.set_Text(String value)
           bei TestMitVorbeschaeftigungen.UIMap.DatumVon() in c:\CodedUiTests\Tests mit Webanwendung\TestMitVorbeschaeftigungen\TestMitVorbeschaeftigungen\UIMap.Designer.cs:Zeile 92.
           bei TestMitVorbeschaeftigungen.CodedUITest1.CodedUITestMethod1() in c:\CodedUiTests\Tests mit Webanwendung\TestMitVorbeschaeftigungen\TestMitVorbeschaeftigungen\CodedUITest1.cs:Zeile 37.
      InnerException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotAvailableException
           HResult=-268111872
           Message=Das Steuerelement ist nicht verfügbar oder nicht gültig.
           Source=Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa
           BasicMessage=Das Steuerelement ist nicht verfügbar oder nicht gültig.
           StackTrace:
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.MsaaUtility.MapAndThrowException(SystemException e, Boolean throwNotSupported)
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.AccWrapper.set_Value(String value)
                bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.MsaaElement.set_Value(String value)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetValueInEditableControl(UITestControl editControl, String propertyValue)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetEditProperty(String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.WinPropertyProvider.SetPropertyValue(UITestControl uiControl, String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.UITestPropertyProvider.SetPropertyValueWrapper(UITestControl uiControl, String propertyName, Object value)
                bei Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)
           InnerException: System.NotImplementedException
                HResult=-2147467263
                Message=Die Methode oder der Vorgang ist nicht implementiert.
                Source=Accessibility
                StackTrace:
                     bei Accessibility.IAccessible.set_accValue(Object varChild, String pszValue)
                     bei Microsoft.VisualStudio.TestTools.UITest.Extension.Msaa.AccWrapper.set_Value(String value)
                InnerException:

    Hi Patrick Pirzer,
    >>That either the control is not ready or not valid.
    Next i have called the DrawHighlight method for that control.
    My suggestion is that you would check whether this control is really existing when playback actions run on this control. Or add a wait event would be better.
    http://blogs.msdn.com/b/gautamg/archive/2010/02/12/how-to-make-playback-wait-for-certain-event.aspx
    Reference:
    http://stackoverflow.com/questions/11737254/codedui-test-not-waiting-for-control-to-exist
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Exception during deployment

    Could anybody assist me to avoid exception occured during deployment fo webservice application ?
    ===========================================================================
    Deployment started Tue Apr 28 13:49:40 CEST 2009
    ===========================================================================
    Starting Deployment of mdp/commons/ear
    Aborted: development component 'mdp/commons/ear'/'accenture.com'/'PJU_MDPCORE2_D'/'20090428154119'/'0':Caught exception during application deployment from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Cannot deploy application accenture.com/mdpcommonsear.. Reason: Exception during generation of components of application accenture.com/mdpcommonsear in container EJBContainer.; nested exception is:      com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application accenture.com/mdpcommonsear in container EJBContainer. (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment of mdp/commons/ear finished with Error (Duration 7781 ms)

    Could you be a little more specific?

  • Raising Exception  TCPIP_ERROR           = 1

    Hi ,
    I am getting exception when executing the FM 'FTP_COMMAND' in aprog .what could be the reason?
    please provide solution too.
    Thanks and Regards,
    Kanth

    Hi ,
    I am using this function module FTP_COMMAND in a zprog .when i executed the prog the it is Raising Exception  TCPIP_ERROR   which is a exception parameter for the fm ftp-command.my question is why it is rising the exception,please provide reason and solution inorder to avoid exception.
    Thanks,
    uma

  • HOW TO SET UP PARTNER APPLICATION TO USE SSO OUTSIDE OF PORTAL

    If anyone knows how Portal switches context to run as the db user mapped to the lightweight schema and how it knows the db schema password please let me know.
    Should you have any queries please do not hesitate to contact me on 07775 896738.
    From document Oracle Portal Security Overview on PortalStudio.oracle.com:
    In Single Sign On mode (EnableSSO=Yes in the DAD), mod_plsql determines the name of the light-weight user and mapped database schema by calling
    WPG_SESSION_PRIVATE.GET_LW_USER and WPG_SESSION_PRIVATE.GET_DB_USER respectively.
    ** These calls are done using the Portal Schema (PORTAL30) and Portal schema password **
    mod_plsql then executes the procedure in the requested URL by using the N-Tier Authentication feature to connect to the database as the user returned from
    WPG_SESSION_PRIVATE.GET_DB_USER. ..... Note that N-Tier Authentication requires all schemas to be used for Portal user mappings to be granted 'connect
    through' privleges to the Portal schema (PORTAL30).
    The WWCTX packages are also used.
    So this is how it works with standard Portal
    - the document states that the WPG_SESSION_PRIVATE package is only accessible to the Portal schema
    - but I checked and it is also available to PORTAL30_SSO
    SQL> desc WPG_SESSION_PRIVATE
    PROCEDURE CREATE_SESSION
    Argument Name Type In/Out Default?
    P_COOKIE_NAME VARCHAR2 IN
    FUNCTION GET_DB_USER RETURNS VARCHAR2
    FUNCTION GET_LW_USER RETURNS VARCHAR2
    PROCEDURE GET_SESSION_INFO
    Argument Name Type In/Out Default?
    NUM_PARAMS NUMBER OUT
    PARAM_NAMES TABLE OF VARCHAR2(32000) OUT
    PARAM_VALUES TABLE OF VARCHAR2(32000) OUT
    PROCEDURE RESET_SESSION
    Argument Name Type In/Out Default?
    P_COOKIE_NAME VARCHAR2 IN
    In my case only the Login Server (PORTAL30_SSO) is going to be used/installed
    - the SAMPLE_SSO_PAPP application will only work if the DAD used to access is it set to use Basic authentication, i.e. the actual integration with the Login Server
    is done in the sample application code calls, stored in the database
    - when a DAD has enableSSO=yes it automatically accesses Portal (PORTAL30) packages to implement N-Tier authentication
    I'm currently testing:
    1. Configuring the SAMPLE_SSO_PAPP sample as documented with a DAD with Basic authentication
    2. Amending the ssoapp procedure to set context to another (db) user on successful authentication:
    wwctx_api.set_context (
    p_user_name => 'SCOTT',
    p_password => 'TIGER' );
    3. If this works then set_context with get_lw_user instead
    I have now amended the ssoapp procedure as follows to print out
    1. The userid entered when the login box is presented
    2. The Database user which the Portal Lightweight user is mapped to
    3. The Lightweight user Portal has used for authentication
    Amendments to papp.pkb:
    (ssoapp procedure, declare db_user_info and lw_user_info as VARCHAR2 in declare section)
    htp.p('Congratulations! It is working!<br>');
    db_user_info := wwctx_api.get_db_user;
    lw_user_info := wwctx_api.get_user;
    htp.p('User Information:' || l_user_info || '<br>');
    htp.p('DB User Information:' || db_user_info || '<br>');
    htp.p('LW User Information:' || lw_user_info || '<br>');
    The following shows the interesting results from my testing:
    - if the user owning the sample_sso_papp package is PORTAL30_SSO then the call to wwctx_api.get_db_user succeeds
    - if the user owning the sample_sso_papp package is a non-portal schema e.g. SSOAPP below the call to wwctx_api.get_db_user generates a User Defined exception
    Steps to test:
    Created new schema SSOAPP on the database
    - edited it in Portal and checked the use this schema for Portal users checkbox
    - created new Lightweight user SSO_LW in Portal, mapped it to SSOAPP schema
    - created new Lightweight user SSO_SCOTT in Portal, mapped to SCOTT schema
    - loadjava -user ssoapp/ssoapp@portal30 SSOHash.class
    - sqlplus portal30/portal30@portal30
    @provsyns ssoapp
    - sqlplus ssoapp/ssoapp@portal30
    @loadsdk.sql
    @loadpapp.sql
    Created DAD with basic authentication SAMPLE_SSO_PAPP
    - username: ssoapp
    - default home page: sample_sso_papp.ssoapp
    Registered the Sample SSO Partner Application with the Login Server and ran regapp.sql
    Commented out the calls to get_db_user in papp.pkb to avoid exception
    - called http://<server>/pls/sample_sso_papp
    - logged on as SSO_LW/sso_lw
    - got output:
    Congratulations! It is working!
    User Information: SSO_LW
    LW User Information: PUBLIC
    So the Portal lightweight user is not returned as SSO_LW
    if anyone knows why the Lightweight User in my test is returned as PUBLIC not SSO_LW
    Best Regards
    MIchael

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • How to create an object ONLY IF a condition is true

    I hope this is the correct place to post this....*takes deep breath*:
    I am writing a fairly basic program in NetBeans. The following example will simplify what I wish to convey, and ask for advice about:
    Imagine a program consisting of several classes. The constructor of one of these classes accepts three strings, entered by a user, as arguments. The idea is that the constructor of this class will then:
    -> Check that these strings all contain integers (using Integer.parseInt).
    -> If all three of these strings contain integers, check that all three of these do not add up to over 100.
    If both of these tests pass, then the object is created. What I want to know is how can I say "If either or both of these tests fail, DO NOT CREATE A NEW OBJECT ".
    If either or both of these tests are not passed, I want to display an error message, but then recover gracefully. I DO NOT want to simply do:
    exit(0);
    and kill the whole program. Nor do I want to shove the error checking in to the 'main()' class (where it already is), because, if someone else uses that other class, without my 'main()' class, they may pass it garbage. I feel it would be most sensible if the above tests were performed WITHIN THE ACTUAL CLASSES CONSTRUCTOR. But I want this done in a way where the constructor can respond with something like "Please use three integers", or "Object could not be created, please try again". Then the 'main()' class, having recieved, say, a boolean 'false' as the return type, can prompt the user to re-enter the strings (BTW, a return of 'true' to the 'main()' class would indicate that the object had been properly created, so the 'main()' class could carry on).
    Does this make sense???!!
    Thank you very much in advance,
    ./b

    Yeah, you're probably right. From what the OP said I
    imagined that errors in the constructor would be quite
    common, i.e. not exceptional at all, thus I
    didn't use them. If a caller passes an invalid parameter, I'd throw IllegalArgumentException, since passing an invalid parameter is a logic bug in the code. If the constructor connects to a DB or reads a file or something, I'd declare it to throw IOException or SQLException or some custom wrapper.
    If exceptions were thrown in the
    factory method I would also add another static method
    something like:
    public static boolean
    areTheseConstructorParametersValid( String a , String
    b , String c ) {...}to give the client the option of avoiding exception
    handling if they wanted. I wouldn't use this method
    name though...I don't really see any benefit to that. It goes back to the code sample I posted. If a client uses that, then he has the same kind of test as checking for null, it's just that it occurs before calling the factory method. And he still has to catch the exception anyway (if it's checked), so it doesn't really buy you anything.
    It's true that if the client is getting arbitrary input from, say, a user or a file, then he should validate that before calling the method. Not doing so is a logic bug that should produce IllegalArgumentException. And if the validation rules are complex, it might be a nice convenience function for the class to provide to clients, but I wouldn't use it as a replacement for exceptions.
    Just my $0.02.

  • Add/remove view links at runtime !?

    Hi,
    how can i add/remove a view link to an already published RowSet and make the RowSet adapt to the new condition ??? (without loosing it's own linked Details)
    The scenario: I have lot's of details which are linked to the same master. I remove the details from the session (sessionInfo.removeRowSet) when I don't need them to keep the active number of views in the session as small as possible ! When removing the Details from the Session I also have to remove their links to the master (to avoid exceptions). Further I want to establish the links again when the detail is added to the session again !?
    I add links before publishing:
    ViewLinkInfo view_12aLink = new ViewLinkInfo(master, "package1.LinkDef");
    view_12a.addMasterLink(view_12aLink);
    I can remove links after publishing with:
    view_12aLink.removeViewLink(sessionInfo1.getApplicationModule());
    but how to establish the link again ?:
    ApplicationModule appMod = ....;
    ViewObject vo = appMod.findViewObject(view_12a.getQueryInfo().getName());
    view_12aLink.createViewLink(appMod,vo);
    doesn't work !
    if (view_12a.isOpen())
    view_12a.close();
    view_12a.addMasterLink(view_12aLink);
    works !, but all the links where view_12a is master are broken !!!!
    So what to Do ????
    Thanks for every answer !
    null

    Your results are as expected per the imlementation. Basically you've established (two) ViewLinks between two sets of two instances of VOs.
    Now you try and get an accessor to return a set of details. You need to establish a link between that detail set and it's details to use the accessor on the second detail to get the desired results. Basically you've to establish the chaining between appropriate instances of VOs and not just the outer VOs or VO members of your AM.

  • Runtime Error : UNCAUGHT_EXCEPTION

    Hi Solman Experts,
    While downloading softwares through Maintenace Optimizer ( Solution Manager ),I am getting below error..
    First Error :
    Function module /SDF/AL_MAP_TRANSID_LOGH does not exist.
    The Maintenance Optimizer can automatically determine which files you require to update the ABAP and Java software components of your systems.
    The search is performed for all instances of the selected systems flagged as relevant.
    I have already checked in service market place and apply the SAP note 1135893 and we have activate the some components (BC Set)
    See Note 898614 after that i am getting big problem.
    Second Error : ( ABAP Dump )
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_SOCM_NOT_IMPLEMENTED
    Date and Time          31.03.2008 15:04:31
    Short text
    An exception occurred that was not caught.
    What happened?
    The exception 'CX_SOCM_NOT_IMPLEMENTED' was raised, but it was not caught
    anywhere along
    the call hierarchy.
    Since exceptions represent error situations and this error was not
    adequately responded to, the running ABAP program
    'CL_CHM1_CHANGE_REQU_INSTANCE==CP' has to be
    terminated.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred which is explained in detail below.
    The exception, which is assigned to class 'CX_SOCM_NOT_IMPLEMENTED', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    An exception occurred
    How to correct the error
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    *"UNCAUGHT_EXCEPTION" "CX_SOCM_NOT_IMPLEMENTED"
    "CL_CHM1_CHANGE_REQU_INSTANCE==CP" or "CL_CHM1_CHANGE_REQU_INSTANCE==CM009"
    "IF_EX_SOCM_CHECK_CONDITION~CHECK_CONDITION"*
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    System environment
    SAP-Release 700
    Application server... "ALBE0510"
    Network address...... "10.201.180.10"
    Operating system..... "Windows NT"
    Release.............. "5.2"
    Hardware type........ "4x AMD64 Level"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 0
    Shortdump setting.... "full"
    Database server... "ALBE0510"
    Database type..... "MSSQL"
    Database name..... "SP0"
    Database user ID.. "sp0"
    Char.set.... "C"
    SAP kernel....... 700
    created (date)... "Oct 23 2007 00:33:51"
    create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
    Database version. "SQL_Server_8.00 "
    Patch level. 133
    Patch text.. " "
    Database............. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version. 700
    Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
    NT 6.0"
    Memory consumption
    Roll.... 16192
    EM...... 41898400
    Heap.... 0
    Page.... 40960
    MM Used. 33604960
    MM Free. 4099184
    User and Transaction
    Client.............. 001
    User................ "KONS222"
    Language key........ "E"
    Transaction......... "DSWP "
    Transactions ID..... "AE21FFDCBA44F199AB15005056836080"
    Program............. "CL_CHM1_CHANGE_REQU_INSTANCE==CP"
    Screen.............. "RDSMOP_MAIN 0100"
    Screen line......... 5
    Information on where terminated
    Termination occurred in the ABAP program "CL_CHM1_CHANGE_REQU_INSTANCE==CP" -
    in "IF_EX_SOCM_CHECK_CONDITION~CHECK_CONDITION".
    The main program was "RDSMOP_MAIN ".
    In the source code you have the termination point in line 612
    of the (Include) program "CL_CHM1_CHANGE_REQU_INSTANCE==CM009".
    Source Code Extract
    Line
    SourceCde
    582
    conditions_ok =  cl_socm_integration=>false.
    583
    ENDIF.
    584
    ENDIF.
    585
    586
    WHEN 'S_USER_CHECK'.
    587
    conditions_ok =  cl_socm_integration=>true.
    588
    CALL METHOD cl_sm_base_sender=>get_assigned_suser
    589
    EXPORTING
    590
    i_no_dialogue      = 'X'
    591
           IMPORTING
    592
             e_suser            = e_suser
    593
             e_partner_no       = lv_parnr
    594
    EXCEPTIONS
    595
    no_user_assigned   = 1
    596
    no_customer_number = 2
    597
    OTHERS             = 3.
    598
    IF sy-subrc  = 1 OR sy-subrc = 3.
    599
    conditions_ok =  cl_socm_integration=>false.
    600
    ENDIF.
    601
    WHEN 'NO_CRTCL_OBJ'.
    602
    conditions_ok = me->check_crtcl_obj( ).
    603
    WHEN '0NO'.
    604
    conditions_ok =  cl_socm_integration=>false.
    605
    WHEN '0YES'.
    606
    conditions_ok =  cl_socm_integration=>true.
    607
    WHEN '0BREAK'.
    608
    BREAK-POINT.                                         "#EC NOBREAK
    609
    WHEN space.
    610
    avoid exception since it is the default in table   TSOCM_COND_MAPP
    611
    WHEN OTHERS.
    >>>>>
    RAISE EXCEPTION TYPE cx_socm_not_implemented.
    613
    ENDCASE.
    614
    615
    ENDMETHOD.
    Please suggest. Thanks in Advance...
    Regards,
    Suresh Kumar

    Hi Ruben,
    I have Implemented  both notes now i am getting differt error...
    Error is : Error No customer numbers in transaction AISUSER ...
    Message Number: SOLMAN_SAP_BACKEND016
    Diagnosis
    There are no entries with a customer number in the 'Customer Number' field in the table AISUSER.
    System Response
    You cannot get customer number-specific RFC destinations.
    Procedure
    Maintain these entries manually or start the report
    SMBI_AISUSER_VAR_MIG to copy any existing customer number from the table AISDK_CF_OSS_USR.
    Please suggest..
    Thanks in Advance..
    Regards,
    Suresh Kumar
    Edited by: suresh k on Apr 15, 2008 3:15 PM

  • Best Practice for Extracting a Single Value from Oracle Table

    I'm using Oracle Database 11g Release 11.2.0.3.0.
    I'd like to know the best practice for doing something like this in a PL/SQL block:
    DECLARE
        v_student_id    student.student_id%TYPE;
    BEGIN
        SELECT  student_id
        INTO    v_student_id
        FROM    student
        WHERE   last_name = 'Smith'
        AND     ROWNUM = 1;
    END;
    Of course, the problem here is that when there is no hit, the NO_DATA_FOUND exception is raised, which halts execution.  So what if I want to continue in spite of the exception?
    Yes, I could create a nested block with EXCEPTION section, etc., but that seems clunky for what seems to be a very simple task.
    I've also seen this handled like this:
    DECLARE
        v_student_id    student.student_id%TYPE;
        CURSOR c_student_id IS
            SELECT  student_id
            FROM    student
            WHERE   last_name = 'Smith'
            AND     ROWNUM = 1;
    BEGIN
        OPEN c_student_id;
        FETCH c_student_id INTO v_student_id;
        IF c_student_id%NOTFOUND THEN
            DBMS_OUTPUT.PUT_LINE('not found');
        ELSE
            (do stuff)
        END IF;
        CLOSE c_student_id;   
    END;
    But this still seems like killing an ant with a sledge hammer.
    What's the best way?
    Thanks for any help you can give.
    Wayne

    Do not design in order to avoid exceptions. Do not code in order to avoid exceptions.
    Exceptions are good. Damn good. As it allows you to catch an unexpected process branch, where execution did not go as planned and coded.
    Trying to avoid exceptions is just plain bloody stupid.
    As for you specific problem. When the SQL fails to find a row and a value to return, what then? This is unexpected - if you did not want a value, you would not have coded the SQL to find a value. So the SQL not finding a value is an exception to what you intend with your code. And you need to decide what to do with that exception.
    How to implement it. The #1 rule in software engineering - modularisation.
    E.g.
    create or replace function FindSomething( name varchar2 ) return foo.col1%type is
      id foo.col1%type;
    begin
      select col1 into id from foo where col2 = upper(name);
      return( id );
    exception when NOT_FOUND then
      return( null );
    end;
    And that is your problem. Modularisation. You are not considering it.
    And not the only problem mind you. Seems like your keyboard has a stuck capslock key. Writing code in all uppercase is just as bloody silly as trying to avoid exceptions.

  • Creating a Table of Contents in Pages '09

    I am unable to create a TOC in Pages 09. I am creating a training manual from a blank document in Pages '09. I have referred to the user manual and to the video tutorial about creating a TOC in my document. However there is a problem. When I open the Inspector and click on TOC - nothing is showing up in the paragraph styles. There is nothing to highlight. I have been using various paragraph styles while I am preparing this manual (title, heading, subheading).
    What am I doing wrong?

    If you have the text boxes threaded in the Layout mode you can click in one, Select All (command a) and paste the text into the main text area in a Word processing mode document.
    I don't think it was made clear that T.O.C. and bookmarks do not work in floating boxes in either WP or Layout mode. The text needs to be in the main text body, the one between the margins on each page.
    I think you will find that for any long document layout mode is useless. It may appear to be the DTP mode but has so many things that don't work, it is best avoided except for very short pieces.
    Peter

  • Java Mapping with CDATA

    One simplest way is read the data element value as the string and ignore first  six or seven characters by using substring method or so... Use the return value string for parsing the values from respective tag element using parser or manually

    Hi Xinaxu,
    Here is the java mapping code.
    public class Cdata implements StreamTransformation{
         public static void main(String[] args) {
              try{
                   Cdata genFormat=new Cdata();
                   FileInputStream in=new FileInputStream("C:\\Apps\\acm\\cdata.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\acm\\cdata1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder builderel=factory.newDocumentBuilder();
                   /*input document in form of XML*/
                   Document docIn=builderel.parse(in);
                   /*document after parsing*/
                   Document docOut=builderel.newDocument();
                   TransformerFactory tf=TransformerFactory.newInstance();
                   Transformer transform=tf.newTransformer();
                   Element root,child,child1;
                   root=docOut.createElement("Header");
                   root.setAttribute("xmlns","urn:bp:xi:hr:edm:test:100");
                   NodeList l;
                   Node n;
                   l=docIn.getElementsByTagName("Data");
                   int i,len=l.getLength();
                   String charSet[]={"&lt;","&gt;","&amp;","&apos;","&quot;"};
                   String replaceSet[]={"<",">","&","'","\""};
                   for(i=0;i<len;++i)
                        child=docOut.createElement("Data");
                        if(l.item(i).hasChildNodes())
                             n=l.item(i).getFirstChild();
                             //System.out.println(n.getNodeType());
                             //System.out.println(n.getNodeValue());
                             int j;
                             if(n.getNodeType()==3 && n.getNodeValue().indexOf("CDATA")>=0)
                                  // that means this is Cdata section
                                  //capture data in a string
                                  String s=n.getNodeValue();
                                  /*if you are sure that string contains
                                   * valid xml tags. You can parse
                                   * the tags.First replace
                                   * &lt; with < less than
                                     &gt; with > greater than
                                     &amp; with & ampersand 
                               &apos; with ' apostrophe
                               &quot; with " quotation mark
                               to avoid exceptions
                                  //System.out.println("s="+s);
                                  for(j=0;j<charSet.length;++j)
                                       s=s.replaceAll(charSet[j], replaceSet[j]);
                                  int ll;
                                  ll=s.length();
                                  String a="";
                                  int count=0;
                                  //extract only xml tags from string
                                  for(j=0;j<ll;++j)
                                       if(count<2)
                                            if(s.charAt(j)=='<')
                                                 count++;
                                            if(count<2)
                                                 continue;
                                       a=a+s.charAt(j);
                                  //System.out.println("a="+a);
                                  for(j=a.length()-1,count=0;j>=0;--j)
                                            if(a.charAt(j)=='>')
                                                 count++;
                                            if(count==2)
                                                 break;
                                  if(j>=0)
                                       s=a.substring(0,j+1);
                                  System.out.println(s);
                                  org.xml.sax.InputSource inStream = new org.xml.sax.InputSource();
                                 inStream.setCharacterStream(new java.io.StringReader(s));
                                  DocumentBuilder b=factory.newDocumentBuilder();
                                  Document cdataSection=b.parse(inStream);
                                  child1=(Element) docOut.importNode(cdataSection.getDocumentElement(),true);
                                  child.appendChild(child1);
                             else if(n.getNodeType()==4)
                                  // that means this is Cdata section
                                  //capture data in a string
                                  String s=n.getNodeValue();
                                  /*if you are sure that string contains
                                   * valid xml tags. You can parse
                                   * the tags.  replace invalid characters
                                   * before parsing
                                  for(j=0;j<charSet.length;++j)
                                       s=s.replaceAll(charSet[j], replaceSet[j]);
                                  org.xml.sax.InputSource inStream = new org.xml.sax.InputSource();
                                 inStream.setCharacterStream(new java.io.StringReader(s));
                                  DocumentBuilder b=factory.newDocumentBuilder();
                                  Document cdataSection=b.parse(inStream);
                                  child1=(Element) docOut.importNode(cdataSection.getDocumentElement(),true);
                                  child.appendChild(child1);
                        root.appendChild(child);
                   docOut.appendChild(root);
                   transform.transform(new DOMSource(docOut), new StreamResult(out));
              catch(Exception e)
                   e.printStackTrace();
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
    Hope this solves your problem.
    regards
    Anupam

  • Using Logical Directory property in Assign File Adapter BPEL

    Hi,
    I wanted to use The Logical Directory which I created while making File Adapter in a BPEL process in 11g, in an assign activity.
    How it can be done?
    Thanks in advance
    Sharat

    I have already created a binding property for Logical Directory in Composite.xml. The thing is I want to set it through em, and check inside BPEL whether it is null or not. Only after that the File Adapter should be invoked.
    I wanted to avoid exception if the binding property is not set by the user.
    The solution lies in the word "exception" itself, just put the "invoke" activity inside a scope and on that scope attach a catch activity with "Binding Exception". If the file adapter is not able to find the file path, it will raise the excetption and "catch" will catch and inside catch I am able to put any activity which can end the process gracefully.
    Sharat

  • BBP_PDVIEW_LIST View

    Hi guys and gals
    We are having a problem with the above-mentioned view.
    We did a system copy from Production and this view has a lot of information. We have subsequently upgraded the system to SRM 5.0 from SRM 3.5.
    Since then, we have seen that our transactions are taking a long time. An analysis of the cause shows that the system is taking a long time trying to sequentially read BBP_PDVIEW_LIST.
    I have checked all the custom programs that select from this view and the selections are all very quick. I must therefore assume that a standard program is causing the system to slow down.
    However, since our Production environment is not slow, I am just wondering if SAP has changed the usage of this table via the upgrade.
    Does anyone have any views on this?
    Thanks.
    Nicholas

    Hi Nicholas,
    when copying production system to development, we usually have a lot of data on a server that was not sized for this volume.
    So the performance is degraded, and you don't have the same behavior between prod & dev system.
    That's quite normal and should be avoided (except if your dev server is sized to support it), otherwise you penalize your dev environment.
    You can try to optimize your dev system:
    - compute statistics (DB20) for tables used in this view
    - if your tables have lots of extends, reorganize your DB table space (ask your DBA)
    Last solution: purge the data via archiving to lighten the dev, and gain performance.
    Rgds
    Christophe

  • Putting frame with buttons into a thread

    please help!!!
    i've got a thread:
    package aJile;
    import java.io.*;
    import java.net.*;
    public class SocketHandler extends Thread
      private Socket socket;               // Socket used for messages 
      private int socketNr;
      private byte[] inbuf;
      private InputStream in;
      private OutputStream out;
      public SocketHandler(Socket socket)
        this.socket = socket; 
      public void send(String str) throws IOException {
           out.write(str.getBytes(), 0, str.length());
           out.flush();              
      public String receive() throws IOException {
           int numBytes = in.read(inbuf);
          String str = new String(inbuf, 0, numBytes);
          return str;
      public String switchOn() throws IOException {
           send("1");
           String state = receive();
           return state;
      public void run()
        try {
          // set up the input and output streams
          in  = socket.getInputStream();
          out = socket.getOutputStream();
          inbuf = new byte[128];
          receive();
         // System.out.println(switchOn());     
          in.close();
          out.close();
          socket.close();
          System.out.println("closing");
        catch (Exception e)
          System.out.println("Caught exception "+ e);
    }and i want to add a frame with buttons to this thread. that everytime tread starts, this frame would appear. and that methods of the thread would be called with a button press. How to join them?
    here is a frame:
    package buttons;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Frame3 extends JFrame implements ActionListener
         JPanel pane = new JPanel(); 
         Icon lightIcon = new ImageIcon("light.gif");
         Icon darkIcon = new ImageIcon("dark.gif");
         JButton pressme = new JButton("Press Me");
         JButton ironButton = new JButton("Iron",lightIcon);
         JButton lampButton = new JButton("Lamp",lightIcon);
         JButton ovenButton = new JButton("Oven",lightIcon);
         public Frame3()  
              super("Event Handler Demo"); setBounds(100,100,300,200);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container con = this.getContentPane(); // inherit main frame
              con.add(pane);
              pressme.setMnemonic('P');
              pressme.addActionListener(this);   // register button listener
              ironButton.addActionListener(this);
              lampButton.addActionListener(this);
              ovenButton.addActionListener(this);
              pane.add(ironButton);
              pane.add(lampButton);
              pane.add(ovenButton);
              pane.add(pressme);
      public void actionPerformed(ActionEvent event)
        Object source = event.getSource();
        if (source == pressme){     
          JOptionPane.showMessageDialog(null,"Hello!","Message Dialog",
          JOptionPane.PLAIN_MESSAGE);
        if (source == ironButton){
             if (ironButton.getIcon() == lightIcon){
                  ironButton.setIcon(darkIcon);               
             else ironButton.setIcon(lightIcon);
        if (source == lampButton){
             if (lampButton.getIcon() == lightIcon)
                  lampButton.setIcon(darkIcon);
             else lampButton.setIcon(lightIcon);
        if (source == ovenButton){
             if (ovenButton.getIcon() == lightIcon)
                  ovenButton.setIcon(darkIcon);
             else ovenButton.setIcon(lightIcon);
      public static void main(String[] args){
           Frame3 app = new Frame3();
           app.setVisible(true);
    }thank you

    could you tell me how to avoid exceptions?
    what i want to to is to call a method wich simply sends a string and gets a string back.
    public String switchOn() throws IOException {
           send("1");
           String state = receive();
           return state;
      }but when i call this method in actionPerformed() i get exceptios and my socket closes. It sends the string though, but after this program crashes. is there anything special to do if i want to use this Frame3 in order to communicate with a client by pressing buttons?

Maybe you are looking for