Nested parameter in class

Just one more question about nested parameters. Let's say we have
interface Tag {}
interface Foo<T extends Tag> {}Why does
Class<?> cl = (Class<?>)String.class;work but not
Class<Foo<?>> cl = (Class<Foo<?>>)Foo.class;which fails with an "inconvertible types" error?

http://blogs.sun.com/ahe/entry/why_is_the_capture_of

Similar Messages

  • Nested while defining class: com.sun.xml.ws.api.WSBinding ???

    Why is this happening, I am trying to access servlet, 2.4 on the Webshere 6.1, installation as succesfull and the servlet is running without exceptions.
      nested while defining class: com.sun.xml.ws.api.WSBinding
    This error indicates that the class: javax.xml.ws.Binding
    could not be located while defining the class: com.sun.xml.ws.api.WSBinding
    This is often caused by having the class at a higher point in the classloader hierarchy
    Dumping the current context classloader hierarchy:
        ==> indicates defining classloader
        *** indicates classloader where the missing class could have been found
    ==>[0]
    com.ibm.ws.classloader.CompoundClassLoader@51905190
       Local ClassPath: C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\classes;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\aopalliance-1.0.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\commons-logging-1.1.1.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxb-impl-2.1.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxb-xjc-2.1.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxws-rt-2.1.4.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxws-rt-2.1.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jaxws-spring-1.8.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jboss-j2ee.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\jremote.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\log4j-1.2.9.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.aop-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.asm-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.beans-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.context-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.core-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.expression-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.jms-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.transaction-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\org.springframework.web-3.0.1.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\spring-batch-infrastructure-2.1.0.RELEASE.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\stax-ex-1.2.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\streambuffer-0.7.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\TWSCore.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war\WEB-INF\lib\xbean-spring-3.4.3.jar;C:\Program Files\IBM\WebSphere\AppServer2\profiles\AppSrv01\installedApps\UKDSK-DBURFORD1Node02Cell\myappservelett2_4_again_war.ear\myappservelett2.4_again.war
       Delegation Mode: PARENT_FIRST
       [1] com.ibm.ws.classloader.JarClassLoader@777399894 Local Classpath:  Delegation mode: PARENT_FIRSTEdited by: romanshtekelman on Sep 9, 2010 7:34 AM

    For future reference...
    We followed the following instructions and created a shared lib.
    http://download.oracle.com/docs/cd/E12524_01/web.1013/e12290/opensrc.htm#BABDDAIF
    We resolved most of our class loading issues.
    BR//Bahman

  • How to give a value range in export parameter (global class)

    hi all,
    I have created a class-method called get_po_date. In this i had export parameter as qmfe-qmnum. If i give qmfe-qmnum in import parameter in class, i am able to give only one value at one time, but i need a range of values at a time. Instead of qmfe-qmnum in associated type, i have given 'LXHME_RANGE_C12' ( a range table for char 12 ). the thing is i wanted to select this range in select-options. but still iam getting <b>not type compatible syntax error</b>. can any body solve my problem,
    feel free to ask if any confusion with my question.
    Best Regards,
    abhilash.

    Hello Abhilash
    Instead of using a specific range (where field LOW and HIGH are of type QMNUM) you can use a <b>generic </b>select option (of type <b>RSDSSELOPT</b>). Have a look at the following sample report <b>ZUS_SDN_SELOPTIONS</b>.
    *& Report  ZUS_SDN_SELOPTIONS
    REPORT  zus_sdn_seloptions.
    TABLES: qmfe.
    DATA:
      gt_data          TYPE STANDARD TABLE OF qmfe,
      gt_data_x        TYPE STANDARD TABLE OF qmfe,
      gt_selopt        TYPE rseloption,  " generic table type for selopts
      gs_selopt        TYPE rsdsselopt.
    START-OF-SELECTION.
      SELECT        * FROM  qmfe INTO TABLE gt_data
             WHERE ( qmnum BETWEEN '000000000001' AND '000000000500' ).
      gs_selopt-sign   = 'I'.
      gs_selopt-option = 'BT'.
      gs_selopt-low    = '000000000001'.
      gs_selopt-high   = '000000000500'.
      APPEND gs_selopt TO gt_selopt.
      SELECT * FROM qmfe INTO TABLE gt_data_x
        WHERE ( qmnum IN gt_selopt ).
      IF ( gt_data = gt_data_x ).
        WRITE: 'Selected data are equal.'.
      ELSE.
        WRITE: 'Selected data are NOT equal.'.
      ENDIF.
    END-OF-SELECTION.
    Since RSDSSELOPT and RSELOPTION are global DDIC objects they can be used in <i>public </i>methods.
    Regards
      Uwe

  • Subclassing nested (private ns) classes at runtime

    A question for the AVM2 engineers here.
    I am the author of
    asmock, a dynamic object
    mocking framework, and am looking at a few features to add before
    1.0. One of the biggest features I'd like to support is the ability
    to mock a "nested" (private namespace) class.
    I know that subclassing a nested class outside the "code
    file" is illegal, but I have assumed that the AVM will let me do it
    as long as I setup the DoABC tag correctly.
    Based on dumps of valid SWFs that do this, there does not
    seem to be anything special about the classes. Both the child and
    the parent are declared with a private ns multiname (0x05) and the
    members are declared as public traits of the class. The ns used is
    copied directly from the parent (for nested classes), and is always
    "Filename.as$number". However, during loadBytes, I get a
    ValidateError: "Class
    MockRepositoryNestedClassIntegrationFixture.as$452::NestedClass
    could not be found".
    Is there anything I might have missed? Or, alternatively, is
    there an explicit AVM restriction that nested classes can only be
    subclassed within the SWF they were loaded from?
    Many thanks,
    Richard

    "richard.szalay" <[email protected]> wrote
    in message
    news:gm3rfo$f0h$[email protected]..
    >A question for the AVM2 engineers here.
    >
    > I am the author of
    http://asmock.sourceforge.net/,
    a dynamic object
    > mocking
    > framework, and am looking at a few features to add
    before 1.0. One of the
    > biggest features I'd like to support is the ability to
    mock a "nested"
    > (private
    > namespace) class.
    >
    > I know that subclassing a nested class outside the "code
    file" is illegal,
    > but
    > I have assumed that the AVM will let me do it as long as
    I setup the DoABC
    > tag
    > correctly.
    >
    > Based on dumps of valid SWFs that do this, there does
    not seem to be
    > anything
    > special about the classes. Both the child and the parent
    are declared with
    > a
    > private ns multiname (0x05) and the members are declared
    as public traits
    > of
    > the class. The ns used is copied directly from the
    parent (for nested
    > classes),
    > and is always "Filename.as$number". However, during
    loadBytes, I get a
    > ValidateError: "Class
    >
    MockRepositoryNestedClassIntegrationFixture.as$452::NestedClass
    could not
    > be
    > found".
    >
    > Is there anything I might have missed? Or,
    alternatively, is there an
    > explicit
    > AVM restriction that nested classes can only be
    subclassed within the SWF
    > they
    > were loaded from?
    I think you're more likely to find someone who knows the
    framework and the
    player in this kind of detail on the flexcoders yahoo group.

  • Release memory for nested top-level classes

    Hello experts.
    I have a top-level class which consists of several static methods. Inside such a method I create several new instances of a nested top-level class inside my original class. Later I want to release one of these instances i.e. destroy instance and free memory. How can I do that?
    Thanks.

    sure, but I do not see any references to this nested top-level class. With "Releasing" I mean something like directly assigning a NULL value to the nested top-level clas in order to enable GC.
    But as I said there are no references and while monitoring the memory I see that the GC does not collect some memory. (I know that GC is not reliable, but after ten attempts of this scenario the memory allocation is equal the whole time).
    I guess the GC does not work with classes, but the classloader. But how can I control releasing memory in this scenario?
    Any further hints?

  • Missing Parameter in class method

    Hi,
    This is with regard to the Survey transaction. For survey, I did some modifications and I did the modifications based on a parameter in class method CL_UWS_PUBLISHING=>PUBLISH. It was working fine in our development server. But when I ported it to the Quality system, an erro appears telling that the parameter ID_SURVEY_ID is not available in the system.
    As part of the implementation, our team has applied several notes to the application. Is it that, this parameter came as part of some note? If so, how can I find the relevant note. I searched for notes regarding survey but didn't find this one.
    Please do help me in this regard.
    Regards,
    Jubish

    Hi All,
    Please do help in this regard.
    Regards,
    Jubish

  • Invalid Addresses; nested exception is: class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for

    Hi!
    I am with a problem during a sending e-mail for 3500
    addressees.
    In the way it process me of the one error and in log CF
    Administrator shows the following error to it:
    Invalid Addresses; nested exception is: class
    javax.mail.SendFailedException: 550 5.7.1 Unable to relay for
    What it could be?
    Server Configuration:
    Windows 2003 Standard with ColdFusion MX 7.02 (last update)
    Best Regards

    You need to either authenticate your user or turn on relaying in your SMTP server. See the JavaMail tutorial for how to authenticate

  • Error while passing  parameter fot class method

    Hi abapers,
    i am trying to do alv grdi dispaly using class cl_gui_alv_grid. i am getting error "ITAB1" is not type-compatible with formal parameter 'IT_OUTTAB'.
    i attached code here.
    Internal Tables
    types: begin of itab,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of itab.
    data: itab1 like itab.
    DATA: alvgrid type ref to cl_gui_alv_grid.
    CALL METHOD ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
        I_STRUCTURE_NAME              = 'ITAB'
       IS_VARIANT                    =
       I_SAVE                        =
       I_DEFAULT                     = 'X'
       IS_LAYOUT                     =
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
      CHANGING
        IT_OUTTAB                     = itab1.
       IT_FIELDCATALOG               =
       IT_SORT                       =
       IT_FILTER                     =
    EXCEPTIONS
       INVALID_PARAMETER_COMBINATION = 1
       PROGRAM_ERROR                 = 2
       TOO_MANY_LINES                = 3
       others                        = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    please help me.

    Try this -
    CALL METHOD ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME = 'ITAB'
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    IT_OUTTAB = <b>itab1[].</b>
    IT_FIELDCATALOG =
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    others = 4
    Cheers

  • Field symbol as import parameter in class method ???

    Hi everyone,
    is it possible to pass a field symbol as an import parameter to a method in a class? If yes, how do I define the data type of the import parameter? I'm trying to work with field symbols as the program doesn't know what kind of structure the program parameter p_srcdso has. Coding example would be something like this:
    PARAMETERS: p_srcdso TYPE rsdodsobject DEFAULT '/BIC/AKVI0001'.
    DATA: lr_srcpkg TYPE REF TO data.
    FIELD-SYMBOLS: <fs_table> TYPE ANY TABLE.
    CREATE DATA lr_srcpkg TYPE TABLE OF (p_srcdso).
    ASSIGN lr_srcpkg->* TO <fs_table>.
    SELECT *
    FROM (p_srcdso)
    INTO TABLE <fs_table>.
    CALL METHOD cl_ref->create_somethign
    EXPORTING
        i_source_package = <fs_table>.
    Thanks,
    Alex

    Halo Alexander,
    You can use TYPE REF TO DATA( say the parameter name is i_data) as the importing parameter of the method create_somethign and inside the method you need to dereference it using data reference variable again.
    data: dref type ref to data.
    field-symbols: <fs_table> type table.
    create data dref like i_data.
    assign dref->* to <fs_table>.
    Regards
    Arshad

  • Building Tree hierarchy Using nested loops and class cl_gui_column_tree

    Hello gurus,
    I want to create a tree report using custom container and class cl_gui_column_tree. I have read and understood the standard demo report which SAP has provided i.e. SAPCOLUMN_TREE_CONTROL_DEMO. But in this report all the levels nodes are created as constants and hardcoded. I want to create hierarchy using nested loops. For this i took one example of a hierarchy of VBAK-VBELN->VBAP-POSNR Like One sales order has many line items and each line item can have number of line items in billing plan.
    I have done some coding for it.
    FORM build_tree USING node_table TYPE treev_ntab
                                           item_table TYPE zitem_table.              " i created the zitem_table table type of mtreeitm in SE11.
      DATA: node TYPE treev_node,
                 item TYPE mtreeitm.
      node-node_key = root.
      CLEAR node-relatkey.
      CLEAR node-relatship.
      node-hidden = ' '.
      node-disabled = ' '.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-isfolder = 'X'.
      node-expander = 'X'.
      APPEND node TO node_table.
      item-node_key = root.
      item-item_name = colm1.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Root'.
      APPEND item TO item_table.
      item-node_key = root.
      item-item_name = colm2.
      item-class = cl_gui_column_tree=>item_class_text.
      item-text = 'Amount'.
      APPEND item TO item_table.
      LOOP AT it_vbeln INTO wa_vbeln.
        node-node_key = wa_vbeln-vbeln.
        node-relatkey = root.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = 'X'.
        node-expander = 'X'.
        APPEND node TO node_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-vbeln.
        APPEND item TO item_table.
        item-node_key = wa_vbeln-vbeln.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_vbeln-netwr.
        APPEND item TO item_table.
        LOOP AT it_posnr INTO wa_posnr.
        node-node_key = wa_posnr-posnr.
        node-relatkey = wa_vbeln-vbeln.
        node-relatship = cl_gui_column_tree=>relat_last_child.
        node-hidden = ' '.
        node-disabled = ' '.
        CLEAR node-n_image.
        CLEAR node-exp_image.
        node-isfolder = ' '.
        node-expander = ' '.
        APPEND node TO node_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-posnr.
        APPEND item TO item_table.
        item-node_key = wa_posnr-posnr.
        item-item_name = colm2.
        item-class = cl_gui_column_tree=>item_class_text.
        item-text = wa_posnr-netpr.
        APPEND item TO item_table.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.
    Now this program compiles fine and runs till there is only one level. That is root->vbeln. But when i add one more loop of it_posnr it gives me runtime error of message type 'X'. The problem i found was uniqueness of item-item_name as all the sales order have posnr = 0010. What could be done? I tried giving item_name unique hierarchy level using counters just like stufe field in prps eg. 10.10.10, 10.10.20,10.20.10,10.20.20,20.10.10 etc.. etc.. but still i am getting runtime error when i add one more hierarchy using nested loop. Plz guide.
    Edited by: Yayati6260 on Jul 14, 2011 7:25 AM

    Hello all,
    Thanks the issue is solved. The node key was not getting a unique identification as nodekey. I resolved the issue by generating unique identification for each level. Thanks all,
    Regards
    Yayati Ekbote

  • Nested and inner classes

    What's the difference between them? As far as i can tell, a nested class is usually public and a inner class is almost always private. Can some one please provide an example?
    Thanks a lot guys.

    inner classes == nested classes - static classes
    In other words, inner class should belongs to the instance of the enclosing class.

  • Type for SENDER parameter in Class Method

    Hi all,
    I have an import parameter declared in a Class method .
    in SE38 program i want to retrieve through export parameter .
    But i am not able to figure how to defind the type of SENDER parameter . Please suggest if my perception is wrong or the point that i am missing here .
    Regards,
    Ry.

    Hi Vijay,
    Thank you for your reply . the problem i am having is the functionlaity of this report is it displays three grids and when ever i double click on a grid it should identify the particluar grid . i have highlighted in bold where i am encountering the problem. i am enclosing the class details and the report source code. Please suggest after going through it . thanks in advance.
    Class details that i have created :
    the class has a method handle_double_event with event handler double_click of CL_GUI_ALV_GRID . i have defined this in the method section.
    in public section section :
    public section.
      types GO_GRID1 type ref to CL_GUI_ALV_GRID .
      class-methods HANDLE_DOUBLE_CLICK
        for event DOUBLE_CLICK of CL_GUI_ALV_GRID
        importing
          ES_ROW_NO
          E_COLUMN
          E_ROW
          SENDER .
    in handle_double_event code :
    DATA:
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      go_grid3         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_vbak          TYPE STANDARD TABLE OF vbak,
      gt_vbap          TYPE STANDARD TABLE OF vbap.
      define local data
        DATA:
          ls_knb1      TYPE knb1,
          ls_vbak      TYPE vbak,
          ls_vbap      TYPE vbap.
       DATA: es_row_no type lvc_s_roid,
             e_column  type lvc_s_col,
             e_row     type lvc_s_row.
        *CASE sender. - here when i double click on the first grid go_grid1 it should go inside the go_grid1 . but it is not entering .*
          WHEN go_grid1.
            READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
            CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
            CALL METHOD go_grid1->set_current_cell_via_id
              EXPORTING
                 IS_ROW_ID    =
                 IS_COLUMN_ID =
                is_row_no    = es_row_no.
            Triggers PAI of the dynpro with the specified ok-code
            CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDERS' ).
          WHEN go_grid2.
            READ TABLE gt_vbak INTO ls_vbak INDEX e_row-index.
            CHECK ( ls_vbak-vbeln IS NOT INITIAL ).
            CALL METHOD go_grid1->set_current_cell_via_id
              EXPORTING
                 IS_ROW_ID    =
                 IS_COLUMN_ID =
                is_row_no    = es_row_no.
            Triggers PAI of the dynpro with the specified ok-code
            CALL METHOD cl_gui_cfw=>set_new_ok_code( 'ORDER_DET' ).
          WHEN go_grid3.
            READ TABLE gt_vbap INTO ls_vbap INDEX e_row-index.
            CHECK ( ls_vbap-matnr IS NOT INITIAL ).
            SET PARAMETER ID 'MAT' FIELD ls_vbap-matnr.
            CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
            RETURN.
        ENDCASE.
    endmethod.
    Code for the Report that is accessing the class.
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_splitter_2    TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_cell_left     TYPE REF TO cl_gui_container,
      go_cell_right    TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      go_grid3         TYPE REF TO cl_gui_alv_grid,
      list             type ref to zcl_eventhandler,
      es_row_no        type lvc_s_roid,
      e_column         type lvc_s_col,
      e_row            type lvc_s_row,
      sender(8)        type c.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_vbak          TYPE STANDARD TABLE OF vbak,
      gt_vbap          TYPE STANDARD TABLE OF vbap.
    PARAMETERS  :  p_bukrs TYPE ekko-bukrs default '1000'.
    START-OF-SELECTION.
      create object list.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 50
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 1
          columns           = 1
         NO_AUTODEF_PROGID_DYNNR =
         NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
         container = go_cell_left.
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 2
        RECEIVING
          container = go_cell_right.
    Create 2nd splitter container
      CREATE OBJECT go_splitter_2
        EXPORTING
         parent            = go_cell_left
          parent            = go_cell_top
          rows              = 2
          columns           = 1
         NO_AUTODEF_PROGID_DYNNR =
         NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Get cell container
      CALL METHOD go_splitter_2->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter_2->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CREATE OBJECT go_grid3
        EXPORTING
          i_parent          = go_cell_right
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
          CALL METHOD ZCL_EVENTHANDLER=>HANDLE_DOUBLE_CLICK
            EXPORTING
              ES_ROW_NO = ES_ROW_NO
              E_COLUMN  = E_COLUMN
              E_ROW     = E_ROW
              SENDER.
    Set event handler
      SET HANDLER: list->handle_double_click FOR go_grid1.
      SET HANDLER: list->handle_double_click FOR go_grid2.
      SET HANDLER: list->handle_double_click FOR go_grid3.
    Display data
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
        CHANGING
          it_outtab        = gt_knb1
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      REFRESH: gt_vbak.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAK'
        CHANGING
          it_outtab        = gt_vbak
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      REFRESH: gt_vbap.
      CALL METHOD go_grid3->set_table_for_first_display
        EXPORTING
          i_structure_name = 'VBAP'
        CHANGING
          it_outtab        = gt_vbap
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
         CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    Flow logic of dynpro:
    *PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Form  CUSTOMER_SHOW_ORDERS
          text
    -->  p1        text
    <--  p2        text
    FORM customer_show_orders .
    define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  vbak INTO TABLE gt_vbak
             WHERE  kunnr  = ls_knb1-kunnr.
      REFRESH: gt_vbap.
    ENDFORM.                    " CUSTOMER_SHOW_ORDERS
    *&      Form  ORDER_SHOW_DETAILS
          text
    -->  p1        text
    <--  p2        text
    FORM order_show_details .
    define local data
      DATA:
        ld_row      TYPE i,
        ls_vbak     TYPE vbak.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_vbak INTO ls_vbak INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  vbap INTO TABLE gt_vbap
             WHERE  vbeln  = ls_vbak-vbeln.
    ENDFORM.                    " ORDER_SHOW_DETAILS
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'STATUS_0100'.  " contains push button "ORDERS"
    SET TITLEBAR 'xxx'.
    Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
       EXPORTING
         IS_STABLE      =
         I_SOFT_REFRESH =
        EXCEPTIONS
          OTHERS         = 2.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Refresh display of detail ALV list
      CALL METHOD go_grid3->refresh_table_display
       EXPORTING
         IS_STABLE      =
         I_SOFT_REFRESH =
        EXCEPTIONS
          OTHERS         = 2.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    move sy-ucomm to gd_okcode.
    CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
      User has pushed button "Display Orders"
        WHEN 'ORDERS'.
          PERFORM customer_show_orders.
        WHEN 'ORDERS_DET'.
          PERFORM order_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    endmodule.
    Regards,
    Ry

  • How to invoke a 6 parameter java class within jsp

    i have just begun to learned jsp and java recently, so have the question below:
    Situation:
    My boss asked me to do a project for doing online data mining.
    He requested the thing below:
    1. Write a webpage by jsp with some textfield or pull down meun to get the parameter for getting the opinion and the parameter needed for the java class.
    2. When the user click the buttom in the website, then the java class have to be invoked.
    Questions:
    1. ask i put the .java in the server, i can simply use cmd and type the following command:
    java -Xmx800M P05context 1 1 3 6 F01xyz.txt F10xyz.txt
    which F01xyz is the prepared text file for the java class to read and the F10xyz.txt is the output file generated by the P05context.class
    but i don't know how to invoke the P05context.class by jsp
    My boss have suggested me two ways to do this:
    a. write a java virtual class to execute the java program.
    but i don't know how to write.
    i think conceptualy will be like this :
    public class run_java
    public void run java(parameter1,parameter2....,parameter6)
    //run the cmd command
    //java -Xmx800M P05context 1 1 3 6 F01xyz.txt F10xyz.txt
    b. write a javabean in the jsp. and i have try to use this code(at the end of the message:
    but the tomcat server reply a internal error to me
    how cani do ?
    the jsp file-->
    <jsp:useBean id="test" scope="session" class ="P05context" />
    <html>
    <head></head>
    <body>
    <% test.P05context(1,1,3,6,F01xyz.txt,F10xyz.txt); %>
    </body>
    </html>

    I still don't see why the form (the origin of the request) has to be a JSP, As you say, it might be static but forms I've written have usually had some kind of menu framework arround them and other variables. Also if the input is invalid you usually want to re-present the form, with an error message and the fields pre-populated according to what the user put in before. That does require a JSP and you may as well use the same JSP for an empty, as for a rejected request.
    the response to the form should be handled by a servlet. Both is HTML, but the
    form is static, and the reply dynamic. Using the combination; a servlet to do the data processing and a JSP to format the results is more flexible in a number of ways. For example, suppose you find the need to present the data form in, say, Greek? You don't want the processing to be duplicated in English and Greek versions of the results JSP.
    Suppose the boss wants to turn a graphics designer loose on your HTML. Don't want him mucking about with your processing code do you.
    The servlet typically takes the function of controller in the model/view/controller paradigm.
    Code in a servlet is cleaner, better formatted and easier to access with a debugger.

  • Parameter Definition Class (Properties Window)

    I need a class that replicates the Properties Window seen in many IDE's. Does anyone know of the existence of such a class available for download somewhere?

    Hi,
    does it happen for all tables or it's related to specific set of tables (or just one table)?
    PS. Did some more research: The error message from the logfile seems to be unrelated to the recalcitrant properties window. Yes, those errors are not related to problem.
    properties dialog won't appear if there are some errors during initialization of dialog and its related to table that cause the problem. You should be able to open dialog for another table.
    It'll be great if you can find out after what changes dialog for some tables doesn't appear.
    Thanks,
    Philip

  • Nested synchronized method class

    Hi. I have a situation where there are two synchronized methods: Method A and Method B. In the course of execution, Method A calls Method B. Method B calls wait(). This causes a classical deadlock as wait() releases the monitor for Method B, but no for Method A. What are my options to work around this problem?
    Thanks in Advance,
    Paul0al

    A and B cannot synchronize on the same object because if A acquires the monitor, then B cannot obtain the same monitor without A releasing the monitor. My problem is that A and B are synchronized on different objects. A calls B and B calls wait(). A deadlock occurs because A's monitor is not released.
    Thanks,
    Paul0al

Maybe you are looking for