HOw to make an Object oriented alv respond to double click

Hi all,
HOw to make an Object oriented alv respond to double click.SAmple code will be helpful.
Thanks in advance,
Alex.

Hi,
1. Create a Control (for Custom and Split Containers only)
2. Instantiate a Container Object (in case of Custom and Split Containers, specify the control which is created by us in Screen painter) CREATE OBJECT
3. Instantiate an Object of the kind of report that has to be displayed (List, Grid or Tree). CREATE OBJECT . Here we need to specify the Parent Container as the so that it sits in that container.
4. Call appropriate methods to display the report on the screen. CALL METHOD ->
DATA : g_dock TYPE REF TO cl_gui_docking_container,
g_split TYPE REF TO cl_gui_easy_splitter_container,
g_cont1 TYPE REF TO cl_gui_container,
g_cont2 TYPE REF TO cl_gui_container,
g_grid1 TYPE REF TO cl_gui_alv_grid,
g_grid2 TYPE REF TO cl_gui_alv_grid.
i_mara is an internal table of structure MARA
SELECT * FROM mara INTO TABLE i_mara.
i_kna1 is an internal table of structure KNA1
SELECT * FROM kna1 INTO TABLE i_kna1.
To create an Object of type Docking Container
CREATE OBJECT g_dock
EXPORTING
side = cl_gui_docking_container=>dock_at_top
extension = 200 .
To Create an Object of Type Split Container. Here we can see that the Docking *Container Created above has been used as a parent .
CREATE OBJECT g_split
EXPORTING
parent = g_dock
orientation = 1 .
Easy Split container splits one Control into 2 manageable controls, each of them is used * to handle one GUI Container each
g_cont1 = g_split->top_left_container.
g_cont2 = g_split->bottom_right_container.
To Create an Object of type Grid . Here we can see that the Left Split Container * Created above has been used as a parent .
CREATE OBJECT g_grid1
EXPORTING
i_parent = g_cont1 .
To Create an Object of type Grid . Here we can see that the Right Split Container * Created above has been used as a parent .
CREATE OBJECT g_grid2
EXPORTING
i_parent = g_cont2 .
The method of Grid Control Object is used to display the Data.
CALL METHOD g_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'MARA'
CHANGING
it_outtab = i_mara[] .
The method of Grid Control Object is used to display the Data.
CALL METHOD g_grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'KNA1'
CHANGING
it_outtab = i_kna1[] .
Regards
Hari

