What is the point of Math.abs() methods???

Hi there ppl,
just wondering what is the point of this method? Can somebody give me a scenario where this method comes in use?
Thanks

I'm pretty sure it's 'absolute value'...it comes in handy when you need to know the size/length/value but not whether it is positive/negative...

Similar Messages

  • Declaring constructor method public or private.  What's the point?

    My book declares the constructor method public. I tried declaring it private, and without any modifier out of curiousity. It runs exactly the same. What's the point of doing so?
    public class test
         public static void main( String[] args )
              test fun = new test();
              test fun2 = new test(2);     
              System.out.println( fun );
    //          System.out.println( test.toString() );
         public String toString()
              return "This is the toString";
         test()
              System.out.println( "This is the constructor method" );
         test( int x )
              System.out.println( "This is the constructor method: " +x );
    }

    yougene wrote:
    I'm new to OOP so maybe I'm not completely grasping the terminology. But this program works just fine with my class.
    public class test2
         public static void main( String[] args )
              test foo = new test();
    }It gives me the following output
    ----jGRASP exec: java test2
    This is the constructor method
    ----jGRASP: operation complete.The constructor method is executing from an outside class. I tried this with and without the private modifier on the constructor. Same result.Try compiling this.
    public class C1 {
      private C1() {
        System.out.println("C1 c'tor");
    public class C2 {
      public void foo() {
        C1 c1 = new C1();
    }

  • JWSDP and J2EE Integration: Doesn't work. What's the point?

    My problems involve the integration of JWSDP and J2EE as described in these two documents:
    http://developer.java.sun.com/developer/technicalArticles/WebServices/wsj2ee/
    http://java.sun.com/j2ee/documentation/windows_guide.html
    It looks like a long one, but it�s really not that bad. All comments are appreciated.
    I�ve numbered each line-paragraph-section for easy reference later.
    (1) My ultimate goal is to setup a website that displays data from a database. I will use Java, Apache, Oracle, and whatever else I need to create a website that uses servlets, JavaServer Pages (JSP), and JDBC.
    (2) I�ve got four Pentium III computers:
    1. Windows 2000 Server to be the web server (MyWebServer, IP = 10.10.1.1).
    2. Windows 2000 Professional to be the database server (MyDatabaseServer, IP = 10.10.1.2).
    3. Windows 2000 Professional that I use to develop and test (MyDeveloperPC, IP = 10.10.1.3).
    4. Windows 2000 Professional that I use as a client to connect to the website (MyClientPC, IP = 10.10.1.4).
    (3) On MyWebServer I installed the following:
    Java 2 Standard Edition (J2SE)
    Java 2 Enterprise Edition (J2EE)
    Java Web Services Developer Pack (JWSDP)
    The JWSDP tutorial
    Apache HTTP Server
    (4) The files I downloaded and installed are as follows:
    j2sdk-1_4_0-rc-win.exe
    j2sdkee-1_3_1-win.exe
    jwsdp-1_0-ea1-win.exe
    jwsdp-1_0-ea1_01-tutorial.zip
    apache_1.3.23-win32-x86-no_src.exe
    (5) After installing these products, I set the environment variables as follows:
    JAVA_HOME = c:\j2se
    J2EE_HOME = c:\j2ee
    JWSDP_HOME = c:\jwsdp
    Path = c:\j2se\bin;c:\j2ee\bin;c:\jwsdp\bin; [and other previous statements]
    (6) I checked to see that Apache is running as a service. It is.
    On MyWebServer I start Tomcat and J2EE. Both start properly and are operating simultaneously.
    (7) From MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1
    This displays the page c:\ApacheHTTP\apache\htdocs\index.html.en (The Apache default server installation page.)
    (8) I then enter this address in IE:
    http://10.10.1.1:8080
    This displays the page c:\jwsdp\webapps\root\index.html (The default JWSDP page).
    (9) I then enter this address in IE:
    http://10.10.1.1:8000
    This displays the page c:\j2ee\public_html\index.html (The J2EE 1.3 Default Home Page).
    (10) So far so good. Now I want to test JWSDP as a container for JSP pages.
    (11) I use ant to build the converter app found in the tutorial examples (in folder c:\jwsdp\�\tutorial\examples\gs). I then deploy the converter app to the c:\jwsdp\webapps\gs folder.
    (12) From MyClientPC I open Internet Explorer and in the address box I type:
    http://10.10.1.1:8080/gs
    The converter app works perfectly.
    (13) To eliminate the need to enter the port number, I create a link from the Apache default server installation page to the converter app. From MyClientPC and enter this address into IE:
    http://10.10.1.1
    I then click on the link to the converter app and it works perfectly.
    (14) Question: Is this the best way to display JSP pages without having to enter the port number?
    (15) Now it�s time to integrate JWSDP and J2EE as described in these two documents:
    http://developer.java.sun.com/developer/technicalArticles/WebServices/wsj2ee/
    http://java.sun.com/j2ee/documentation/windows_guide.html
    (16) After I complete this integration I cannot start both Tomcat and J2EE at the same time. This makes sense because they both share port 8080.
    I start Tomcat.
    (17) From MyClientPC and use Internet Explorer to test the various relevant addresses. Everything works the same as it did before except this one:
    http://10.10.1.1:8000
    The page cannot be displayed. The J2EE default home page is not displayed, which makes sense because the J2EE port is no longer 8000; it has been changed to 8080.
    (18) Now I shutdown Tomcat and start J2EE.
    From MyClientPC and use Internet Explorer to test the various relevant addresses:
    (19) http://10.10.1.1:8080
    Displays the JWSDP default home page.
    (20) http://10.10.1.1:8080/gs
    The page cannot be displayed. The converter app no longer works.
    (21) From MyWebServer and use Internet Explorer to test localhost:
    http://localhost:8080
    This displays the J2EE default home page.
    (22) Question: Why does localhost give me a different page than the IP address?
    (23) Question: What was the point of integrating JWSDP and J2EE?
    (24) I want to get the converter app working, so I create a .war file and attempt to add it to the J2EE deploytool (see the two integration documents listed above at section 15.) I create the .war file following the instructions in the JWSDP tutorial:
    http://java.sun.com/webservices/docs/ea1/tutorial/doc/WebApp3.html#64606
    (25) I change to the c:\jwsdp\�\tutorial\examples\gs\build folder.
    I then type:
    jar cvf converter.war .
    A .war file is created.
    (26) I open the deploytool: File, New, Application, and I name it �converter�.
    I attempt to add the .war file: File, Add to Application, Web WAR.
    (27) When I attempt to add the converter.war file I get this error:
    �converter.war does not appear to be a valid web JAR.�
    I tried a few different attempts, all with the same result. I�m stuck.
    (28) I ask again, What was the point of integrating JWSDP and J2EE?
    (29) If this is the preferred configuration, how do I display my JSP pages like the converter app?
    Please help!!!

    The JWSDP tutorial says to be in the �build� folder of the example when issuing the jar command to create the .war file. The build folder is created when I run the �ant build� command.
    Attempt 1 from the command prompt in folder c:\jwsdp\tutorial\examples\gs\build>
    I typed this command:
    jar cvf c:\jaxmservices\converter.war .
    In this case I directed the .war file to be placed in a different folder as you suggested. Here�s the output:
    added manifest
    adding: index.jsp(in = 921) (out= 525)(deflated 42%)
    adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
    adding: WEB-INF/classes/(in = 0) (out= 0)(stored 0%)
    adding: WEB-INF/classes/Converter.class(in = 582) (out= 358)(deflated 38%)
    Didn�t work. Same error as before.
    Attempt 2 from the same folder:
    I typed this command as you suggested (I tried it with and without the final dot):
    jar tvf converter.war
    Here is the output:
    java.io.FileNotFoundException: converter.war (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.tools.jar.Main.run(Main.java:185)
    at sun.tools.jar.Main.main(Main.java:904)
    I tried a few other variations on these attempts with no luck. I�m stuck.
    I�m attempting to create a .war file out of two files: index.jsp and converter.class.
    Now that I�ve integrated JWSDP and J2EE, is there some other way that I can run the converter app instead of a .war file and the deploytool? In other words, if I go back to using ant to build and deploy converter, where would I deploy it so that it will work with J2EE?
    By the way, it doesn�t have to be converter. I�d be happy if I could get any JSP page to work in J2EE after the integration.
    Forever grateful,
    Logan

  • Capture Conv: rev/reverse - what's the point?

    Take this example from http://www.langer.camelot.de/GenericsFAQ/FAQSections/TechnicalDetails.html
    public static List<?> reverse(List<?> list) { return rev(list); }
    private static <T> List<T> rev(List<T> list) {
         List<T> tmp = new ArrayList<T>(list);
         for (int i = 0; i < list.size(); i++)
              list.set(i, tmp.get(list.size() - i - 1);
         return tmp;
    }Now, I've read the JLS, the Generics tutorial, the JOT.fm article and the langer.camelot.de FAQ, but I can't for the life of me figure out one thing:
    What's the point!? The wildcard version of reverse returns List<?> whereas the naive alternative (public static <T> List<T> reverse(List<T> list)) returns whatever you pass in. That seems much more useful! You pass in a List<String> and you get back a List<String> The JLS says that the templatized version "is undesirable, as it exposes implementation information to the caller."
    My question is this: is that the real reason? It's not, right? What implementation information is exposed? The type parameter? How is that bad? Is it bad enough to reduce the functionality of the method?
    I have a hunch that "exposing implementation information" is low on the tradeoff scale - and that the real reason for the wildcard version is backward compatibility. If you only had the templatized version, old code that tries to pass in a plain-old List to reverse would now generate unchecked warnings because of the conversion from raw List to the formal parameter's type List<T>. The preferred wildcard version doesn't generate unchecked warnings because the conversion from raw List to List<?> is 'safe'.
    Isn't that right? The reason that "public static <T> List<T> reverse(List<T> list)" is bad is not because it exposes implementation details, but because it causes old code to generate unchecked warnings, non?
    If I'm right, then my follow up question would be: who cares? Who cares if old code generates unchecked warnings? Isn't that fair? - a sort of gentle pseudo-deprecation of raw types?
    And furthermore, if you'll allow me to smush several questions together, why the preoccupation with eliminating unchecked conversions all over the place? Doesn't the bytecode that comes out look the same either way? What benefit does an unchecked-conversion-free program or CompilationUnit have over one with such conversions? Does provability make possible some future JVM optimizations where some casts or instanceofs can be eliminated? I don't really see how, unless we're talking about some wacky static compiler. Why go to so much trouble to avoid unchecked conversions?

    Angelika, you caught me. I was writing about the 'void reverse(List<?>)' example from the JLS when I went back to your page and realized that your example had a return type. It confused the matter slightly, but not enough to detract from my main point, I thought. In fact, it seemed to prove my point - to provide a good counter-example to the JLS reasoning! But let me start from the beginning:
    In the draft JLS, it mentions that<T> void reverse(List<T> list) {} is preferable to void reverse(List<?> list) {} which is "undesirable" because "it exposes implementation information to the caller."
    What implementation information? The only difference between the two is that the 'unknown element type' has a different name. '?' as opposed to 'T'. In both cases, it means the same thing! A List with some unknown element type.
    Whether it's called 'T' or '?' is inconsequential, it seemed to me. Perhaps one could argue that one is 'prettier' than the other but I didn't see how any implementation detail was exposed.
    I didn't see any real reason to prefer the wildcard version over the other, except the reason I gave: the wildcard version avoids unchecked warnings for legacy code.
    I now see that there is one other important difference - the type parameter T is actually part of the method signature. That could have important implications for overriding. In that sense, the 'List<T>' version does 'expose' and impose an unnecessary implementation constraint. I haven't thought through how that could be a problem, but I certainly can imagine that it might.
    However, neither the 'avoid-unchecked-warnings-on-legacy-code' reason nor the 'typeparameter-is-part-of-method-signature' reason is mentioned in the JLS example. Without those two pieces of information, the preference just seems arbitrary.
    So that was my initial question: "am I incorrect? The dont-expose-implementation-information reason seems much less important than the avoid-legacy-warnings reason - shouldn't the JLS mention *that* instead?"
    THEN, to add to my feeling, I noticed that the similar-looking example on your page involved a return type of List<T>. It seemed to follow the JLS recommendation to its detriment! The preference in the JLS example seemed arbitrary yet harmless, but here it seemed actually wrong! In trying to avoid the hand-wavy concept of 'exposing implementation information to the caller', the usefulness and semantics were ruined! That seemed like alot to give up, just to spare legacy people some unchecked warnings. I thought this just drove home my original point about the JLS example - but instead it just made my question a confusing mixture of two different issues. I should have realized that and left the FAQ version out of the discussion.
    Given all of that, consider now only the JLS's 'void reverse(List<?> list)' case and let me ask this refined question:
    I think the JLS should say that '<T> void reverse(List<T> list)' is undesirable not because of the vaguely unconvincing reason that "it exposes implementation information" but rather because of these two explicit reasons:
    . the type parameter is part of the method signature (which can cause strange 'gotchas' with overriding) and because
    . it causes previously acceptable code to now unnecessarily generate unchecked warnings.
    Does anyone else think differently?
    POSTSCRIPT:
    Of course, the thing I didn't realize was that that code snippet in the FAQ is crazy. ie. 'List<?> reverse(List<?> list)' is absurd! You would probably never do that. What kind of reverse method would return a List of a different parameterization than it gets? That would be a really weird reverse method, I think.
    Given that, it seems to me that you should modify the 'reverse' snippets in the FAQ, under sections "What is the capture of a wildcard?" and "What is a wildcard capture assignment-compatible to?". I think you should do one of three things:
    1. Make rev/reverse return 'void'. Then your example code becomes the same as the JLS, the wildcard version makes sense, and preferring it makes sense too.
    2. Remove one of the two methods and only have 'public <T> List<T> reverse(List<T>)' which gives the correct implication.
    3. Keep the example but give the methods a different name and purpose than 'reverse', like
    'List<?> examineListAndMaybeReturnOneWithDifferentElementTypes(List<?> list)'. :)

  • I am extremely upset. I purchased my iPad in SA and I am traveling in Greece. When I want to make use of the free apps, I get a message that the app is not available in the SA store. What is the point of having an iPad if you cannot use it worldwide?

    I am extremely upset. I purchased my iPad in SA and now I am in Greece. I cannot download free apps as I get a message that the apps are not available in the SA store and only in US stores. When I change to the US store the same thing happens. What is the point of having an iPad if I cannot use it worldwide??? I feel that I wasted my money purchasing it as I specifically purchased it to use when I travel. How can I get access to all the available apps and why are they restricted.

    You can use your iPad worldwide. However, each AppleID is tied to
    a specific country's store. To use the AppStore in any country, you
    must be in that country and have a credit/debit card issued by a financial
    institution in that country with a verified billing address in that country.
    It is the developer's choice which AppStores he makes his app available
    from, and some countries prohibit certain apps.
    To make a purchase from the US store (including downloading a free app
    available in the US store), you must be in the US and have card issued
    in the US with verified billing address in the US.
    You can use your purchases from the SA store worldwide, but you
    cannot make purchases in other than the SA store unless you meet
    the aforesaid conditions.

  • What is the point of the download window if you use stacks?

    Greetings,
    One of the most annoying things about the download window was the fact that the window always hung around after completing dowloads in Tiger when using safari. To me, that was just a time waster of always pressing Apple+W to close that window.
    When Leopard was released, I was excited to realize that one function of the download stack was to recevie downloads from safari after completed. However, after completion, the download window still sticks around and I still have to close it... then navigate to my stack of downloads to mount the image. What is the point of the download window is I use stacks now? Why can't the window disappear after completion?
    //Cheers

    Aaargh!! Me too - it's so annoying! Firefox has a downloads window as well - I just don't see the point of it. I didn't like it in Tiger either.
    As a way to see the progress of downloads, it's fine, but it should at least close when all the downloads are finished, and completed downloads should not display.
    Ideally it should look & work exactly like the Copy window in Finder - the one that comes up when you are copying or moving a large file or number of files from one folder to another.
    Is there a hack that will make it work like that?

  • My wifes iphone was too full to record a video so I upgraded her cloud storage to 20g and did mine at same time. Cloud is showing 15g free storage butshe still cannot take any mor photos as "not enough memory" What is the point of paying for the extr

    My wifes iphone was too full to record a video so I upgraded her cloud storage to 20g and did mine at same time. Cloud is showing 15g free storage butshe still cannot take any mor photos as "not enough memory" What is the point of paying for the extr

    Hello Pushtheriver,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning iCloud storage issues:
    Get help using iCloud storage
    This may also help:
    Understanding iOS device capacity
    You can sync and download many different types of content on your device. Some types of content (such as music and videos) typically take more space than others (such as notes and books). The amount of space taken by an app depends on the app's purpose; complex or graphically intense apps usually take more space than simpler apps.
    If your device is near its capacity, you can remove some of the less used content to make room for more.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • What's the point of warranty?

    I am a student coming from Hong Kong  to London for postgraduate study. Before I left Hong Kong, I decided to buy a netbook for my lecturers in the UK. Lenovo s10-2 was chosen because the version available in HK comes with 6 cell battery with international warranty and Lenovo Protection Service (against accidental damage).
    This is the first Lenovo machine for me. All was well and I was starting to appreciate Lenovo. Suddenly, the LED screen started to flick with white lines moving across the it, just two weeks after I bought it from Hong Kong.
    Yesterday, I called the UK support line who initially suggested replacement (because the purchase is last than 30-day old). However, when the agent found out that I bought the machine in Hong Kong, he said I could only get it repairs. Fair enough.
    I packed the netbook this afternoon ready to ship it to the repair center. Being not sure about whether or not my proof of purchase was needed, I called the support line again. This time, the agent gave me a "friendly warning" or maybe a management of my expectations.
    I was told that Lenovo believes that there is a 99.5% chance that these type of problems are due to “internal damages" caused by users! I was also advised that sending the machine in for repairs risk myself getting into paying 230 pounds (pretty much the purchase cost) to get the LED screen fixed because it is likely to be not covered by warranty. On top of that, I would have to pay 65 pounds even if I want my netbook back after inspection without getting fixed because again, 99.5% chance that "damages by users" would be concluded!
    What's the point of warranty? Totally unacceptable. Any thoughts? Should I take the risk?
    I only got the machine just over two weeks ago and used for less than 10 times!

    seblee,
    This bears a bit of looking into to provide you the best answer.   Sometimes, the accidental damage policies are only valid in the home country, and I would like to check.  If that were to be the case, you would have replacement or repair options in HK, but standard warranty terms would likely apply in UK.
    Your situation sounds exceptional, and I'd like to look into this and see what can be done.
    Can your send me a private message with your contact information and the serial number from the bottom of the unit?
    Sorry that you are having this trouble.  Will see how we can help.
    Mark
    ThinkPads: S30, T43, X60t, X1, W700ds, IdeaPad Y710, IdeaCentre: A300, IdeaPad K1
    Mark Hopkins
    Program Manager, Lenovo Social Media (Services)
    twitter @lenovoforums
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • What is the point of Precision and Scale in Number Type?

    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
          COL1
    223.993939
    88.228384
          9.34
             0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?

    Omega3 wrote:
    Version :11.2
    What is the point in having PRECISION and SCALE in number type? If you create the column with just NUMBER ie.without
    specifying precision or scale , you can enter numbers with any precision and scale.
    SQL> select * From v$version where rownum < 2;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    SQL> create table t1 (col1 number);
    Table created.
    SQL> insert into t1 values (223.9939394);
    1 row created.
    SQL> insert into t1 values (88.228384);
    1 row created.
    SQL> insert into t1 values (9.34);
    1 row created.
    SQL> insert into t1 values (000.00);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t1;
    COL1
    223.993939
    88.228384
    9.34
    0Did you ever have a business scenario where a Numerical column should store values only with a fixed precision and scale ?Lots of business requirements for specific precisions and scales.
    A persons Age may required to be stored as whole numbers of no more than 3 digits.
    A sum of money may required to be stored with no more than 2 decimal places of accuracy e.g. GB Pounds and Pence or US Dollars and Cents
    A unit of length may required to be stored in metres with 2 decimal places for centimetres
    A shoe size may be required to be stored with one decimal place for half sizes
    etc.
    etc.
    Yes, you may just create all of them as generic NUMBER datatype, but creating them with precision and scale can provide additional information about the limitations expected for the values stored, especially for things like reporting tools that may use the specified precision and scale to determine how to display the values automatically (by default).
    If you start questioning "what's the point?" then you may as well say what's the point in having a NUMBER datatype when we can store numbers in a VARCHAR2 datatype? or what's the point in having a DATE datatype when we can stored dates as VARCHAR2 datatype? etc.
    No point in asking such a question because there's almost always a point to these things (and if there isn't they get deprecated in later versions).

  • What are the parameters in Call transaction method?

    Hi ABAPER'S,
        Please give me what are the parameters in call transaction method?
    Thanks,
    Prakash

    Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
    Syntax:
    CALL TRANSACTION <tcode>
    USING <bdc_tab>
    MODE  <mode>
    UPDATE  <update>
    <tcode> : Transaction code
    <bdc_tab> : Internal table of structure BDCDATA.
    <mode> : Display mode:
    A
    Display all
    E
    Display errors only
    N
    No display
    <update> : Update mode:
    S
    Synchronous
    A
    Asynchronous
    L
    Local update
    A program that uses CALL TRANSACTION USING to process legacy data should execute the following steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION 'TFCA' USING BDCDATA
    MODE 'A'
    UPDATE 'S'.
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    The MODE Parameter
    You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes:
    A Display all. All screens and the data that goes in them appear when you run your program.
    N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.
    E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.
    The display modes are the same as those that are available for processing batch input sessions.
    The UPDATE Parameter
    You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select between these modes:
    A Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
    Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
    If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
    S Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
    L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
    The MESSAGES Parameter
    The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
    You can record the messages issued by Transaction TFCA in table MESSTAB with the following coding:
    (This example uses a flight connection that does not exist to trigger an error in the transaction.)
    DATA: BEGIN OF BDCDATA OCCURS 100.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF MESSTAB OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    BDCDATA-PROGRAM = 'SAPMTFCA'.
    BDCDATA-DYNPRO = '0100'.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    CLEAR BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CARRID'.
    BDCDATA-FVAL = 'XX'.
    APPEND BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CONNID'.
    BDCDATA-FVAL = '0400'.
    APPEND BDCDATA.
    CALL TRANSACTION 'TFCA' USING BDCDATA MODE 'N'
    MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
    WRITE: / MESSTAB-TCODE,
    MESSTAB-DYNAME,
    MESSTAB-DYNUMB,
    MESSTAB-MSGTYP,
    MESSTAB-MSGSPRA,
    MESSTAB-MSGID,
    MESSTAB-MSGNR.
    ENDLOOP.
    The following figures show the return codes from CALL TRANSACTION USING and the system fields that contain message information from the called transaction. As the return code chart shows, return codes above 1000 are reserved for data transfer. If you use the MESSAGES INTO <table> option, then you do not need to query the system fields shown below; their contents are automatically written into the message table. You can loop over the message table to write out any messages that were entered into it.
    Return codes:
    Value
    Explanation
    0
    Successful
    <=1000
    Error in dialog program
    > 1000
    Batch input error
    System fields:
    Name:
    Explanation:
    SY-MSGID
    Message-ID
    SY-MSGTY
    Message type (E,I,W,S,A,X)
    SY-MSGNO
    Message number
    SY-MSGV1
    Message variable 1
    SY-MSGV2
    Message variable 2
    SY-MSGV3
    Message variable 3
    SY-MSGV4
    Message variable 4
    Error Analysis and Restart Capability
    Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures.
    You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0, then you should do the following:
    write out or save the message table
    use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction. You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

  • What is the point of having indented levels in course outlines?

    What is the point of having indented levels in course outlines? It's not possible to add any materials or posts to this. I want to avoid having simply a long list of topics that are difficult to manage. When I create a topic in the outline, I can indent it, but then I can't add any posts to it as it doesn't even show up as a heading in course manager.
    I've been trying to have some kind of logical organisation of materials, but the only thing you seem to be able to do is have a long list of topics.
    Which makes me wonder why the possibility of indenting levels is there at all - it seems to be a completely worthless item.

    I guess the point of the indented lists is to provide the user with some description of the topic’s contents. It's a standard convention in the table of contents of books. It might pay to break your course down into a number of courses if the list of topics is getting too unwieldy.

  • What is the advantages of polymorphism over method overriding?

    what is the advantages of polymorphism over method overriding,that means if we are able to to create object at different instances at diff time for that sub class reff variable than what is the need of careating object of super class data type(i.e why always it is necessary to have upcasting for polymorphism?but if we can achive the same output without upcasting).....please tell me..lets have complete discuss..

    Seriously though....
    WebLogic (for which I have deployed many apps on) as
    well as Websphere are both high end Java application
    servers, meaning J2EE servers (in short). They allow
    one to deploy Enterprise Archive(EAR), a Web
    Archive(WAR), or an EJB Archive (in a JR file).
    These two servers allow one to deploy EJBs, use
    e JNDI, JMS, connectors, and other J2EE technologies
    - Tomcat does not. well, EJBs - no
    JNDI, yes - http://tomcat.apache.org/tomcat-4.1-doc/jndi-resources-howto.html
    JMS - yes (with an implementation, such as ActiveMQ: http://activemq.codehaus.org/Tomcat)
    Not sure what you mean by "connectors".
    Tomcat provides quite a bit of functionality (but yes, no EJBs)

  • HT5287 If DVD Movies, Audio CD's and even burning CD and DVD's are not supported, what is the point of DVD & CD Sharing then? Wouldn't it just be better to remote in or use a thumb drive if it's only able to be used for data transfer?

    If DVD Movies, Audio CD's and even burning CD and DVD's are not supported, what is the point of DVD & CD Sharing then? Wouldn't it just be better to remote in or use a thumb drive if it's only able to be used for data transfer?
    Or am I missing the bigger picture?

    As long as you have a Superdrive or an external burner/drive, burning, watching, installing, etc. from CD or DVD will work just fine. And so will sharing.

  • Backed up ipod to the cloud (12/25 11am) and then updated. Music is gone and the back up is not restoring?! why? What's the point of the cloud if nothing is there?

    Ipod has been playing music in my car the past two years. new computer this year and new email address. Backed up to cloud. change ID on itunes. Music on my ipod disappeared. Shouldn't it be on the cloud somewhere?! What's the point of this cloud? And is it b/c I can't seem to change my icloud ID to the new one on my ipod settings?

    Music is not stored in your personal iCloud account, or in your device backup.  Music purchased from the iTunes store is in available for redownload as explained here: http://support.apple.com/kb/ht2519.  Music from other sources such as your CDs should be in your iTunes library on your computer and can be synced back to your iPod from there.
    To change the iCloud account on your device you have to delete the exsting account, then sign back into the new ID.

  • What's the point in buying a new MacBook?

    Hi all,
    Recently I went with my iBook G4 to the Apple store to troubleshoot a small problem, but they were unable to help me as after only 7 years, the machine was rendered obsolete and they didn't feel obliged to help. My iBook recently died and I felt like a part of me was missing.
    So my question is, what is the point of buying myself a brand new MacBook Pro if in 5 or 6 years, it will be obsolete? I want a Mac that will last me wherever I go for a long time before it finally dies. I've realized that I need to put PowerPC computers out of the question, but will intel processer Macs last longer than PowerPC processors?
    For the record, I don't want to switch to Microsoft as I find them difficult and this isn't a crack at Apple.
    Any answers are very appreciated,
    Thomas.

    With Intel based Macs the hardware will not become obsolete as fast as PPC based Macs did, but the operating system and/or applications used might.
    That does not mean that it will stop working, just that you won't, in a few years' time, be able to get the latest bells and whistles.
    Officially, support from Apple ceases after seven years - but that does not stop the Macs working!
    Vintage and obsolete Apple products:
    Obsolete products are those that were discontinued more than seven years ago. Apple has discontinued all hardware service for obsolete products with no exceptions. Service providers cannot order parts for obsolete products. These include ALL G4 and G5 models.
    http://support.apple.com/kb/HT1752?viewlocale=en_US

Maybe you are looking for

  • WRT54G- Won't accept my new modem and I keep getting a strange error message

    On Christmas night, my modem crapped out forcing me to purchase a new one the next day. After getting it online, I attempted to hook up my router. However, I could not connect to the internet through it. I figured it must be because the IP address mu

  • 64 bit mode and some questions

    Happy New Year all, Just once I'd like to start up in 64 bit mode. I've tried to do it several times without success and I don't know what the problem is. Hardware, software? I'm running two 10.6.2 systems, one on 1 SSD 3 drive Raid 0 array, one on a

  • Where did I loose my movie

    I have made a movie at length 31 min. The size is 1.19 GB, but when I copy it in explorer from iPhone folder to PC folder the size left is 0KB. Where did 1.19 GB go? What happens? The file is stored as a .MOV, but empty and not playable. Frustrated!

  • Role in BW development Vs Production

    Hi,    I created  roles in development and transported it to production.   In development i created test user and assigned some roles to test and they are working fine...   I transported these roles to production the transport request imported with 0

  • Using grid component for layout

    I'm using the grid component to display six panel, 3 per line. Everything seems fine except that I thought if user resized the browser the six panel would resize but they don't. Even if I start the app in a size that can't fit the original size of th