Explain Method Overriding with respect to following program

Hello all,
Can anybody explain method overriding with respect to following program.
I couldn't understand output of the program
class Parent
public String s = "This is Parent";
private void method1()
System.out.println("Parent's method1()");
public void method2()
System.out.println("Parent's method2()");
method1();
class Child extends Parent
public String s = "This is Child";
public void method1()
System.out.println("Child's method1()");
public static void main(String args[])
Parent p = new Child();
p.method2();
System.out.println(p.s);          
output:
Parent's method2()
Parent's method1()
This is Parent

In method2() of parent class, there is a call to method1().
My doubt is how it will resolve which method to call i.e., method1() in parent or child class.
In other words...
if method1() in parent class is declared as public or protected then output of above program is
parent's method2()
child's method1()
But if method1() in parent class is declared as private then output of above program is
parent's method2()
parent's method2()
..no matter with what object/reference variable you are calling method2()
What is the reason behind it??

Similar Messages

  • Tickets with respect to following and the solutions.

    Hi,
    Please send me the solution to following topics in SD.
    1)material determination/product selection.
    2)Creation of Customer Master Record and Customer Account Group.
    3)Material Listing and Exclusion.
    Please email me at [email protected]
    Looking forward for your reply,
    Thx,
    Farhan.

    True

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • I got the following for Adobe Reader that there was an issue with it. C:\Program Files (x86)\Adobe\Reader 11.0\Reader\NPSWF32.dll file How do I fix this? Thanks.

    How can I fix this problem. I got the following for Adobe Reader that there was an issue with it.  C:\Program Files (x86)\Adobe\Reader 11.0\Reader\NPSWF32.dll file

    Try uninstalling using http://labs.adobe.com/downloads/acrobatcleaner.html then reinstall.

  • What version of the following programs (LasPass, Kaspersky anti Virus, Internet Download Manager) are compatible with Mozilla Firefox 15.0.1?

    what version of the following programs (LasPass, Kaspersky anti Virus, Internet Download Manager) are compatible with Mozilla Firefox 15.0.1?

    Lastpass 2.0.0, Kaspersky 2012, 2013 and Internet Download Manager 6.12 build 21 are fully compatible with Firefox 15. If you are having any issue, let us know :)

  • Can anyone explain what "multi-tenant" means with respect to OAM and OIF?

    Hi,
    I noticed that OAM 11gR2 has several additional authentication modules and schemes out-of-the-box for "MT" or multi-tenant. I've actually tried them, but am not clear exactly what their purpose is?
    As a test, I configured the FederationMT module and FederationMTScheme to protect a test resource in OAM, and then when I access the resource, I first get a page with one field for username and a "Sign In" button. After I enter a user name, it goes to a form login page and I can log into the OIF IdP, and that's about it. I guess that I don't see what this accomplishes?
    If anyone is familiar with this, please advise.
    Thanks,
    Jim

    Hi,
    Thanks for the metalink article. I've read that, and I can understand what the article is describing, but I'm not 100% clear how that relates to the configuration parameters in the FederationMTPlugin. The article talks about a mapping file, but I don't see something like that for configuring the TenantDismbiguationPlugin?
    The first step in FederationMTScheme plugin is a TenantDisambiguationPlugin, which takes two parameters:
    KEY_IDENTITY_STORE_REF
    KEY_FEDERATED_TENANTS (a comma-separated list of "some things")
    The steps/orchestration for the FederationMTPlugin has:
    Initial Step: FedUserAuthenticationPlugin
    TenantDisambiguationPlugin OnSuccess: FedAuthenticationPlugin OnFailure: UserIdentificationPlugin
    UserIdentificationPlugin OnSuccess: UserAuthenticationPlugin OnFailure: failure
    UserAuthenticationPlugin OnSuccess: success OnFailure: failure
    FedAuthnRequestPlugin OnSuccess: success OnFailure: FedUserAuthentication
    FedUserAuthenticationPlugin OnSuccess: success OnFailure: TenantAmbiguationPlugin
    [The OnError results for all steps are failure, so I haven't shown them.]
    So, the first step is the FedUserAuthenticationPlugin (AssertionProcessing), and if that fails, the next step is the TenantDisambiguationPlugin.
    I guess all of my questions are around what that TenantAmbiguationPlugin does, and how it works?
    I'm guessing that what you enter on the 1st webpage, which asks for a Tenant, is matched against the comma-separated list that is in the plugins "KEY_FEDERATED_TENANTS" parameter.
    Is that correct?
    But:
    a) What happens if there is a match of what you entered vs. what's in the "KEY_FEDERATED_TENANTS" list?
    b) What happens if there is NOT a match of what you entered vs. what's in the "KEY_FEDERATED_TENANTS" list?
    That article you mentioned calls for a mapping file, that maps what is entered (the tenant) to a user identity store, but where is that in the TenantDisambiguationPlugin's parameters? The only other parameter for that plugin is the "KEY_IDENTITY_STORE_REF" parameter.
    Having said that, I described the steps and step orchestration in the FederationMTPlugin above. If the TenantDisambiguationPlugin is suppose to somehow map what's entered to a user identity store name, then, with respect to the FederationMTPlugin, is that mapped user identity store used for the UI and UA steps (i.e., as the "KEY_IDENTITY_STORE_REF" for the UI and UA steps)?
    Thanks for your help with this. Oracle's documentation certainly merits some improvement :(...
    Jim

  • What's the role of 'throws' clause in method overriding

    I'm getting error when subclass "Parser" overrides method 'getInt()' which throws Exception but super class version don't. It is compiling without error when vice versa is true i.e., super class version throws exception but sub class version don't throw exception.
    What's the role of 'Throws' clause in method overriding?
    What's the rationale with the output of following program?
    class Parser extends Utils {
       public static void main(String [] args) {
         System.out.print(new Parser().getInt("45"));
      int getInt(String arg) throws Exception{
         return Integer.parseInt(arg);
    class Utils {
       int getInt(String arg)  { return 42; }
    }

    karthikbhuvana wrote:
    I'm getting error when subclass "Parser" overrides method 'getInt()' which throws Exception but super class version don't. It is compiling without error when vice versa is true i.e., super class version throws exception but sub class version don't throw exception.
    What's the role of 'Throws' clause in method overriding?
    What's the rationale with the output of following program?
    class Parser extends Utils {
    public static void main(String [] args) {
    System.out.print(new Parser().getInt("45"));
    int getInt(String arg) throws Exception{
    return Integer.parseInt(arg);
    class Utils {
    int getInt(String arg)  { return 42; }
    Supose you do:
    Utils u = new Parser();
    int i = u.getInt("XX");This would throw a NumberFormatException, which is a checked exception, yet the compiler doesn't know this because Util.getInt() has no throws clause. Such a loophole would defeat the whole point of having throws clauses.
    So a method can only implement or override another if the throws clause on the interface or superclass admits the possibility of throwing every exception that the implementing method can throw, thus code which calls the method from a superclass or interface reference doesn't get any unexpected exceptions.

  • Delivery in background with respect to SO number

    Hi experts,
    Anyone kindly help me for the following case...
    In my workflow scenario, If sales order gets created, mail has to be sent to every user. Also for that sales order, delivery should be created in background and again mail has to be sent to all users...
    I m clear with sending mail. but i m struggled while creating delivery in background. i dont know how to do this. I hav an idea that it can be created using BDC recording and this recording program can be called in our method which is created in our business object.
    How to create a single BDC recording to create sales order as well as creating delivery in background... Is it possible to do like this. Or is there any function module to create delivery in background with respect to sales order number?
    kindly give some suggestion and step by step procedure to do this...
    Thanks in advance...
    Regards
    Raaams...

    Dear Raams,
    You can create delivery background automatically by maintaing Batch Jobs.
    The process of creating Batch Jobs:
    1.Tcode: SM36 for define background job/batch job
    enter job name, job class & click enter
    enter ABAP program name, varient name(optional)
    finally, u get message as batch job released
    2. Tcode: SM37 for simple job selection
    goto job log to check batch jobs are running or not(status)
    3. Tcode: SA38 for creation of varients
    If you have any concerns revert back the same
    Regards
    Amjath

  • Problem with RFC connection - tp program not registered

    Hello everyone
    recently there  has appeared a problem with the RFC connection on our system - we received the following set of messages:
    Trace file opened at 20101221 130738 Central European Standard Time, SAP-RE
    ======> CPIC-CALL: 'ThSAPOCMINIT' : cmRc=2 thRc=679
    Tp program is not registered.
    ABAP Programm: RSRFCPIN (Transaction: SM59)
    User: xxx(Client: 100)
    Destination: SIDRFC_IFSAPHRCZPKCP (handle: 2, , )
    Error RFCIO_ERROR_SYSERROR in abrfcpic.c : 1501
    CPIC-CALL: 'ThSAPOCMINIT' : cmRc=2 thRc=679
    Program transakcji nie jest zarejestrowany
    DEST =SIDRFC_IFSAPHRCZPKCP
    HOST =%%RFCSERVER%%
    PROG =IFCZPKCP
    GWHOST =ssapprod
    GWSERV =sapgw21
    I tried to register program with a command:
    rfcexec -aIFCZPKCP -gssapprod -xsapgw21
    but with no success - the program didn't appear on the list of logged clients on the system in gateway monitor. Frankly speaking we do not know now what else we can do - please help!
    We have ECC 6.0 (SAP_BASIS 700 SP18) on Windows Server 2003 R2 x64.
    Thanks in advance for any help.
    Regards
    Peter

    Hi Salim
    thanks for your reply.
    ./rfcexec -a(PROG_ID) -gssapprod -xsapgw21 &
    The syntax you're providing refers to UNIX systems, but I did similar thing on our Windows system - I tried all of the following methods (unfortunatelly without success):
    rfcexec -a(PROG_ID) -gssapprod -xsapgw21
    full_path_to_rfcexec.exe -a(PROG_ID) -gssapprod -xsapgw21
    rfcexec -a(PROG_ID) -gssapprod.domain -xsapgw21
    full_path_to_rfcexec.exe -a(PROG_ID) -gssapprod.domain -xsapgw21
    Can you advise me what to do now?
    Thanks
    Piotr

  • How to populate the data or details of only the present year and the previous year with respect to the given RATNG?

    Hi All,
    I have created a form with 5 blocks (namely ENQACMHDR, ENQACMDTL, ENQACEHDR, ENQACEDTL, ENQACSPEC), where i have 8 push buttons (namely ENTER_QUERY, EXEC_QUERY, CLEAR, FIRST, NEXT, PREVIOUS, LAST & EXIT).
    This form is created just for viewing purpose only. So after I execute, all the blocks have been blocked against insert & update.
    I query on 2 fields that is 'ENQNO' and 'RATNG' (Both the fields belong to the block ENQACMDTL).
    When I click on 'EXEC_QUERY' directly, all the data of all the years populates.
    But the user wanted the data to be populated from only the present year and the previous year.
    So , on 'WHERE Clause' of the property_palette of 'ENQACMDTL' block , I put in the following condition:
    SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR( ADD_MONTHS(SYSDATE,-12) , 'YYYY') OR SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR(SYSDATE, 'YYYY')
    PROPERTY PALETTE (ENQACMDTL block)
    WHERE Clause
    SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR( ADD_MONTHS(SYSDATE,-12) , 'YYYY') OR SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR(SYSDATE, 'YYYY')
    Now the data of only the present year and the previous year is being populated. Its ok with the field of 'ENQNO'.
    The problem is when i query on field 'RATNG' . 'RATNG' is a Text_item with Number of Items displayed=5. (5 rows)
    The following are 2 columns of a Table (Name=ENQACMDTL) in Database.
    ENQNO
    RATNG
    2013900054
    500KC2
    2013900047
    800KC4
    2013520018
    750KC6
    2012900037
    1000KC2
    2012520109
    500KC2
    2012140019
    750KC6
    2011540036
    500KC2
    2011100030
    1000KC2
    2006100007
    90KD8
    2006750014
    750KC6
    2006900072
    500KC2
    The first 4 numbers of 'ENQNO' denotes the year. There are more than a lakhs of records.
    So when i query on the field 'RATNG',
    Example:For RATNG=500KC2;
    I click on ENTER_QUERY, On the field of 'RATNG' , i put in the value 500KC2 and click on  EXEC_QUERY; Details with respect to 500KC2 is displayed as well as all the other unwanted RATNG like 750KC6, 1000KC2 (which belongs to the ENQNO of the present year and the previous year) also gets displayed.
    I want details of only RATNG (500KC2) to be displayed, but only of the present year and the previous year, that is 2013900054, 2012520109 (ENQNO).
    Other than 500KC2 RATNG, no other RATNG must be displayed.
    The RATNG=500KC2 is also present for ENQNO=2011540036 , 2006900072. But I dont want these to be displayed.
    I want only the data or details of the present year and the previous year to be displayed or populated with respect to the given RATNG.
    Can You Help me or tell me what do i do for this?
    Hope I'm clear with my question!!
    If my question is not clear, let me know plz.
    Thank You.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    Oracle forms 6i.

    On key-exeqry you have to program.  Delete all other trigger codings for checking your condition.
    It dint work on key-exeqry.
    I tried key-exeqry on form trigger, block (enqacmdtl) and also on field(:enqacmdtl.enqno) , but none of them worked.
    It did not display the message.
    I have a 'PUSH-BUTTON:EXEC_QUERY.
    For EXEC_QUERY, Trigger : WHEN_BUTTON_PRESSED;
    I added the following code:
    if to_number(substr(:enqacmdtl.enqno,1,4))<to_number(to_char(add_months(sysdate,-12),'YYYY')) then
         message('The Rating is not present for the present year and the previous year');message(' ',no_acknowledge);
         raise form_trigger_failure;
    else
         execute_query;
    end if;
    It is working fine and the message is being displayed.
    But again I have a new problem and that is;
    On the field :enqacmdtl.enqno, when i enter the '2013%' and press 'EXEC_QUERY', it works fine.
    but when i enter '2006%' and press 'EXEC_QUERY', it shows the following error
    FRM-50016: Legal characters are 0-9 - +E. It does not display the message also.
    but when i enter the complete number, '2006580002', then it works fine , that is it displays the message (The Rating is not present for the present year and the previous year).
    The problem is because of '%', only when i put in the restricted data (which does not satisfy where condition).
    How do i solve this?
    Thank You Priyasagi.

  • How come my local variable is not updating it's value with respect to what's happening in the while loop?

    Hello,
    I am trying to extract data out of a while loop as my declarations update with respect to the iteration number. I have attempted to use both local variables and shift registers, but with no luck.
    I have also done the following example: http://www.ni.com/white-paper/7585/en and it works like a charm.
    I attached the PNG file with local variable declaration circled in red. Will attach a VI in the next respnose.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Local Variable.png ‏366 KB

    OK, looking at the code...
    Can you explain what it is supposed to do? What's the purpose of the value property node read which only seems to update an indicator.
    The inner while loop should proably be a FOR loop, because the number of iterations is known before the loop starts.
    Your use of formula nodes seems overly complicated.
    LabVIEW Champion . Do more with less code and in less time .

  • Finding Angle with respect to X axis in VB?

    In my VB program, I used the FindStraightEdge function to get a line for a particular edge. I would like to know what is the angle with respect to X axis. In the Measurement Studio, I use the "Caliper" to find this angle; however, in VB the Caliper function doesn't seems to have an option of measuring angle. Am I missing something here???
    I found the "FindAngleBetweenLines" function. Is this the only method to measure angle?
    Thanks,
    Simon Teng

    Simon,
    Probably the easiest way to do it is to create a variable that contains a line going from 0,0 to 1,0 and use the "FindAngleBetweenLines".
    Another way is to use the endpoints of the line to calculate its angle relative to horizontal. You can use atan(dy/dx).
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Synchronization with respect to the memory model

    Hi
    Can anyone give paste me a link (other than to the JLS itself) that describes the meaning of synchronization with respect to the memory model rather than simply as a means of mutual exclusion?
    You read that without synchronization different threads can have inconsistent views of what should be the same data. The link below talks of this issue but says 'the causes of memory consistency errors are complex and beyond the scope of this tutorial.'
    http://java.sun.com/docs/books/tutorial/essential/concurrency/memconsist.html
    Many thanks
    Bruce

    There are many articles and a few book chapters or
    parts thereof that deal with the new memory model,
    and of course some key websites. The primary website
    is:
    http://www.cs.umd.edu/~pugh/java/memoryModel/
    Brian Goetz has written a number of articles on IBM's
    DeveloperWorks, and of course this is covered in
    great depth in "Java Concurrency in Practice" by
    Goetz et al.
    I also covered it in the threading chapter of "The
    Java Programming Language, 4th edition". :)
    A few key points:
    - access to volatile long/double has always been
    atomic (old JMM and Java 5 JMM), but remeber that
    access means a simple read, or a simple write,
    something like ++ is not atomic because it is a read
    followed by a write
    - don't think of this in terms of "caches" - that
    will lead to the wrong reasoning. It isn't about
    flushing caches or writing to main memory (that was
    the old conceptual model that just gets people into
    trouble because they keep trying to reconcile it with
    how the hardware chaching works). The new memory
    model is all about establishing happens-before
    relations ships between writes and reads of a
    variable, so that the value allowed to be returned
    from a read is the most recent value that was
    written.
    I was under the belief that the previous MM was writen in the way that it was in order to allow flexibility in terms of instuction/read/write reordering, caching, synch block merging and any number of other things that may occur, such that vm's on various architectures could be written efficently.
    Of course it could have been that vm writers on those various architectures took advantage of the slack nature of the spec to implement all of those non-standard interpretations of the spec :). Its definately a good thing that the spec has been redefined to make it clearer exactly what a java develper should expect.
    - the definitive source for this is actuall the
    JSR-133 specification. Chapter 17 of the JLS 3e is
    based on that spec but doesn't contain the full
    details. (But you are better off reading Ch17 than
    the proper spec :) )matfud

  • .can anybody explain the bdc with help of an example

    i am new to bdc .can anybody explain the bdc with help of an example

    Hi,
    BDC is method to transfer legacy data into R3 system.
    Data transfer can be done in any one method below:
    BDC
    LSMW
    Direct Input method
    BAPI
    Of these BDC is subdivided into 2 types,
    Call Transaction and Session method (TCode: SM35)
    Let me give the sample prg for Call Transaction method.
    tables ZMATMASTER.
    DATA : itab like TABLE OF  ZMATMASTER WITH KEY DESCRIPTION with header line.
    DATA : IT_BDC LIKE TABLE OF BDCDATA WITH HEADER LINE.
    DATA : IT_MSG LIKE TABLE OF BDCMSGCOLL WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\Material.txt'
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = '#'
      TABLES
        DATA_TAB                      = itab.
    LOOP AT ITAB.
        PERFORM BDC_HEADER USING 'ZFILE_DOWNLOAD' 9001.
        PERFORM BDC_DATA   USING 'BDC_OKCODE' 'SAVE'.
        PERFORM BDC_DATA   USING 'ZMATMASTER-MNO' ITAB-MNO.
        PERFORM BDC_DATA   USING 'ZMATMASTER-DESCRIPTION' ITAB-DESCRIPTION.
        PERFORM BDC_DATA   USING 'ZMATMASTER-PLANT' ITAB-PLANT.
        PERFORM BDC_DATA   USING 'ZMATMASTER-SLOC' ITAB-SLOC.
        PERFORM BDC_DATA   USING 'ZMATMASTER-ROL' ITAB-ROL.
        PERFORM BDC_DATA   USING 'ZMATMASTER-UOM' ITAB-UOM.
        PERFORM BDC_DATA   USING 'ZMATMASTER-PRICE' ITAB-PRICE.
        PERFORM BDC_DATA   USING 'ZMATMASTER-DDAYS' ITAB-DDAYS.
        PERFORM BDC_DATA   USING 'ZMATMASTER-FLOT' ITAB-FLOT.
    ENDLOOP.
    CALL TRANSACTION 'ZTRANSCODES'
                     USING IT_BDC
                     MODE 'A'
                     UPDATE 'S'
                     MESSAGES INTO IT_MSG.
    FORM BDC_HEADER USING PROGRAMNAME SCREENNO.
         IT_BDC-PROGRAM = PROGRAMNAME.
         IT_BDC-DYNPRO = SCREENNO.
         IT_BDC-DYNBEGIN = 'X'.
         APPEND IT_BDC.
    ENDFORM.
    FORM BDC_DATA USING FNAME FVALUE.
         CLEAR IT_BDC.
         IT_BDC-FNAM = FNAME.
         IT_BDC-FVAL = FVALUE.
         APPEND IT_BDC.
    ENDFORM.
    In session method, log file can be viewed.
    Foll. is the example for session method.
    REPORT ZBDC_BATCH1                                                 .
    TABLES: ZEMPREC.
    DATA : BEGIN OF STR1,
           EMPNO(3),
           EMPNAME(15),
           SALARY(9),
           DOJ(10),
           END OF STR1.
    DATA: FNAME(100) TYPE C VALUE 'C:\EMPLOYEE.TXT.,
    DATA : BDCITAB LIKE TABLE OF BDCDATA WITH  HEADER LINE,
           MSGITAB LIKE TABLE OF BDCMSGCOLL WITH HEADER LINE.
    OPEN DATASET: FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    perform open_group.
    DO .
      READ DATASET FNAME INTO  STR1.
      IF SY-SUBRC <> 0 .
        EXIT.
      ENDIF.
      perform bdc_dynpro      using 'ZBDC_BATCH' '9000'.
      perform bdc_field       using 'ZEMPREC-EMPNO'
                                    STR1-EMPNO.
      perform bdc_field       using 'ZEMPREC-EMPNAME'
                                    STR1-EMPNAME.
      perform bdc_field       using 'ZEMPREC-SALARY'
                                    STR1-SALARY.
      perform bdc_field       using 'ZEMPREC-DOJ'
                                    STR1-DOJ.
    ENDDO.
    CLOSE DATASET FNAME.
    perform bdc_transaction using 'ZTCODE'.
    perform close_group.
    CLOSE DATASET FNAME1.
    CALL TRANSACTION 'SM35'.
      FORM open_group
    FORM open_group .
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          CLIENT   = SY-MANDT
          GROUP    = 'sample'
          HOLDDATE = SY-DATUM
          KEEP     = 'X'
          USER     = SY-UNAME.
    ENDFORM.                    "open_group
      FORM bdc_transaction
      -->  TCODE
    form bdc_transaction USING TCODE.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE     = 'ZTCODE'
        TABLES
          DYNPROTAB = BDCITAB.
    ENDFORM.                    "bdc_transaction
      FORM close_group
    FORM close_group.
      CALL FUNCTION 'BDC_CLOSE_GROUP'.
    ENDFORM.                    "close_group
      FORM BDC_DYNPRO
      -->  PROGRAM
      -->  SCREEN
    FORM BDC_DYNPRO USING PROGRAM SCREEN.
      CLEAR BDCITAB.
      BDCITAB-PROGRAM = PROGRAM.
      BDCITAB-DYNPRO = SCREEN.
      BDCITAB-DYNBEGIN = 'X'.
      APPEND BDCITAB.
    ENDFORM.                    "BDC_DYNPRO
      FORM BDC_FIELD
      -->  FNAM
      -->  FVAL
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCITAB.
      BDCITAB-FNAM = FNAM.
      BDCITAB-FVAL = FVAL.
      APPEND BDCITAB.
    ENDFORM.                    "BDC_FIELD
    Hope now u get an idea abt BDC.
    Regards,
    Router

  • Problem with a SIMPLE SaveDialog program.. Did I found a Java bug?

    When I run the follower program:
         /** Dialog test */
         public static void main(String args[]) {
              JFileChooser fileChooser = new JFileChooser(new File("Sem nome"));
              fileChooser.addChoosableFileFilter(new JLFileFilter());
              // mostra saveDialog
              int returnVal = fileChooser.showSaveDialog(App.getJFrame());
              // Se confirmado..
              if (returnVal == JFileChooser.APPROVE_OPTION) {
                   System.out.println("OK!");
              } else {
                   System.out.println("Canceled!");
         }it runs ok, but if I run on Eclipse's Debug Mode, I can't see the files and folders on my docs folder in the dialog... why??
    I'm running Windows XP SP3 with JDK6update4
    Edited by: wellington7 on Aug 13, 2008 11:35 AM
    Edited by: wellington7 on Aug 14, 2008 7:30 AM

    Hmmm, not really. Since a Table (ie MyTable) would be part of a larger whole (like inside a JFrame) Only the program that puts all those elements together has to be lunched on the EDT because everything inside that program would, by default, be created there as well.
    public class MyProgram {
         public MyProgram() {
              //all of these will be created on EDT because MyProgram is created there.
              JFrame f = new JFrame();
              JButton b = new JButton("hi");
              JTextField t = new JTextField();
              MyTable tbl = new MyTable();
              //place items on Frame
              f.add(t, BorderLayout.NORTH);
              f.add(b, BorderLayout.CENTER);
              f.add(tbl, BorderLayout.SOUTH);
              //show the window
              f.setVisible(true);
              f.pack();
          * @param args
         public static void main(String[] args) {
              //create MyProgram on EDT
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        new MyProgram();
    }Only the items created, explicitly, inside the main method would need to be created on the EDT.
    -D-

Maybe you are looking for