Similar Messages

  • How can i show details in ALV GRID with double click in a row?

    Hello, ich try to show the details of a row with double click in the line,
    but it doesn't work!?
    I have a eventhandler for doubleclick and the program run this code, but what i have to do, to show the details!?
    I try it with some methods like cl_gui_cfw=>set_new_ok_code, ...
    i think about the methods cl_gui_alv_grid->show_detail, but this method is private,
    i can create a class with inheritance of the cl_gui_alv_grid class and try this method!?
    Have anybody any ideas!?

    Hello Lars
    The following sample reports shows an ALV list with company codes. Double-clicking on any company code will open a second ALV list displaying all customers.
    *& Report  ZUS_SDN_ALVGRID_EVENTS_1
    REPORT  zus_sdn_alvgrid_events_1.
    DATA:
      gd_okcode        TYPE ui_func,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_docking2      TYPE REF TO cl_gui_docking_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_t001          TYPE STANDARD TABLE OF t001,
      gt_knb1          TYPE STANDARD TABLE OF knb1.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_t001     TYPE t001,
          ls_col_id   TYPE lvc_s_col.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_t001 INTO ls_t001 INDEX e_row-index.
        CHECK ( ls_t001-bukrs IS NOT INITIAL ).
        SELECT * FROM knb1 INTO TABLE gt_knb1
          WHERE bukrs = ls_t001-bukrs.
        IF ( syst-subrc NE 0 ).
          MESSAGE 'No customers found' TYPE 'S'.
        ELSE.
    *     Trigger PAI of dynpro '0100' and set new ok-code
          CALL METHOD cl_gui_cfw=>set_new_ok_code( 'CALL_SCREEN_0200' ).
        ENDIF.
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT * FROM t001 INTO TABLE gt_t001.
      REFRESH: gt_knb1.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        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 OBJECT go_docking2
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        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 ALV grid
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_docking
        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_docking2
        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.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_double_click FOR go_grid1.
    * Display data
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'T001'
        CHANGING
          it_outtab        = gt_t001
        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.
      CALL METHOD go_grid2->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.
    * 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.
      CALL METHOD go_docking2->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0200'
    *      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.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'CALL_SCREEN_0200'.
          go_grid2->refresh_table_display( ).  " necessary
          CALL SCREEN '0200'.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Regards
      Uwe

  • How to capture index/row no of row in table using object oriented alv.

    i have a table with many fields. i have an alv grid table displayed using object oriented alv. when i double click on a record, i call another screen. there i want to display the record number. eg, if i doubleclick on the third row, i will go to next screen and display 3 there.
    please let me know how it is done as it is urgent.
    thanks in advance.

    Hi,
    Use the following code to get rowno.
    CLASS lcl_grid_events DEFINITION DEFERRED.
    DATA:
      grid1_events      TYPE REF TO lcl_grid_events.
    CLASS lcl_grid_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          dbclk
           FOR EVENT double_click  OF cl_gui_alv_grid
           IMPORTING e_row
                     e_column
                     es_row_no.
    ENDCLASS.                    "lcl_grid_events DEFINITION
    CLASS lcl_grid_events IMPLEMENTATION.
      METHOD dbclk.
    *access e_row variable, which contains the record no.
      ENDMETHOD.                    "dbclk
    ENDCLASS.                    "lcl_grid
    write the following code after method call of set_table_for_first_display
        CREATE OBJECT grid1_events.
        SET HANDLER grid1_events->dbclk
                    FOR grid1.
    reward point if useful.

  • How to display horizontal line in top-of-page by using object oriented ALV?

    How to display horizontal line in top-of-page by using object oriented ALV.
    I am created top-of-page in object oriented alv.
    But not be successes in showing horizontal line in it.
    Can any one pls give solution for this..
    Thanks and regards..

    Hi
    Try like this
    data: gt_list_top_of_page type slis_t_listheader. " Top of page text. 
    Initialization. 
    perform comment_build using gt_list_top_of_page[]. 
    form top_of_page. 
    * Note to self: the gif must be loaded into transaction OAOR with 
    * classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions. 
    * I Loaded NOVALOGO2 into system. 
    call function 'REUSE_ALV_COMMENTARY_WRITE' 
         exporting 
    * I_LOGO = 'NOVALOGO2' 
    * i_logo = 'ENJOYSAP_LOGO' 
             it_list_commentary = gt_list_top_of_page. 
    endform. " TOP_OF_PAGE 
    form comment_build using e04_lt_top_of_page type slis_t_listheader. 
    data: ls_line type slis_listheader. 
          clear ls_line. 
          ls_line-typ = 'A'. 
          ls_line-info = 'Special'(001). 
          fgrant = xgrant. 
          concatenate ls_line-info fgrant 
          'Stock Option Report to the board'(002) 
                 into ls_line-info separated by space. 
                        condense ls_line-info. 
          append ls_line to e04_lt_top_of_page. 
    endform. " COMMENT_BUILD
    Use following syntex for footer print in alv:
    * For End of Page
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *  For End of Report
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    check this link
    http://abapprogramming.blogspot.com/
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
    Changing width of a custom container dynamically
    Display Page numbers in ALV
    Insert picture in selection screen.
    Logo in OO ALV Grid
    Reward all helpfull answers
    Regards
    Pavan

  • Object Oriented ALV

    Hi All,
    I want to know the advantages of using OOPS ALV over the normal ALV function modules and how should we decide whether we need to use Object oriented ALV or normal ALV.
    Regards,
    S.Subasree

    HI
    please check out the following  links
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIGOF/BCCIGOF.pdf
    hope this helps
    regards
    Aakash Banga

  • Save layout Button in Object Oriented ALV

    Hi  gurus,
    I am working on Object Oriented ALV. I am facing one problem when the outpput get shown on the screen the save layout and select layout buttons are not appearing on the application toolbar of alv.
    TRY .
          cl_salv_table=>factory( IMPORTING r_salv_table = g_alv_out
                                   CHANGING t_table      = i_alv ).
        Set status GUI
          g_alv_out->set_screen_status(
              pfstatus      = 'STANDARD'
              report        = sy-repid
              set_functions = g_alv_out->C_FUNCTIONS_ALL ).
           g_columns = g_alv_out->get_columns( ).
        Set new description texts for columns
          PERFORM f_set_column_name USING:
                'LTEXT' text-001 text-001 text-001 space,
                'NAME1' text-002 text-002 text-002 space,
                'TXZ01' text-003 text-007 text-007 space,
                'KWERT' text-004 text-004 text-004 space,
                'WEMNG' text-005 text-010 text-011 space,
                'BALNC' text-012 text-013 text-014 space,
                'AFNAM' text-006 text-008 text-009 space.
          PERFORM f_set_column_name USING 'WEMNG'
                  space space space 'WAERS'.
          PERFORM f_set_column_name USING 'KWERT'
                  space space space 'WAERS'.
        Set column as hotspot
          g_column ?= g_columns->get_column( 'EBELN' ).
          g_column->set_cell_type( g_column->hotspot ).
          g_events = g_alv_out->get_event( ).
          CREATE OBJECT gr_events .
          SET HANDLER gr_events->on_double_click FOR g_events.
        Display report
          g_alv_out->display( ).
        CATCH cx_salv_msg.
      ENDTRY.
    where in the Status  STANDARD I have entered all the buttons includeing these two buttons
    Can you please Help me in solving this issue.
    thanks,
    Vinod.
    Edited by: vinod parhad on Jul 2, 2010 1:35 PM

    data: gr_layout  type ref to cl_salv_layout,
    gr_alv     type ref to cl_salv_table,
    gs_key     type salv_s_layout_key,
    * in your SALV routine.... after FACTORY call
    gs_key-report = sy-repid.
    * User can save layout.
      gr_layout  = gr_alv->get_layout( ). "layouts
      gr_layout->set_key( gs_key ).  "Pass Program Name
      gr_layout->set_save_restriction( cl_salv_layout=>restrict_none ). "User can save
    See also Rich Heilman's excellent tutorials on SALV by searching for SALV Tutorial,
    See also programs named: SALV* for demonstrations of SALV outputs and how to code.
    Edited by: BreakPoint on Jul 2, 2010 1:46 PM add references for tutorials

  • How to make any object self-shining?

    hi,
    i guess thats an easy question, but i dont know where to look for the answer.
    so how to make any object self-shining like the infamous colorcube, so that one does not need to place any light?
    and am I right in my assumption that doing so will reduce the need of rendering power, since lights dont have to be computed?
    thanx,
    Usul

    I'm not sure what you mean here- if your object is lit then lighting will need to be calculated. If you don't want shapes to be lit, I think you can disable it by calling setLightingEnable(false) in their materials.

  • How to make an object mutable?

    Can any one tell me how to make an object mutable?
    Following is Class X & Y?
    class Y
    public static void main(String arg[]) {
    X a1=new X();
    Object a=a1.get();
    System.out.println(a.toString());
    a1.set(a);
    System.out.println(a.toString());
    class X implements Serializable
    public Object get(){
    return new Object();
    public synchronized void set(Object o)
    o=null;
    In my class Y when i say
    a1.set(a);
    I want local Object a of main method should be nullified.
    Can it be possible if yes what is the way or code to be applied so that
    my next a.toString() statement will give me NullpointerException.

    Isn't it more accurate to say that object references are passed by value?
    OP -- Basically you can't to what you want to do. When you "pass an object" as a method parameter, what you're really passing is a copy of the reference that points to the object. You now have two refs pointing to the same object--one in the caller and one in the method being executed. Setting either of those refs to null does NOT affect the object itself, and does NOT affect the other ref. It just means that the ref that's been set to null no longer points to any object.
    If you want the called method to make a change that the caller can see, you need to either 1) return a value from the method, 2) encapsulate the object to be changed as a member of new class, or 3) pass the object to be changed as the single element of an array. I would STRONGLY recommend against (3) as a way to simulate pass by reference. Better to examine your design and determine whether (1) or (2) more closely matches what you're really trying to accomplish.

  • How to make an object distributed across multiple jres?

    Hi,
    We used cache data mechanism for performance tuning. It will store data in static variable (Hashtable) and get initialized when app starts . We are using IPlanet Application Server and
    Using 6 KJS engines. This object ( Hashtable) is not distributed across all JRES.It has to reinitialize data again when request goes to any other KJS.
    We avoid sharing data in session and request, as data is huge.
    Can any one help us how to make this object distributed across all KJSs?
    Thanks in advance.
    raj

    We used cache data mechanism for performance tuning.
    It will store data in static variable (Hashtable) and
    get initialized when app starts.
    We are using IPlanet Application Server and
    Using 6 KJS engines. This object ( Hashtable) is not
    distributed across all JRES. It has to reinitialize
    data again when request goes to any other KJS.
    We avoid sharing data in session and request, as data
    is huge.
    Can any one help us how to make this object
    distributed across all KJSs?When you say 'initialized when app starts' do you mean iPlanets StartUp classes, rather than the Servlets init() ? Given a 'huge' dataset, avoid the latter.
    I'd suggest that a better approach is to implement this as an Entity Bean and accessed from Session bean and using Value Objects to return the data subsets.
    Checkout the Java Pet Store
    http://java.sun.com/blueprints/code/jps13/datasheet.html

  • Interactive object oriented alv

    hi friends,
         i want interactive object oriented alv report. i want some example program for that.

    try like this
    *& Report  ZALV_OOP
    REPORT  zalv_oop.
          CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION .
        METHODS:
    *--Double-click control
        handle_double_click
        FOR EVENT double_click OF cl_gui_alv_grid
        IMPORTING e_row e_column es_row_no.
      PRIVATE SECTION.
    ENDCLASS.                    "lcl_event_handler DEFINITION
          CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION .
    *--Handle Double Click
      METHOD handle_double_click .
        PERFORM handle_double_click USING e_row e_column es_row_no .
      ENDMETHOD .                    "handle_double_click
    ENDCLASS .                    "lcl_event_handler IMPLEMENTATION
    TABLES : mseg.
    DATA : BEGIN OF itab OCCURS 0,
            mblnr LIKE mseg-mblnr,
            matnr LIKE mseg-matnr,
            menge LIKE mseg-menge,
           END OF itab.
    DATA : gr_alvgrid TYPE REF TO cl_gui_alv_grid,
           gr_ccontainer TYPE REF TO cl_gui_custom_container,
           gt_fcat TYPE lvc_t_fcat,
           gs_layo TYPE lvc_s_layo.
    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    DATA : ok_code LIKE sy-ucomm.
    DATA : t_mat LIKE mara-matnr.
    DATA: variant TYPE disvariant.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_mblnr FOR mseg-mblnr.
    SELECTION-SCREEN : END OF BLOCK blk1.
    START-OF-SELECTION.
      SET SCREEN 100.
      CREATE OBJECT gr_event_handler .
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  get_data
          text
    FORM get_data.
      SELECT mblnr matnr menge FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab
       WHERE mblnr IN s_mblnr.
      variant-report = sy-repid.
      variant-username = sy-uname.
    ENDFORM.                    "get_data
    *&      Form  dis_data
          text
    FORM dis_data.
      IF gr_alvgrid IS INITIAL.
        CREATE OBJECT gr_ccontainer
          EXPORTING
            container_name              = 'CC_ALV'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            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 OBJECT gr_alvgrid
          EXPORTING
            i_parent          = gr_ccontainer
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            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.
        PERFORM create_fcat CHANGING gt_fcat.
        PERFORM create_layout CHANGING gs_layo.
        CALL METHOD gr_alvgrid->set_table_for_first_display
          EXPORTING
            is_variant                    = variant
            i_save                        = 'A'
            is_layout                     = gs_layo
          CHANGING
            it_outtab                     = itab[]
            it_fieldcatalog               = gt_fcat
        IF sy-subrc  0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
      ENDIF.
    ENDFORM.                    "dis_data
    *&      Form  create_fcat
          text
         <--P_GT_FCAT  text
    FORM create_fcat  CHANGING pt_fcat TYPE lvc_t_fcat.
      DATA : ls_fcat TYPE lvc_s_fcat.
      ls_fcat-fieldname = 'MBLNR'.
      ls_fcat-coltext = 'Material Doc.'.
      APPEND ls_fcat TO pt_fcat.
      ls_fcat-fieldname = 'MATNR'.
      ls_fcat-coltext = 'Material'.
      APPEND ls_fcat TO pt_fcat.
      ls_fcat-fieldname = 'MENGE'.
      ls_fcat-coltext = 'Quantity'.
      APPEND ls_fcat TO pt_fcat.
    ENDFORM.                    " create_fcat
    *&      Form  create_layout
          text
         <--P_GS_LAYO  text
    FORM create_layout  CHANGING ps_layo TYPE lvc_s_layo.
      ps_layo-zebra = 'X'.
    ENDFORM.                    " create_layout
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZALV_OOP'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANC'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  handle_double_click
          text
         -->I_ROW      text
         -->I_COLUMN   text
         -->IS_ROW_NO  text
    FORM handle_double_click USING i_row TYPE lvc_s_row
                                   i_column TYPE lvc_s_col
                                   is_row_no TYPE lvc_s_roid.
      READ TABLE itab INDEX is_row_no-row_id .
      IF sy-subrc = 0 .
        IF i_column = 'MATNR'.
          t_mat = itab-matnr.
          SET PARAMETER ID 'MAT' FIELD t_mat.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
          SET PARAMETER ID 'MAT' FIELD space.
        ELSEIF i_column = 'MBLNR'.
          CALL TRANSACTION 'MIGO'.
        ENDIF .
      ENDIF.
    ENDFORM .                    "handle_double_click
    here in screen 100 i have taken one custom control with name cc_alv

  • How to make an interactive block ALV

    Hi,
       I am new to the field of ABAP and have recently started working on ALV's. My problem is that i do not know how to make an interactive block ALV. I have implemented this functionality with the simple ALV but I am not getting the same for block ALV. Anyone who has worked on the same or has any idea please help me.
    Regards.
    Alok Bhardwaj

    Hi jester526,
    You'll need Acrobat to create links in a PDF file. Please see https://acrobatusers.com/tutorials/creating-and-editing-links for instructions.
    Best,
    Sara

  • Field symbols in Object Oriented ALV

    Hi Friends....Can somebody explain me what is the significance of field symbols in OO ALV. Why it is assigned to Field catalog. Also explain me the basic steps to do Object Oriented ALV. Thanks in advance...

    Hi Satyesh,
    Field symbols are symbolic names to which a memory area can be assigned during program runtime. A field symbol can be used instead of data objects at operand positions of statements.
    Please go through this following code.  This uses field symbols for OO ALV.
      LCL_TABLE_DISPLAY DEFINITION
    CLASS lcl_table_display DEFINITION.
      PUBLIC SECTION.
        TYPE-POOLS: abap, slis.
        CLASS-METHODS: display_list IMPORTING in_data TYPE STANDARD TABLE,
                       display_grid IMPORTING in_data TYPE STANDARD TABLE.
        METHODS: constructor IMPORTING in_data TYPE STANDARD TABLE
                             EXCEPTIONS casting_error
                                        empty_fieldcat.
        METHODS: output_list,
                 output_grid.
        METHODS: set_table_name   IMPORTING in_tabname  TYPE any,
                 set_alv_title    IMPORTING in_title    TYPE any,
                 set_alv_settings IMPORTING in_settings TYPE any,
                 set_alv_layout   IMPORTING in_layout   TYPE any,
                 set_alv_event    IMPORTING in_name     TYPE any
                                            in_form     TYPE any.
      PRIVATE SECTION.
        CLASS-DATA: g_table_object TYPE REF TO lcl_table_display.
        TYPES: BEGIN OF ty_defin,
                 fieldname     TYPE fieldname,
                 ref_tabname   TYPE tabname,
                 ref_fieldname TYPE fieldname,
               END OF ty_defin.
        DATA: g_repid  TYPE repid,
              g_struc  TYPE tabname,
              g_table  TYPE tabname.
        DATA: gt_data  TYPE REF TO data.
        DATA: g_title  TYPE lvc_title,
              gt_fcat  TYPE slis_t_fieldcat_alv,
              gs_sett  TYPE lvc_s_glay,
              gs_layo  TYPE slis_layout_alv,
              gt_evnt  TYPE slis_t_event.
        DATA: gt_defin TYPE TABLE OF ty_defin,
              g_level  TYPE tabname.
        METHODS: output_table IMPORTING data TYPE REF TO data
                                        mode TYPE c,
                 fill_fieldcat IMPORTING repid TYPE repid
                                         struc TYPE tabname
                                CHANGING fcat  TYPE slis_t_fieldcat_alv
                              EXCEPTIONS no_definition,
                 get_definition IMPORTING repid TYPE repid
                                          struc TYPE tabname
                                 CHANGING abap  TYPE rsfb_source,
                 recursive_definition IMPORTING repid TYPE repid
                                       CHANGING abap  TYPE rsfb_source,
                 map_structure IMPORTING source TYPE any
                                CHANGING destin TYPE any.
    ENDCLASS.
      LCL_TABLE_DISPLAY IMPLEMENTATION
    CLASS lcl_table_display IMPLEMENTATION.
      Display table in ALV list
      METHOD display_list.
        IF NOT g_table_object IS INITIAL.
          FREE: g_table_object.
        ENDIF.
        CREATE OBJECT g_table_object EXPORTING in_data = in_data.
        CALL METHOD g_table_object->output_list.
      ENDMETHOD.
      Display table in ALV grid
      METHOD display_grid.
        IF NOT g_table_object IS INITIAL.
          FREE: g_table_object.
        ENDIF.
        CREATE OBJECT g_table_object EXPORTING in_data = in_data.
        CALL METHOD g_table_object->output_grid.
      ENDMETHOD.
      Create table display
      METHOD constructor.
        DATA: ls_data TYPE REF TO data.
        DATA: ob_desc TYPE REF TO cl_abap_structdescr.
        DATA: l_absol TYPE char200,
              l_repid TYPE repid,
              l_struc TYPE tabname.
        FIELD-SYMBOLS: <table> TYPE STANDARD TABLE,
                       <struc> TYPE ANY.
      Get data and store it into attribute
        CREATE DATA me->gt_data LIKE in_data.
        ASSIGN me->gt_data->* TO <table>.
        <table> = in_data.
      Get global data definition
        CREATE DATA ls_data LIKE LINE OF <table>.
        ASSIGN ls_data->* TO <struc>.
        CATCH SYSTEM-EXCEPTIONS assign_casting_illegal_cast = 1.
          ob_desc ?= cl_abap_typedescr=>describe_by_data( <struc> ).
        ENDCATCH.
        IF sy-subrc = 1.
          RAISE casting_error.
        ENDIF.
      Get program name and main type used to define table
        l_absol = ob_desc->absolute_name.
        SPLIT l_absol AT '\TYPE=' INTO l_repid l_struc.
        SHIFT l_repid UP TO '='.
        SHIFT l_repid.
        CHECK l_struc NP '%_*'.
        IF me->g_repid NE l_repid
        OR me->g_struc NE l_struc.
        Set attributes
          me->g_repid = l_repid.
          me->g_struc = l_struc.
          me->g_table = l_struc.
          REPLACE 'TY' WITH 'WT' INTO me->g_table.
        Field catalog
          CALL METHOD fill_fieldcat EXPORTING repid = l_repid
                                              struc = l_struc
                                     CHANGING fcat  = me->gt_fcat.
          IF me->gt_fcat IS INITIAL.
            RAISE empty_fieldcat.
          ENDIF.
        ENDIF.
      ENDMETHOD.
      Output list
      METHOD output_list.
        CALL METHOD output_table EXPORTING data = me->gt_data
                                           mode = 'L'.
      ENDMETHOD.
      Output grid
      METHOD output_grid.
        CALL METHOD output_table EXPORTING data = me->gt_data
                                           mode = 'G'.
      ENDMETHOD.
      Output table
      METHOD output_table.
        DATA: ls_vari TYPE disvariant.
        FIELD-SYMBOLS: <table> TYPE STANDARD TABLE.
        ASSIGN me->gt_data->* TO <table>.
      Get default user variant
        ls_vari-report = me->g_repid.
        ls_vari-username = sy-uname.
        CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
             EXPORTING
                  i_save     = 'U'
             CHANGING
                  cs_variant = ls_vari
             EXCEPTIONS
                  OTHERS     = 0.
      Display table contents
        IF mode = 'G'.
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
               EXPORTING
                    i_callback_program = me->g_repid
                    i_grid_title       = me->g_title
                    i_grid_settings    = me->gs_sett
                    is_layout          = me->gs_layo
                    it_fieldcat        = me->gt_fcat
                    i_save             = 'U'
                    is_variant         = ls_vari
                    it_events          = me->gt_evnt
               TABLES
                    t_outtab           = <table>
               EXCEPTIONS
                    OTHERS             = 0.
        ELSE.
          CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
               EXPORTING
                    i_callback_program = me->g_repid
                    is_layout          = me->gs_layo
                    it_fieldcat        = me->gt_fcat
                    i_save             = 'U'
                    is_variant         = ls_vari
                    it_events          = me->gt_evnt
               TABLES
                    t_outtab           = <table>
               EXCEPTIONS
                    OTHERS             = 0.
        ENDIF.
      ENDMETHOD.
      Fill field catalog
      METHOD fill_fieldcat.
        DATA: lt_abap   TYPE TABLE OF rssource.
        DATA: ls_defin  TYPE ty_defin.
        DATA: lt_dfies  TYPE TABLE OF dfies,
              ls_dfies  TYPE dfies,
              ls_dd04v  TYPE dd04v,
              ls_dd01v  TYPE dd01v,
              l_flong   TYPE dfies-lfieldname,
              l_dname   TYPE dfies-domname.
        DATA: ls_fcat   TYPE slis_fieldcat_alv,
              ls_fcat2  TYPE slis_fieldcat_alv.
        DATA: l_index   TYPE i,
              l_nbfld   TYPE i.
        FREE: me->gt_defin.
      Process data definition
        CALL METHOD get_definition EXPORTING repid = repid
                                             struc = struc
                                    CHANGING abap  = lt_abap.
      Process sub levels if required
        CALL METHOD recursive_definition EXPORTING repid = repid
                                          CHANGING abap  = lt_abap.
        IF me->gt_defin IS INITIAL.
          RAISE no_definition.
        ENDIF.
        LOOP AT me->gt_defin INTO ls_defin.
          CLEAR: ls_fcat.
          MOVE-CORRESPONDING ls_defin TO ls_fcat.
        Retrieve info about this field
          FREE: ls_dfies, ls_dd04v, ls_dd01v, l_dname.
          l_flong = ls_fcat-ref_fieldname.
          SET LOCALE LANGUAGE 'E'.
          TRANSLATE: ls_fcat-ref_tabname   TO UPPER CASE,
                     ls_fcat-ref_fieldname TO UPPER CASE,
                     l_flong               TO UPPER CASE.
          IF NOT ls_fcat-ref_tabname IS INITIAL.
          Try to get info about field in table
            CALL FUNCTION 'DDIF_FIELDINFO_GET'
                 EXPORTING
                      tabname        = ls_fcat-ref_tabname
                      fieldname      = ls_fcat-ref_fieldname
                      lfieldname     = l_flong
                 IMPORTING
                      dfies_wa       = ls_dfies
                 EXCEPTIONS
                      not_found      = 1
                      internal_error = 2
                      OTHERS         = 3.
            IF sy-subrc = 0.
              MOVE-CORRESPONDING ls_dfies TO ls_fcat.
              ls_fcat-fieldname = ls_defin-fieldname.
              MOVE: ls_dfies-keyflag   TO ls_fcat-key,
                    ls_dfies-scrtext_m TO ls_fcat-seltext_l,
                    ls_dfies-domname   TO l_dname.
            ENDIF.
          ELSE.
          Try to get info about structure
            ls_defin-ref_tabname = ls_defin-ref_fieldname.
            CALL FUNCTION 'DDIF_FIELDINFO_GET'
                 EXPORTING
                      tabname   = ls_defin-ref_tabname
                 TABLES
                      dfies_tab = lt_dfies
                 EXCEPTIONS
                      OTHERS    = 0.
            IF NOT lt_dfies IS INITIAL.
            Process fields of this structure
              LOOP AT lt_dfies INTO ls_dfies.
                CLEAR: ls_fcat.
                MOVE-CORRESPONDING ls_dfies TO ls_fcat.
                CONCATENATE ls_defin-fieldname ls_fcat-fieldname
                       INTO ls_fcat-fieldname
                  SEPARATED BY '-'.
                MOVE ls_dfies-keyflag TO ls_fcat-key.
                MOVE ls_dfies-scrtext_m TO ls_fcat-seltext_l.
                ls_fcat-tabname = me->g_table.
                CLEAR: ls_fcat-col_pos,
                       ls_fcat-offset.
                IF ls_fcat-ref_tabname IS INITIAL.
                  ls_fcat-ddictxt = 'L'.
                ENDIF.
              Display Yes/No fields as checkboxes
                IF ls_dfies-domname = 'XFELD'.
                  ls_fcat-checkbox = 'X'.
                ENDIF.
              Add field to field catalog
                APPEND ls_fcat TO fcat.
              ENDLOOP.
            ELSE.
            Try to get info about data element
              CALL FUNCTION 'DDIF_DTEL_GET'
                   EXPORTING
                        name          = ls_fcat-ref_fieldname
                        langu         = sy-langu
                   IMPORTING
                        dd04v_wa      = ls_dd04v
                   EXCEPTIONS
                        illegal_input = 1
                        OTHERS        = 2.
              IF sy-subrc = 0.
                MOVE-CORRESPONDING ls_dd04v TO ls_fcat.
                MOVE: ls_dd04v-scrtext_m TO ls_fcat-seltext_l,
                      ls_dd04v-domname   TO l_dname.
              ELSE.
              Finally try to get info about domain
                CALL FUNCTION 'DDIF_DOMA_GET'
                     EXPORTING
                          name          = ls_fcat-ref_fieldname
                          langu         = sy-langu
                     IMPORTING
                          dd01v_wa      = ls_dd01v
                     EXCEPTIONS
                          illegal_input = 1
                          OTHERS        = 2.
                IF sy-subrc = 0.
                  MOVE-CORRESPONDING ls_dd01v TO ls_fcat.
                  MOVE: ls_dd01v-ddtext  TO ls_fcat-seltext_l,
                        ls_dd01v-domname TO l_dname.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        Table name must be internal table containing data
          ls_fcat-tabname = g_table.
        No offset
          CLEAR: ls_fcat-offset.
        Default text is stored in long text
          IF ls_fcat-ref_tabname IS INITIAL.
            ls_fcat-ddictxt = 'L'.
          ENDIF.
        Display Yes/No fields as checkboxes
          IF l_dname = 'XFELD'.
            ls_fcat-checkbox = 'X'.
          ENDIF.
        Add field to field catalog
          APPEND ls_fcat TO fcat.
        ENDLOOP.
      Link between fields
        DESCRIBE TABLE fcat LINES l_nbfld.
        LOOP AT fcat INTO ls_fcat.
          IF sy-tabix NE l_nbfld.
            l_index = sy-tabix + 1.
            READ TABLE fcat INTO ls_fcat2 INDEX l_index.
            IF sy-subrc = 0.
              IF ls_fcat-datatype = 'CURR'.
              Currency unit
                IF ls_fcat2-datatype = 'CUKY'.
                  ls_fcat-cfieldname = ls_fcat2-fieldname.
                  ls_fcat-ctabname   = ls_fcat2-tabname.
                  MODIFY fcat FROM ls_fcat.
                ELSE.
                  LOOP AT fcat INTO ls_fcat2
                               FROM l_index
                              WHERE datatype = 'CUKY'.
                  First currency unit after field
                    ls_fcat-cfieldname = ls_fcat2-fieldname.
                    ls_fcat-ctabname   = ls_fcat2-tabname.
                    MODIFY fcat FROM ls_fcat.
                    EXIT.
                  ENDLOOP.
                  IF sy-subrc NE 0.
                  No currency unit after field, try before
                    READ TABLE fcat INTO ls_fcat2
                                WITH KEY datatype = 'CUKY'.
                    IF sy-subrc = 0.
                      ls_fcat-cfieldname = ls_fcat2-fieldname.
                      ls_fcat-ctabname   = ls_fcat2-tabname.
                      MODIFY fcat FROM ls_fcat.
                    ENDIF.
                  ENDIF.
                ENDIF.
              ENDIF.
              IF ls_fcat-datatype = 'QUAN'.
              Quantity unit
                IF ls_fcat2-datatype = 'UNIT'.
                  ls_fcat-cfieldname = ls_fcat2-fieldname.
                  ls_fcat-ctabname   = ls_fcat2-tabname.
                  MODIFY fcat FROM ls_fcat.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.
      Get definition of type from code source
      METHOD get_definition.
        DATA: l_strng TYPE rssource,
              ls_abap TYPE rssource,
              l_fdpos TYPE i,
              l_first TYPE i,
              l_lastr TYPE i.
        DATA: lt_incl TYPE TABLE OF repid,
              ls_incl TYPE repid.
      Get program code
        READ REPORT repid INTO abap.
        CHECK sy-subrc EQ 0.
      Get first line of definition
        CONCATENATE 'BEGIN OF' struc INTO l_strng
                                SEPARATED BY space.
        LOOP AT abap INTO ls_abap.
          IF ls_abap CS l_strng.
            l_fdpos = strlen( l_strng ) + sy-fdpos.
            IF ls_abap+l_fdpos(1) CA ', "'.
              l_first = sy-tabix.
              EXIT.
            ENDIF.
          ENDIF.
        ENDLOOP.
        IF l_first IS INITIAL.
        Table is defined in an include
          CALL FUNCTION 'RS_GET_ALL_INCLUDES'
               EXPORTING
                    program    = repid
               TABLES
                    includetab = lt_incl
               EXCEPTIONS
                    OTHERS     = 1.
          IF sy-subrc = 0.
            LOOP AT lt_incl INTO ls_incl.
            Try to find definition in this include
              READ REPORT ls_incl INTO abap.
              LOOP AT abap INTO ls_abap.
                IF ls_abap CS l_strng.
                  l_fdpos = strlen( l_strng ) + sy-fdpos.
                  IF ls_abap+l_fdpos(1) CA ',. "'.
                    l_first = sy-tabix.
                    EXIT.
                  ENDIF.
                ENDIF.
              ENDLOOP.
              IF NOT l_first IS INITIAL.
                EXIT.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
      Get last line of definition
        CONCATENATE 'END OF' struc INTO l_strng
                              SEPARATED BY space.
        LOOP AT abap INTO ls_abap.
          IF ls_abap CS l_strng.
            l_fdpos = strlen( l_strng ) + sy-fdpos.
            IF ls_abap+l_fdpos(1) CA ',. "'.
              l_lastr = sy-tabix - l_first.
              EXIT.
            ENDIF.
          ENDIF.
        ENDLOOP.
      Keep only relevant code lines
        IF l_first LE 0
        OR l_lastr LE 0.
          REFRESH abap.
        ELSE.
          DELETE abap TO l_first.
          DELETE abap FROM l_lastr.
        ENDIF.
      ENDMETHOD.
      Get definition of type recursively
      METHOD recursive_definition.
        DATA: lt_token TYPE TABLE OF stokex,
              ls_token TYPE stokex,
              lt_state TYPE TABLE OF sstmnt,
              ls_state TYPE sstmnt.
        DATA: ls_defin TYPE ty_defin,
              l_reffld TYPE fieldname.
        DATA: lt_recu  TYPE TABLE OF rssource.
      Retrieve tokens
        SCAN ABAP-SOURCE abap
                  TOKENS INTO lt_token
              STATEMENTS INTO lt_state.
        LOOP AT lt_state INTO ls_state.
          CLEAR: ls_defin.
        Field name
          READ TABLE lt_token INTO ls_token
                             INDEX ls_state-from.
          ls_defin-fieldname = ls_token-str.
        Reference type
          READ TABLE lt_token INTO ls_token
                             INDEX ls_state-to.
          l_reffld = ls_token-str.
        Check if this type is defined in program
          FREE: lt_recu.
          CALL METHOD get_definition EXPORTING repid = repid
                                               struc = l_reffld
                                      CHANGING abap  = lt_recu.
          IF lt_recu IS INITIAL.
            IF NOT g_level IS INITIAL.
             CONCATENATE g_level ls_defin-fieldname INTO ls_defin-fieldname
                                                           SEPARATED BY '-'.
              CONDENSE ls_defin-fieldname.
            ENDIF.
            IF l_reffld CS '-'.
              SPLIT l_reffld AT '-'
                           INTO ls_defin-ref_tabname
                                ls_defin-ref_fieldname.
              IF ls_defin-ref_tabname = 'SY'.
                ls_defin-ref_tabname = 'SYST'.
              ENDIF.
            ELSE.
              ls_defin-ref_fieldname = ls_token-str.
            ENDIF.
            APPEND ls_defin TO me->gt_defin.
          ELSE.
          Process sub levels
            IF me->g_level IS INITIAL.
              me->g_level = ls_defin-fieldname.
            ELSE.
              CONCATENATE me->g_level ls_defin-fieldname INTO me->g_level
                                                 SEPARATED BY '-'.
            ENDIF.
            CALL METHOD recursive_definition EXPORTING repid = repid
                                              CHANGING abap  = lt_recu.
            IF me->g_level CS '-'.
              SHIFT me->g_level RIGHT UP TO '-'.
              SHIFT me->g_level RIGHT.
              SHIFT me->g_level LEFT DELETING LEADING space.
            ELSE.
              CLEAR: me->g_level.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.
      Set table name
      METHOD set_table_name.
        me->g_table = in_tabname.
      ENDMETHOD.
      Set title
      METHOD set_alv_title.
        me->g_title = in_title.
      ENDMETHOD.
      Set settings
      METHOD set_alv_settings.
        CALL METHOD map_structure EXPORTING source = in_settings
                                   CHANGING destin = me->gs_sett.
      ENDMETHOD.
      Set layout
      METHOD set_alv_layout.
        CALL METHOD map_structure EXPORTING source = in_layout
                                   CHANGING destin = me->gs_layo.
      ENDMETHOD.
      Add event
      METHOD set_alv_event.
        DATA: ls_evnt TYPE slis_alv_event.
        ls_evnt-name = in_name.
        ls_evnt-form = in_form.
        COLLECT ls_evnt INTO gt_evnt.
      ENDMETHOD.
      Map fields from incoming structure into attribute
      METHOD map_structure.
        DATA: ob_desc  TYPE REF TO cl_abap_structdescr,
              ls_compo TYPE abap_compdescr.
        FIELD-SYMBOLS: <field> TYPE ANY,
                       <struc> TYPE ANY.
        ob_desc ?= cl_abap_typedescr=>describe_by_data( destin ).
        LOOP AT ob_desc->components INTO ls_compo.
          ASSIGN COMPONENT ls_compo-name OF STRUCTURE source TO <field>.
          IF <field> IS ASSIGNED.
            ASSIGN COMPONENT ls_compo-name OF STRUCTURE destin TO <struc>.
            CATCH SYSTEM-EXCEPTIONS conversion_errors = 1.
              MOVE <field> TO <struc>.
            ENDCATCH.
            UNASSIGN <field>.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.
    ENDCLASS.
    PLZ REWARD POINTS

  • How to make Shape3D object translucent

    Hi,
    How to make Shape3D object (like Box, Cylinder) translucent? I tried the below option but the box is not becoming translucent at all.
    final PhongMaterial redMaterial = new PhongMaterial();
              redMaterial.setSpecularColor(Color.rgb(10, 255, 15, opacity));
              redMaterial.setDiffuseColor(Color.rgb(10, 255, 15, opacity));
    final Box box = new Box(width,height,depth);
    box.setMaterial(redMaterial);
    When opacity is 1, the color of the box will be Green, when it is 0 the color becomes black.
    Is there any way the box can be made translucent?

    There is at least one unresolved issue concerning PhongMaterial's transparency: RT-28874.
    I'm neither able to get it working properly. My red Sphere also fades to black while varying the opacity value from 1.0 to 0.0.
    August

  • Why do we use cl_gui_cfw= flush method in Object Oriented ALV programming

    Dear Friends,
    Please solve my query regarding control framework. Why do we use cl_gui_cfw=>flush method in Object Oriented ALV programming. I studied and found that this method transfers automation queue to Front end.  But I could not find any further update on this.
    Thanks & Regards
    Amit Sharma

    Generally this is to restrict the traffic b/w frontend and backend. This means that every operation in Control Framework should be first buffered in the backend and synchronized with the frontend at certain points (one of this point is calling synchronization method cl_gui_cfw=>flush ). This explicit order of synchronization is due to RFC call needed for every communication b/w front/back end. So to avoid to many RFC calls we do it only at certain time.
    Please refer [Automation Queue|http://help.sap.com/saphelp_wp/helpdata/en/9b/d080ba9fc111d2bd68080009b4534c/frameset.htm]. I think it explains the concept quite well.
    Regards
    Marcin

  • How to make some fields in ALV tree editable

    Hello All,
    Can any one tell me how to make some fields in ALV tree editable.
    If possible please post some code.
    Regards,
    Lisa.

    Hi Lisa,
    I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
    I tried making the wa_fieldcat-edit = 'X' But in vain.
    Also i made the layout fields  wa_layout-edit = 'X'  and wa_layout-edit_mode = 'X'.
    But still the alv tree field appears as display.
    As you have mentioned in the post as answered, So please guide me to make the field editable.
    I am using oops method.
    Please provide me code if any.
    Thanks & Regards,
    Mozila

Maybe you are looking for

  • Time Capsule and FIOS

    Could I get some step by step on setting up cant seem to get it to work

  • VNC: no screen refresh controlling Lion Server

    Hello all. I have a Mac Mini running Lion Server. It shares a monitor with a PC using an IOGear DVI KVM switch. Usually I can use VNC remotely to control the Mac Mini when it is connected to the KVM switch. However sometimes I need to grab the cables

  • MS SQL Server 2000 Permission

    I'm running SQL Server 2000 v8 and I'm having trouble with MS SQL Server Driver for JDBC service pack 2. I can create and delete tables but I can't read/write to them. I get this error ->java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JD

  • Matrix display of Radio button in JSF

    Hi, I need to show a matrix using JSF in the following way . . A B C X 1 2 3 Y 4 5 6 Z 7 8 9 I'm having a table in database named "matrix" which is having 3 fields. field1 is a number,field2 and field 3 are foreign keys which references to table "A1"

  • Don't know how to reduce the size of the view on screen.

    HELP! My kids have been mucking around and now my entire screen view is magnified and I can't seem to find how they did it nor how to go back to the default view. Regardless of what application I open, the window contents is twice the size of the def