How to determine reason for socket write failure

Hi,
I'm new to socket programming in general, so please bear with me. I've looked around on the forums quite a bit, and haven't found an answer to this question.
I'm working with server code which creates TCP connections over an air interface with a mobile phone client. Since the air interface is inherently unstable, we rely on the TCP buffering/retry mechanism to store up to its capacity of messages if the client is temporarily non-responsive. Since we are sending small amounts of data, this will actually last for quite a while (several minutes or more depending on how much data we are needing to send). As part of an audit mechanism to detect lost clients, I do a write of a "heartbeat" to the socket and if the write fails, I can assume that either the buffer is full (meaning the mobile "went away" either due to loss of battery power, driving through a very long tunnel, etc.), or the mobile actively disconnected the socket.
However, I'd like to know if there is a way to determine the reason for the write failure? I catch the exception, but as far as I can tell they are all IOExceptions. Is there any way to further delineate the reason for a socket failure?
Any help would be greatly appreciated.
Thanks,
-Lisa

If you're in a hurry, I don't have an answer for you.
That said, it was an intriguing enough question that I did some poking around as well. There is a socket exception class, but generally speaking, the only methods that throw socket exceptions tend to deal with defining, creating and closing the socket.
Communicating through the socket is done through input and output streams, and like any other streams, those throw I/O exceptions. I suspect you're catching IOEs because you're using streams. Unfortunately, even Socket.sendUrgentData( int data ) also returns an IOException rather than an SException.
In the interests of covering all the bases, are the IOE messages unsufficient? That is, try...
   } catch ( IOException ioe ) {
      System.out.println( "IOException: " + ioe.getMessage() );
   }...might give you enough information to make a guess at whether the buffer is full or if the foreign host has closed the connection. I would suspect this feature is architecture dependent - UNIX systems might have more detail than Wintel systems.
As a last resort, you could extend the InputStream class and do the appropriate testing when writing/sending your packet. I would think that the only cases you can test for are whether the buffer is full (by maintaining a copy of the buffer and updating as appropriate), the mobile is currently sending data, or if the mobile is just not available.
Conventional Java isn't really the best for this because I'm not sure the JVM security model really wants to allow you to directly analyze TCP packets (otherwise you could just check for ACK statements). JME might have an easy solution that we didn't know about and you should ask on the appropriate forum. Alternatively, you might want to think about using C to write a library that handles connections this way, and externally call the library from the rest of your Java program.

Similar Messages

  • What's the common reason for socket write errors?

    I just encountered some problem in my recent programming work.
    The error message is something like "java.net.SocketException: Software caused connection abort: socket write error", strangely enough, sometimes it can work without the error, but sometimes, the error occurs with the same test case.
    I just want to know what's the mainly reason of this error?
    Thanks a lot.

    After checking the codes, I realized that it is because when I return a String object from an function and send it to the other end through socket, sometimes the other end receive a "null" object, and because I have to use the instance method of the object, so the error occured.
    But I am confused why I send a string to socket, but sometimes I got a "null" object at the other end, I am sure the string I send is actually not "null" the the send side?

  • How to determine reason for shutdown

    Hi all,
    My Mac Pro seems to shutdown unexpectedly on occasion and I'm at a loss to explain why.  It happens late at night and though I'm not sure, perhaps only early morning on Thursdays.  Now, I've checked to see if the Energy Saver settings have a scheduled shutdown, and there isn't anything checked there, so it's not something that I've intentionally set.  I don't believe there was a power failure or any similar external cause.  I assume I want to look in the system logs to find the reason for the shutdown, but I can't seem to find the event.  Where exactly should I look and what keyword would I search for.  Any thoughts? 
    PS This happened a few times while still running 10.6 as well, so I don't think it's a 10.7 specific issue, but that is what I'm running now.
    DC

    I have never tried rebooting and leaving it alone for any length of time.  It doesn't happen often enough for me to be able to test that reliably, though I could try it next Wed. night since that seems to be the preferred night.  Thing is, I don't think it happens every week even.  I guess what I should do is do a manual shutdown and then look in the logs for where that info is stored and the trace back over the last 24 hours to see if I can find where it happened.
    Not sure what you're looking for in the top command, but here you are.  Couldn't quite squeeze everything in, looks like there's a dozen and a half processes left at the bottom that were past the pagination.
    Processes: 113 total, 7 running, 3 stuck, 103 sleeping, 565 threads                      14:39:07
    Load Avg: 2.98, 2.65, 2.53  CPU usage: 10.61% user, 3.65% sys, 85.72% idle
    SharedLibs: 15M resident, 7768K data, 0B linkedit.
    MemRegions: 22095 total, 1821M resident, 65M private, 575M shared.
    PhysMem: 1077M wired, 2669M active, 1555M inactive, 5301M used, 6975M free.
    VM: 274G vsize, 1120M framework vsize, 132510(0) pageins, 0(0) pageouts.
    Networks: packets: 78838/37M in, 74872/19M out. Disks: 2646089/28G read, 2510875/19G written.
    PID    COMMAND      %CPU TIME     #TH   #WQ  #POR #MREG RPRVT  RSHRD  RSIZE  VPRVT  VSIZE  PGRP
    26916  sed          0.0  00:00.00 1     0    17+  22+   268K+  240K+  556K+  17M+   2378M+ 26913
    26915  sed          0.0  00:00.00 1     0    17+  22+   268K+  240K+  556K+  17M+   2378M+ 26913
    26914- icalBuddy    0.0  00:00.55 5/1   4    45+  110+  13M+   9680K+ 17M+   101M+  687M+  26913
    26913  sh           0.0  00:00.00 1     0    17+  22+   332K+  840K+  856K+  17M+   2378M+ 26913
    26865  SyncServer   0.0  00:00.17 4     3    49+  89+   8632K+ 9544K  14M+   94M+   2480M+ 26865
    26719  ReportCrash  60.4 00:03.31 6/1   2    85+  165+  28M+   8108K+ 63M+   171M+  2572M+ 26719
    26683  top          5.5  00:02.70 1/1   0    34   29    2116K  216K   2824K  17M    2378M  26683
    26676  ocspd        0.0  00:00.01 1     0    25   23    568K   268K   1876K  17M    2378M  26676
    25931  bash         0.0  00:00.01 1     0    20   23    360K   840K   1088K  17M    2378M  25931
    25926  xterm        0.0  00:00.18 1     0    32   72    1300K  2804K  2748K  18M    2382M  327
    25609  cookied      0.0  00:00.06 2     1    38   73    2712K  224K   3420K  96M    2457M  25609
    21154  ssh          0.0  00:01.11 1     0    25   28    1060K  240K   2600K  18M    2378M  21154
    12993  ssh-agent    0.0  00:00.16 3     1    45   85    1684K  280K   3280K  151M   2511M  12993
    7736   mdworker     0.0  00:00.82 4     1    54   111   3812K  14M    9532K  165M   2548M  7736
    1481   Console      0.0  00:30.47 3     2    121+ 342+  28M+   27M    146M+  246M+  2712M+ 1481
    856    Image Captur 0.0  00:00.22 2     1    88   98    4188K  10M    10M    139M   2534M  856
    855    AppleMobileD 0.0  00:00.40 3     1    49   100   11M    8972K  16M    106M   2484M  321
    842    PTPCamera    0.0  00:00.32 4     1    91   112   4032K  10M    9444K  159M   2563M  842
    769-   PluginProces 0.5  00:34.99 14    1    264  598   19M    23M    35M    191M   872M   325
    741-   Microsoft AU 0.0  00:00.07 2     1    73   102   1500K  10M    3740K  162M   765M   741
    704-   FNPLicensing 0.0  00:00.37 3     1    44   80    2460K  244K   3544K  118M   686M   704
    677    Caffeine     0.0  00:00.14 2     1    80   123   2608K  11M    8608K  133M   2549M  677
    676    GeekTool     1.7  01:06.85 10    7    156  180   6796K+ 19M    15M    176M   2584M  676
    675-   ChronoSyncBa 0.0  00:01.34 3     1    84   130   1980K  12M    5604K  156M   766M   675
    672-   AAM Updates  0.0  00:05.46 3     1    92   241   5648K  15M    11M    166M   811M   672
    666-   SymSecondary 0.0  00:00.06 2     1    67   102   1484K  10M    3544K  132M   735M   666
    665-   SAVDiskMount 0.0  00:00.04 2     1    29   60    708K   216K   1508K  74M    650M   665
    664-   ScanNotifica 0.0  00:00.06 2     1    70   104   1404K  10M    3496K  139M   742M   664
    662    taskgated    0.0  00:03.43 3     1    37   83    1912K  7648K  3776K  157M   2533M  662
    656-   SymQuickMenu 0.0  00:00.14 3     1    86   166   2804K  12M    6784K  160M   766M   656
    655    AirPort Base 0.0  00:00.01 3     1    37   70    968K   220K   2308K  98M    2467M  655
    650    imagent      0.0  00:00.47 4     1    86   137   3840K  7756K  7336K  150M   2547M  650
    645    warmd_agent  0.0  00:00.01 2     2    34   59    768K   220K   2020K  60M    2428M  645
    624    bash         0.0  00:00.01 1     0    20   24    356K   840K   1088K  17M    2378M  624
    621    AppleSpell   0.5  00:17.47 2     1    55   111   6192K  11M    13M    169M   2558M  621
    603    quartz-wm    0.0  00:00.35 3     1    64   127   1936K  11M    6400K  153M   2548M  603
    462    Xquartz      0.0  00:00.00 1     0    25   38    336K   220K   1592K  13M    2389M  462
    461    xinit        0.0  00:00.00 1     0    21   35    272K   1004K  684K   9668K  2379M  402
    402    sh           0.0  00:00.01 1     0    18   23    244K   836K   908K   9648K  2378M  402
    401    xterm        0.0  00:00.50 1     0    32   73    1004K  2804K  2504K  9828K  2382M  327
    397    aosnotifyd   0.0  00:00.42 3     1    54   314   5172K  8684K  10M    493M   19G    397
    394    filecoordina 0.0  00:00.01 2     2    40   59    908K   216K   2128K  97M    2465M  394
    381    hdiejectd    0.0  00:00.04 2     1    37   54    784K   248K   2064K  82M    2443M  381
    372    diskimages-h 0.0  00:00.41 3     1    63   90    1892K  9540K  5964K  132M   2524M  372
    370    WebProcess   0.0  00:47.53 5     1    139  1448  107M   33M    200M   341M   3872M  325
    361    com.apple.do 0.0  00:00.16 2     1    95   138   4076K  12M    12M    158M   2562M  361
    359    FileSyncAgen 0.0  00:05.27 11    3    141  182   12M    10M    21M    125M   2561M  359
    356    fontd        0.2  00:12.28 3     2    91   218   5032K  8368K  7412K  136M   2552M  356
    337    Finder       0.2  01:00.62 5     3    178- 434   25M-   39M    48M-   157M   2650M  337
    336    SystemUIServ 0.1  01:04.66 3     1    335  307   17M    22M    31M    187M   2605M  336
    335    talagent     0.0  00:00.24 2     1    93   113   3832K  10M    8824K  168M   2563M  335
    334    Dock         0.0  00:09.68 3     1    217  1217  41M    29M    67M    87M    2629M  334
    333-   AdobeAcrobat 0.2  00:34.33 25    3    167  451   17M    21M    55M    114M   928M   333
    332-   Papers       0.0  00:04.37 11    1    174  562   32M    33M    51M    183M   863M   332
    331    AppleScript  0.0  00:00.77 2     1    100  206   16M    29M    32M    148M   2597M  331
    330-   Microsoft Wo 0.2  00:14.72 5     3    286  619   36M    65M    97M    350M   1215M  330
    329    iCal         0.0  00:16.02 5     1    172  391   46M    28M    88M    177M   2666M  329
    328    Mail         0.0  02:28.45 8     1    334  1107  89M    63M    174M   319M   3875M  328
    327    X11.bin      0.7  00:11.93 7     1    128  370   12M    34M    36M    130M   2614M  327
    326-   Aquamacs     0.3  00:20.21 2     1    92   294   18M    26M    32M    176M   852M   326
    325    Safari       0.0  00:36.19 9     2    236  771   52M    74M    94M    198M   2733M  325
    321    iTunes       0.7  01:14.70 17    2    442  650   112M   36M    158M   401M   3807M  321
    320    pboard       0.0  00:00.00 1     0    27   43    536K   220K   1144K  20M    2380M  320
    317    UserEventAge 0.0  00:00.46 3     1    224  178   5096K  9716K  10M    177M   2556M  317
    279-   navx         53.3 59:20.71 2/1   1    31   187   259M   4476K  268M   395M   969M   122
    276-   LiveUpdate   0.0  00:00.11 2     1    68   104   1600K  11M    4856K  90M    680M   122
    272-   scheduledSca 0.0  00:00.02 3     1    44   74    824K   2360K  1812K  78M    649M   122
    207    distnoted    2.0  02:10.97 15    14   153  117   5044K  240K   5740K  169M   2537M  207
    205    mdworker     0.1  00:17.16 4     1    59   172   23M    11M    42M    167M   2563M  205
    203    distnoted    0.0  00:04.15 5     4    44   94    1272K  240K   1968K  140M   2508M  203
    201    launchd      0.0  00:04.97 2     0    354  110   1388K  564K   1976K  156M   2517M  201
    198    launchd      0.0  00:00.01 2     0    53   51    524K   416K   968K   57M    2418M  198
    168    coreaudiod   0.0  00:00.64 4     2    351  123   3892K  880K   5868K  163M   2527M  168
    158    logind       0.0  00:00.01 2     1    34   54    812K   216K   1988K  87M    2447M  158
    146    CVMServer    0.0  00:00.01 1     0    66   49    576K   252K   1260K  30M    2390M  146
    145    WindowServer 1.3  01:50.65 19    1    445  1617  39M    150M   184M   184M   3447M  145
    122-   NortonMissed 0.0  00:10.07 2     1    33   53    664K   216K   1444K  62M    630M   122
    121-   SymAutoProte 0.1  00:35.46 8     1    247  193   246M   4500K  250M   388M   970M   121
    106    racoon       0.0  00:00.06 3     1    38   63    924K   240K   2552K  91M    2452M  106
    82     applepushser 0.0  00:02.57 3     1    60   84    3304K  7936K  7684K  161M   2538M  82
    80     autofsd      0.0  00:00.02 2     2    37   60    928K   220K   2184K  90M    2458M  80
    75     dynamic_page 0.0  00:00.02 1     0    24   24    236K   212K   812K   9648K  2378M  75
    73     hidd         0.8  00:08.22 6     4    72   93    1612K  240K   2596K  139M   2508M  73
    71     kdc          0.0  00:00.15 2     2    48   89    1508K  484K   3236K  128M   2497M  71
    70     KernelEventA 0.0  00:00.03 3     1    35   56    640K   220K   1288K  65M    2426M  70
    68     loginwindow  0.0  00:00.68 2     1    273  212   8972K  23M    19M    150M   2575M  68
    66     mds          1.8  04:22.48 9/2   7    162  696+  299M+  21M    159M+  1177M+ 3654M+ 66
    65     netbiosd     0.0  00:00.36 4     4    46   93    1964K  340K   3672K  127M   2496M  65
    61     revisiond    0.0  00:00.04 4     2    39   71    1156K  216K   2576K  103M   2472M  61
    59     stackshot    0.0  00:00.02 3     1    39   63    900K   220K   1608K  114M   2482M  59
    58     rpc.statd    0.0  00:00.02 1     0    22   27    220K   216K   608K   49M    2410M  58
    57     SystemStarte 0.0  00:00.03 2     1    37   68    864K   220K   1504K  113M   2481M  57
    55     usbmuxd      0.0  00:00.97 3     1    54   98    1960K  1824K  4088K  146M   2508M  55
    54     warmd        0.0  00:00.20 3     2    39   87    5508K  224K   6880K  153M   2521M  54
    52     cron         0.0  00:00.01 1     0    24   32    368K   216K   964K   19M    2379M  52
    51     ntpd         0.0  00:00.23 1     0    28   35    568K   220K   1560K  19M    2379M  51
    49     awacsd       0.0  00:00.14 2     1    43   65    2196K  7936K  6644K  80M    2465M  49
    34     securityd    0.0  00:03.29 4     1    103  84    6220K  7504K  7824K  159M   2536M  34
    25     coreservices 0.0  00:07.73 4     1    377  446   6508K  18M    22M    155M   2558M  25
    23     blued        0.0  00:00.58 3     1    118  75    3636K  7484K  5840K  120M   2497M  23
    20     fseventsd    0.6  01:39.11 27/1  1    129  138   12M    216K   14M    1892M  4253M  20
    19     distnoted    1.1  01:00.32 11    10   114- 99-   2424K- 236K   3080K- 166M-  2534M- 19
    18     powerd       0.0  00:00.37 2     1    80   75    2320K  7416K  3340K  148M   2524M  18
    17     syslogd      0.2  00:03.16 4     0    67   72    1604K  220K   1960K  165M   2526M  17

  • Common reason for Mirage Server Failure in Clustered Environment and how clients will be switched to other server in a cluster

    Hi,
    Can Anybody share me the information regarding Common reason for Mirage Server Failure in Clustered Environment.
    And how clients will be switched to other server in a cluster to continue their operations from the failed server.
    Regards,
    Bathesha C

    Hello,
    if you have more than one mirage server configured with Load balancing (LB or MSFTNLB) the client would disconnect from the faulting server and then reconnect to an other server to progress with the action as before.
    All Mirage server are stateless and share the same SIS (single instance store) so any server can update or create CVD file set for an client.
    Hope that helps.

  • How to find the reason for a job failure

    Hi,
    I have created a job .
    It was running fine. But after few days it showed the status as broken.
    How do we find the reason for a job failure ?
    Thanks.

    There should be a trace file in the either the udump or bdump (depending on Oracle version) directory on the DB server. If the job is broken it has probably failed 16 times, so you should have 16 trace files - each possibly showing the same error. The relevant trace files will have j00 in the name, showing that they were generated from dbms_job.
    Ben

  • HOW TO DETERMINE  MESSAGES FOR CHATTING IN SAP

    HI,
    sap gurus,
    HOW TO DETERMINE  MESSAGES FOR CHATTING IN SAP
    LIKE YAHOO CHAT.
    THIS IS 100% POSSIBLE IN STD. SAP
    AND ONE YEAR BACK I DID IT BUE I HAVE FORGOTTEN THE PATH TO DO IT.
    CAN ANY BODY SAY ABOUT THIS
    how can i configure message determination in spro.
    any clues plz
    regards,
    balaji.t
    09990019711.

    hi,
    a) SAPmail has functions to display system messages to broadcast all users.
    b) Transaction sm02 will provide text boxes to submit a system-wide message.
    c) This must be set up as a profile parameter (login/messagecreate=true). Once the value is set, users can send it with the options under menu path system->status.
    d) Only users with SAP_ALL authorizations can broadcast from transaction sm03
    regards
    sadhu kishore

  • How to trace reason for failure to synchronize customer in OPM Financials

    Sirs,
    I created a customer in Order Management and process Synchronize Customer in OPM Financials. The result is "Failed"
    How to trace the reason for the reason to synchronize?

    Sirs,
    I created a customer in Order Management and process Synchronize Customer in OPM Financials. The result is "Failed"
    How to trace the reason for the failure to synchronize?
    thanks!

  • How to reduce "Wait for Log Writer"

    Hi,
    in a production system using MaxDB 7.6.03.07 i checked follow acitivities about Log:
    Log Pages Written: 32.039
    Wait for Log Writer: 31.530
    the docs explains that "Wait for Log Writer", Indicates how often it was necessary to wait for a log entry to be written.
    then what steps i must follow to reduce this?
    thanks for any help
    Clóvis

    Hi,
    when the log Io queue is full all user tasks who want to insert entries into the log io queue have to wait until the log entries of the queue have been written to the log volume - they are wiating for LOG Writer
    First you should check the size of the LOG_IO_QUEUE Parameter.
    Think about increaseing the parameter value.
    Second will be to check the time for write I/O to the log -> use DB-Analyzer and activate time measurement via x_cons <DBNAME> time enable command.
    Then you will get time for write I/O on the log in the DB-Analyzer log files (expert)
    You will find more information about MaxDb Logging and Performance Analysis on maxdb.sap.com -> [training material|http://maxdb.sap.com/training] chapter logging and performance analysis.
    Regards, Christiane

  • How to track reason for Preventive maintenance not completed?

    Hi Gurus,
    We know that when Maintenance plan was created then base on that maintenance call objects should be generated at particular date specified in Plan. I have requirement that due to certain reason (e.g. Machine not available due to production) if this preventive maintenance not completed at specified date, so how we can assign these reason for call objects (Notification/Order).
    Thanks in advance......

    I'd suggest using either
    1) Confirmations with Reason Codes
    or
    2) Notifications with Catalog Codes
    or
    3) User Status profile on Orders.
    EDIT: Note that for the former you might need to first have the Orders released, which might not be desirable, and you can't use this in conjunction with the "Do not complete" / "Wrap" / BABL transaction (to set status NCMP). The latter two options don't have this constraint.

  • How to entries reason for movement in MI07 with difference quantity equal 0

    I founding that in transaction MI07 can't be able to entried reason for movement if difference quantity equal zero.please help to advise on how to set up config of "Field selection for physical inventory" (Transaction code "0MJU")  to allow to entries either difference quantity has zero in base UoM

    at least you have to enter a . for optiinal next to the movement types 701 to 708 for physical inventory in OMBS.
    And then you have to customize reasons for the movement types 701 to 708.
    It is not possible that the user can enter free text as reason.

  • How to Maintain Reasons for the Opportunity Status in SPRO

    Dear all,
    I want to maintain reasons for the opportunity status. could any of you educate me about this. Your help will be highly rewarded.
    thank you
    Raghu ram

    hi Raja ram,
    u can maintain status reasons for Opportunity SPRO
    CRM-TransactionsSettings for Opportunity--Maintain Status Reason and Status Profile for Opportunities
    in this u need to select cataloge type (O1) in this u can maintain reasons for status
    Regards
    sreedhar

  • How to put Reason for  rejection to line item level?

    Hi
    I am updating the Sales order at line item and putting the reason for rejection but it didnt updates the database. Below is the code.
          LOOP AT LT_VBUP1 INTO WA_VBUP1.
             ON CHANGE OF  WA_VBUP1-VBELN.
              CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
                EXPORTING
                  SALESDOCUMENT    = WA_VBUP1-VBELN
                  ORDER_HEADER_INX = LV_ORDER_HEADER_INX
                TABLES
                  RETURN           = IT_RETURN
                  ORDER_ITEM_IN    = IT_ORDER_ITEM_IN
                  ORDER_ITEM_INX   = IT_ORDER_ITEM_INX.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                EXPORTING
                  WAIT = 'X'.
              CLEAR WA_TY_SOCLOSE.
              IF SY-SUBRC EQ 0.
                LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
                LT_TY_SOCLOSE-STCLOSE = 'Y'.
              ELSE.
                LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
                LT_TY_SOCLOSE-STCLOSE = 'N'.
              ENDIF.
              APPEND  LT_TY_SOCLOSE.
            ENDON.
            CLEAR: WA_ORDER_ITEM_IN,WA_ORDER_ITEM_INX.
            WA_ORDER_ITEM_IN-ITM_NUMBER =  WA_VBUP1-POSNR.
            WA_ORDER_ITEM_IN-REASON_REJ = 'Y1'. " Putting order of rejection for the archiving
            WA_ORDER_ITEM_INX-ITM_NUMBER = WA_VBUP1-POSNR.
            WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
            WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
            APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
            APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
            CLEAR WA_VBUP1.
          ENDLOOP.
    Correct me where I am putting wrong.
    Regards
    Mohinder

    LOOP AT LT_VBUP1 INTO WA_VBUP1.
    ON CHANGE OF WA_VBUP1-VBELN.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = WA_VBUP1-VBELN
    ORDER_HEADER_INX = LV_ORDER_HEADER_INX
    TABLES
    RETURN = IT_RETURN
    ORDER_ITEM_IN = IT_ORDER_ITEM_IN
    ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    CLEAR WA_TY_SOCLOSE.
    IF SY-SUBRC EQ 0.
    LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
    LT_TY_SOCLOSE-STCLOSE = 'Y'.
    ELSE.
    LT_TY_SOCLOSE-VBELN = LV_SALESDOCUMENT.
    LT_TY_SOCLOSE-STCLOSE = 'N'.
    ENDIF.
    APPEND LT_TY_SOCLOSE.
    ENDON.
    CLEAR: WA_ORDER_ITEM_IN,WA_ORDER_ITEM_INX.
    WA_ORDER_ITEM_IN-ITM_NUMBER = WA_VBUP1-POSNR.
    WA_ORDER_ITEM_IN-REASON_REJ = 'Y1'. " Putting order of rejection for the archiving
    WA_ORDER_ITEM_INX-ITM_NUMBER = WA_VBUP1-POSNR.
    WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
    WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
    APPEND WA_ORDER_ITEM_IN TO IT_ORDER_ITEM_IN.
    APPEND WA_ORDER_ITEM_INX TO IT_ORDER_ITEM_INX.
    ***********************************************************************<<<<do this bit here
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = WA_VBUP1-VBELN
    ORDER_HEADER_INX = LV_ORDER_HEADER_INX
    TABLES
    RETURN = IT_RETURN
    ORDER_ITEM_IN = IT_ORDER_ITEM_IN
    ORDER_ITEM_INX = IT_ORDER_ITEM_INX.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    CLEAR WA_VBUP1.
    ENDLOOP.

  • How to find reason for system crash?

    Hello,
    I have a test system running in VirtualBox environment and its crashing every now and then, sometimes two times a day but sometimes it lasts for 3 days before crash happens.
    system info
    root>cat /etc/*release*
    Solaris 10 10/09 s10x_u8wos_08a X86
    root>uname -a
    SunOS 5.10 Generic_142910-17 i86pc i386 i86pc
    dump files
    root>ls -l vmdump.*
    -rw-r--r-- 1 root root 116064256 Jan 13 05:35 vmdump.0
    -rw-r--r-- 1 root root 108003328 Jan 13 10:15 vmdump.1
    -rw-r--r-- 1 root root 112852992 Jan 14 18:53 vmdump.2
    -rw-r--r-- 1 root root 129236992 Jan 17 08:41 vmdump.3
    -rw-r--r-- 1 root root 122486784 Jan 17 16:39 vmdump.4
    started to use mdb
    root@cs5vs01>mdb -k unix.4 vmcore.4
    Loading modules: [ unix krtld genunix specfs dtrace cpu.generic uppc pcplusmp ufs ipc ip hook neti sctp arp usba fctl nca lofs zfs nfs random md cpc fcip sppp ]
    ::stack
    vpanic()
    kadmin+0x517()
    uadmin+0xc7()
    sys_syscall+0x17b()
    $C
    fffffe800100ee60 vpanic()
    fffffe800100eeb0 kadmin+0x517()
    fffffe800100ef00 uadmin+0xc7()
    fffffe800100ef10 sys_syscall+0x17b()I wonder how I can continue from this point? Any support would be greatly appreciated!
    Anyone knows about a good step by step debug guide? For example how to logically track down the root cause, good example commands and so on?
    Thank you!
    BR
    Daniel

    We can see from the following stack that the panic was caused by someone or some app calling uadmin(1M)
    $C
    fffffe800100ee60 vpanic()
    fffffe800100eeb0 kadmin+0x517()
    fffffe800100ef00 uadmin+0xc7()
    fffffe800100ef10 sys_syscall+0x17b()
    So the question is who/what. ::ptree will give you the process tree and you should see from that the execname responsible. What apps do you have running in this VBOX environment? Oracle RAC uses the uadmin interface because it doesn't have a failfast driver of it's own. There are several other applications who also use the uadmin syscall for similar reasons. Normally they panic the node/system because something has timed out and they need to restore cluster/system stability and integrity.
    With regards to the step-by-step guide, no such document exists because it's impossible to write one. Each crash dump is different, each person does things slightly differently. What you need to do is understand how to use the tools (typically mdb or scat) and then start poking about in crash dumps. In fact you may find scat (Solaris Crash Analysis Tool) more user friendly and easier to learn than mdb. SCAT can be downloaded from https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=SCAT-5.2-G-F@CDS-CDS_SMI
    There's some information for mdb in the man page and at the following locations:
    http://dlc.sun.com/osol/docs/content/MODDEBUG/intro-1.html
    http://download.oracle.com/docs/cd/E19253-01/816-5041/index.html
    Unfortunately Crash Dump Analysis (CDA) isn't something that can easily be done via the forums. If you raise a service request it'll come to the Kernel group and we can then have a look for you.
    Regards,
    Steve

  • How to determine target for links in search results

    I've created an autoquery custom search portlet.
    The search results are by default showed is this portlet.
    The text items which are found display a link to their content.
    When clicked, the content is showed in a style different from the page on which the portlet was placed, and at full screen.
    How can I force the content to display on a page of which I can determine the style and layout?
    Thanks,
    Ton

    Unfortunately there's no way to do this directly at the moment although this functionality is planned for a future release.
    However, its possible to acheive the same effect by using procedures associated with the Text item type.
    To learn more about this, navigate to the Shared Objects page group, click on "Item Types" and edit the "Text" item type. Click on the "Procedures" tab. The help on the screen has information about creating custom procedures to render information associated with the item.
    Also see a Body text in custom search results to this forum.

  • How to implement reason for rejection step

    Hi Friends,
    I want to create a sales order approval and rejection steps using workflow. For this I have created User Decision Step where I have included approval and rejection decisions. When approver presses approve or rejection button, immediately he should get an option to enter the comments and after saving the same these comments should go as a mail to the initiators inbox. How to achieve this.
    Regards,
    Steve

    hi steve
    For getting iniatiator dynamically you have to code. It will not do automatically. For getting automatically you have to code to achieve that. Maintain a container get all the elements filled in the container. Use this container in the expression of the task. So that it will go to the iniatiator or to the next approver.
    As for my view y do u want to get the initiator automatically. For one instance of workflow there will be only one initiator. So in the expression you can choose workflow initator. That is my option. Or go ahead with your logic as per your scenerio.
    Regards
    vijay

Maybe you are looking for

  • Error using BAPI_PO_CREATE1 for creating PO with services

    Hi, I'm getting an error saying 'EnTER account assignment data for item' when I use BAPI_PO_CREATE1 and try to create POs with Service Items. I have filled all the required details, even then the system throws up this error message. Thanks for any he

  • HELP - iMac can't find system file for start-up

    Hi, My Rev. B iMac (running OS 9.2) suddenly can't find the system file. I was working in MS Word for Mac when the system crashed. Upon start-up the computer couldn't find the system and showed a flashing question mark in an old floppy disk icon. I s

  • Exposure control vs. Brightness control

    Could someone explain the difference between the exposure control (slider) and the brightness control. They both seem to move the histogram in similar manners. And if there is a difference should one always correct for WB first, then exposure, then b

  • Is there any way to recover unsaved notes in a calendar

    I typed a note in the calendar section Labeled URL.  When I went back only the first 2 sentences were saved. Is there any way to search for the information that was typed? Thanks so much for any and all input. I know I shouldn't have entered it in th

  • ANNOUNCE XML conference for data management

    XML For Information Resource Managers October 27-29, 1999 Wyndham Anatole Hotel, Dallas, Texas http://www.wilshireconferences.com/xml The program covers XML for data management, enterprise application integration, corporate information portals, and i