Grid setup

Hello
i habe only one node for now
i am willing to install oracle 11gR2 one node option, and use asm
what option of grid infrastructure shall i use:?
-For standalone
-For cluster and select only the one node that i have then i add other node later ?
many thanks

Maoro wrote:
Hello
i habe only one node for now
i am willing to install oracle 11gR2 one node option, and use asm
what option of grid infrastructure shall i use:?
-For standalone
-For cluster and select only the one node that i have then i add other node later ?
many thanks
RAC One Node is not the single instance and would need you to use the cluster installation only. Here one node is that node where the instance would be running but you would need to include all those nodes which you want to include in your cluster. These nodes are those where the instance would be either switched over or failed over .
Please read,
Administering Oracle RAC One Node
Aman....

Similar Messages

  • Management agents for 10g OEM Grid setup with HP's MC/Serviceguard

    I am trying to set up the OEM Management agents in a MCserviceguard environment.
    Each db is a serviceguard "package" with its own disks and a floating IP. The floating
    IP is constant, but is dynamicly associated with whichever server currently hosts the package.
    The goal is to have a Management agent (formerly Intelligent agent) per db.
    There are notes and tech forums on how this is achieved in version 9.2 with
    Intelligent Agent. However, not having any luck in finding this for 10g.
    In 9.2, a forum note
    From: John Low 14-Sep-04 21:20
    Subject: OEM setup with HPs MC-Serviceguard
    Has anyone setup the 10g Management agents to run on an MC Service Guard environment
    (or similar cluster environment on another platform)? If you have please let me know!!
    David
    Message was edited by:
    wan00823
    Message was edited by:
    wan00823

    Here is a nice document that should answer your question
    http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10gEMAgentActivePassive.pdf
    I did not bother installing three agents. I just installed one at the package level. My hosts are monitored by HP Openview. OEM just monitors the databases.
    I have not used the command line parameter in runInstaller to set the hostname. Here is how I did it - may not be supported though. I have learnt the hard way that with HPUX you are on your own for most part with OEM. I modify Disk1/install/oraparam.ini. Change SHOW_HOSTNAME=NEVER_SHOW to SHOW_HOSTNAME=ALWAYS_SHOW. Installer will prompt you for hostname and the network card to use. Choose the one to which the service guard ip is attached to and change the hostname.
    Take a look at my previous post regarding installing management service – I have the tweaking described in more detail. The tweak is same for both management agent and management service install.
    10g Grid Control and MC/Service Guard on HP-UX 11i

  • TimesTen Cache Grid Setup Issues on Clusterware

    Dear Experts,
    I would like to set up two TimesTen A/S pairs on Clusterware. Here's the A/S pairs status after the initial setup. I was able to load cache groups into the pairs.
    sss6202/u01/app/TimesTen/tt1122/info> ttcwadmin -status
    TimesTen Cluster status report as of Wed Apr 25 21:48:35 2012
    ====================================================================
    TimesTen daemon monitors:
    Host:SSS6202 Status: online
    Host:SSS6203 Status: online
    ====================================================================
    ====================================================================
    TimesTen Cluster agents
    Host:SSS6202 Status: online
    Host:SSS6203 Status: online
    ====================================================================
    Status of Cluster related to DSN ST_0.0.0.1:
    ====================================================================
    1. Status of Cluster monitoring components:
    Monitor Process for Active datastore:RUNNING on Host sss6203
    Monitor Process for Standby datastore:RUNNING on Host sss6202
    Monitor Process for Master Datastore 1 on Host sss6202: RUNNING
    Monitor Process for Master Datastore 2 on Host sss6203: RUNNING
    Monitor for Application DM_TT_0.0.0.1: RUNNING on Host sss6203
    2.Status of Datastores comprising the cluster
    Master Datastore 1:
    Host:sss6202
    Status:AVAILABLE
    State:STANDBY
    Grid:AVAILABLE
    Master Datastore 2:
    Host:sss6203
    Status:AVAILABLE
    State:ACTIVE
    Grid:AVAILABLE
    ====================================================================
    The cluster containing the replicated DSN is online
    Status of Cluster related to DSN ST_0.1.0.1:
    ====================================================================
    1. Status of Cluster monitoring components:
    Monitor Process for Active datastore:RUNNING on Host sss6203
    Monitor Process for Standby datastore:RUNNING on Host sss6203
    Monitor Process for Master Datastore 1 on Host sss6202: RUNNING
    Monitor Process for Master Datastore 2 on Host sss6203: RUNNING
    Monitor for Application DM_TT_0.1.0.1: RUNNING on Host sss6203
    2.Status of Datastores comprising the cluster
    Master Datastore 1:
    Host:sss6202
    Status:AVAILABLE
    State:IDLE
    Grid:NO GRID
    Master Datastore 2:
    Host:sss6203
    Status:AVAILABLE
    State:ACTIVE
    Grid:AVAILABLE
    ====================================================================
    The cluster containing the replicated DSN is online
    When I attemp to start my application connecting to TimesTen A/S pairs it failed with the following errors. Seems like TT grid just has gone bad for unknown reason.
    M Thu Apr 26 13:41:53 2012 sss6202 dm:10236 dm_search.c(106):3243 1:sss6202:cm:29186:1:0:1335469313:0
    in update size is 1000 (default)
    E Thu Apr 26 13:41:53 2012 sss6202 dm:10235 dm_subr.c(154):1904 1:sss6202:cm:29186:1:0:1335469313:0
    ORACLE error: do_sql_select: PINStmtExecute: code 57000, op 0
    =ORA-57000: TT3331: Failed to send a message to member UNKNOWN -- file "cacheGrid.c", lineno 28552, procedure "sbCGGridCompile"
    E Thu Apr 26 13:41:53 2012 sss6202 dm:10235 dm_ops.c(238):6823 1:sss6202:cm:29186:1:0:1335469313:0
    op_search_and_bulk_act: do_sql_select of search: "select template, flags from pin.search_t where poid_id0 = :1", x=1, id 500
    E Thu Apr 26 13:41:53 2012 sss6202 dm:10235 dm_back.c(31):1440 1:sss6202:cm:29186:1:0:1335469313:0
    DMbe #6: process_op: op 7(PCM_OP_SEARCH), err 43(PIN_ERR_STORAGE)
    E Thu Apr 26 13:41:53 2012 sss6202 dm:10236 dm_subr.c(154):1904 1:sss6202:cm:29186:1:0:1335469313:0
    ORACLE error: do_sql_select: PINStmtExecute: code 57000, op 0
    =ORA-57000: TT3331: Failed to send a message to member UNKNOWN -- file "cacheGrid.c", lineno 28552, procedure "sbCGGridCompile"
    E Thu Apr 26 13:41:53 2012 sss6202 dm:10236 dm_ops.c(238):6823 1:sss6202:cm:29186:1:0:1335469313:0
    op_search_and_bulk_act: do_sql_select of search: "select template, flags from pin.search_t where poid_id0 = :1", x=1, id 500
    E Thu Apr 26 13:41:53 2012 sss6202 dm:10236 dm_back.c(31):1440 1:sss6202:cm:29186:1:0:1335469313:0
    DMbe #7: process_op: op 7(PCM_OP_SEARCH), err 43(PIN_ERR_STORAGE)
    So I try to drop and recreate the A/S pairs, but the call ttcwadmin –create –dsn st_0.0.0.1 now errs out with the following errors in ttcwerrors.log. It’s the same process I ran previously to set up the pairs. Did I miss anything in the process?
    2012-04-26 20:06:04.22 Err : : 15926: (ttCRSdaemon:) ttctl.c(5801): TT16032: Call to send() failed. System Error: 134
    2012-04-26 20:07:01.28 Err : : 1685: (ttClusterAgent:) ttctl.c(7764): S1T00:[TimesTen][TimesTen 11.2.2.1.0 ODBC Driver]
    [TimesTen]TT6003: Lock request denied because of time-out Details: Tran 24.49 (pid 1690) wants IXn lock on table SYS.CACHE_
    GROUP. But tran 23.59 (pid 1690) has it in Un (request was Un). Holder SQL (call ttrepstateset('active')) -- file "cache.c"
    , lineno 7173, procedure "sbCacheGetDDLLocks()"
    2012-04-26 20:07:01.28 Err : : 1685: (ttClusterAgent:) crsagent.c 2086: Failed to set state of autorefresh cache groups
    to paused
    2012-04-26 20:07:01.29 Err : : 15935: (ttCWAdmin:) cwutils.c(1998): TT16032: Call to recv() failed. System Error: -1
    2012-04-26 20:07:01.29 Err : : 15935: (ttCWAdmin:) cwutils.c(1998): TT16032: Call to recv() failed. System Error: -1
    2012-04-26 20:07:01.29 Err : : 15935: (ttCWAdmin:) crsctl.c(19818): TT48013: Failed to create ACTIVE STANDBY PAIR scheme
    for DSN ST_0.0.0.1 on host sss6202.
    2012-04-26 20:07:38.40 Err : : 15935: (ttCWAdmin:) cwutils.c(1941): TT16032: Call to recv() failed. System Error: 131
    It's TimesTen 11.2.2 on Clusterware 11g2.
    Many thanks for your advices / insights!

    Hi Gena,
    Thank you for your reply. My intention is to set up both active datastores on sss6202, and standby on sss6203.
    The reason I dropped them because of the application error shown in the original post and ttcwadmin -status at that time showed NO GRID
    Now I am facing a problem with recreating the A/S pairs. The errors in ttcwerrors.log are shown below. It seems to me the drop command did not drop the A/S pairs cleanly.
    2012-04-27 11:49:32.19 Err : : 3126: (ttClusterAgent:) ttctl.c(7764): S1T00:[TimesTen][TimesTen 11.2.2.1.0 ODBC Driver][TimesTen]TT6003: Lock request denied because of time-out Details: Tran 23.69 (pid 3131) wants IXn lock on table SYS.CACHE_GROUP. But tran 1.109139 (pid 3131) has it in Un (request was Un). Holder SQL (call ttrepstateset('active')) -- file "cache.c", lineno 7173, procedure "sbCacheGetDDLLocks()"
    2012-04-27 11:49:32.19 Err : : 3126: (ttClusterAgent:) crsagent.c 2086: Failed to set state of autorefresh cache groups to paused
    2012-04-27 11:49:32.19 Err : : 4559: (ttCWAdmin:) cwutils.c(1998): TT16032: Call to recv() failed. System Error: -1
    2012-04-27 11:49:32.19 Err : : 4559: (ttCWAdmin:) cwutils.c(1998): TT16032: Call to recv() failed. System Error: -1
    2012-04-27 11:49:32.19 Err : : 4559: (ttCWAdmin:) crsctl.c(19818): TT48013: Failed to create ACTIVE STANDBY PAIR scheme for DSN ST_0.0.0.1 on host sss6202.
    2012-04-27 11:50:25.26 Err : : 4559: (ttCWAdmin:) crsctl.c(19818): TT48013: Failed to create ACTIVE STANDBY PAIR scheme for DSN ST_0.0.0.1 on host sss6203.
    Here's crs_stat -t output
    sss6202/u01/app/TimesTen/tt1122/info> crs_stat -t
    Name Type Target State Host
    TT_A...0.0.0.1 application OFFLINE OFFLINE
    TT_A...SSS6202 application ONLINE ONLINE sss6202
    TT_A...SSS6203 application ONLINE ONLINE sss6203
    TT_A...1_DMTT1 application OFFLINE OFFLINE
    TT_D...SSS6202 application OFFLINE OFFLINE
    TT_D...SSS6203 application OFFLINE OFFLINE
    TT_M...0.0.1_0 application OFFLINE OFFLINE
    TT_M...0.0.1_1 application OFFLINE OFFLINE
    TT_S...0.0.0.1 application OFFLINE OFFLINE
    ora....ER.lsnr ora....er.type ONLINE ONLINE sss6202
    ora....N1.lsnr ora....er.type ONLINE ONLINE sss6202
    ora.asm ora.asm.type OFFLINE OFFLINE
    ora.cvu ora.cvu.type ONLINE ONLINE sss6202
    ora.gsd ora.gsd.type OFFLINE OFFLINE
    ora....network ora....rk.type ONLINE ONLINE sss6202
    ora.oc4j ora.oc4j.type ONLINE ONLINE sss6202
    ora.ons ora.ons.type ONLINE ONLINE sss6202
    ora....ry.acfs ora....fs.type OFFLINE OFFLINE
    ora.scan1.vip ora....ip.type ONLINE ONLINE sss6202
    ora....SM1.asm application OFFLINE OFFLINE
    ora....02.lsnr application ONLINE ONLINE sss6202
    ora....202.gsd application OFFLINE OFFLINE
    ora....202.ons application ONLINE ONLINE sss6202
    ora....202.vip ora....t1.type ONLINE ONLINE sss6202
    ora....SM2.asm application OFFLINE OFFLINE
    ora....03.lsnr application ONLINE ONLINE sss6203
    ora....203.gsd application OFFLINE OFFLINE
    ora....203.ons application ONLINE ONLINE sss6203
    ora....203.vip ora....t1.type ONLINE ONLINE sss6203
    My concern is the grid status has changed from AVAILABLE to NO GRID causing the client application error, then subsequently the error in recreating the A/S pair.
    Many thanks!
    Thomas Cong

  • To change the subtotals row color in ALV(Grid / List ) .

    I am trying to change the color of a row which gives the subtotal...in ALV report...
    but it is not working....
    I have used the following code but not getting where i m wrong
    I have u sed the following code wih the help of our forum only...
    <CODE>
    TYPE-POOLS: SLIS.
    *& Internal Table Delcaration
    DATA : BEGIN OF IT_SCALE OCCURS 0,
             DATUM LIKE ZSCALE-DATUM,
             MCOD1 LIKE ZSCALE-MCOD1,
             MATNR LIKE ZSCALE-MATNR,
             MAKTG LIKE ZSCALE-MAKTG,
             MEINS LIKE ZSCALE-MEINS,
             RATE LIKE ZSCALE-RATE,
             TOTAL LIKE ZSCALE-TOTAL,
             LI_COLOR(4),
           END OF IT_SCALE.
    DATA : INDEX LIKE SY-TABIX.
    *& ALV Data Declaration
    DATA: IT_FIELDCAT  TYPE SLIS_T_FIELDCAT_ALV.
    DATA: WA_FIELDCAT  LIKE LINE OF IT_FIELDCAT.
    DATA : T_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    DATA : IT_EVENTS   TYPE SLIS_T_EVENT WITH HEADER LINE.
    DATA : G_SAVE(1)   TYPE C VALUE 'A',
           GX_SAVE(1)  TYPE C VALUE 'A',
           GX_VARIANT  LIKE DISVARIANT,
           G_VARIANT   LIKE DISVARIANT,
           GS_LAYOUT   TYPE SLIS_LAYOUT_ALV,
           T_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
           T_I_EVENT      TYPE SLIS_ALV_EVENT.
    DATA : L_LIST(105)    TYPE C,         "Store the Top-of-page headings
           L_DATEFROM(10) TYPE C,         "Store date in top-of-page
           L_DATETO(10)   TYPE C.         "Store date in top-of-page
    <code>
    START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM ALV_FIELDCAT.
      PERFORM GET_EVENTS.
      PERFORM SUB_COMMENT_BUILD USING T_LIST_TOP_OF_PAGE.
      PERFORM ALV_DISPLAY.
    FORM GET_DATA .
    DATA : LINE_COLOR.
      SELECT DATUM MCOD1 MATNR MAKTG MEINS RATE TOTAL
             FROM ZSCALE INTO CORRESPONDING FIELDS OF TABLE IT_SCALE
             WHERE DATUM IN S_DATE
               AND LIFNR IN S_LIFNR
               AND MATNR IN S_MATNR.
    loop at IT_SCALE.
      LINE_color = LINE_color + 2.
      if LINE_color < 7.
        LINE_color = 1.
      endif.
      concatenate 'C' lINE_color '00' into IT_SCALE-li_color.
      modify it_SCALE TRANSPORTING LI_COLOR.
    endloop.
    FORM ALV_FIELDCAT.
      DATA: COUNTER      TYPE I.
      COUNTER = COUNTER + 1.
      WA_FIELDCAT-COL_POS    = COUNTER.
      WA_FIELDCAT-FIELDNAME  = 'DATUM'.
      WA_FIELDCAT-TABNAME    = 'IT_SCALE'.
      WA_FIELDCAT-SELTEXT_L  = 'Date'.
      WA_FIELDCAT-JUST       = 'C'.
      WA_FIELDCAT-NO_ZERO    = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    .endform.
    FORM ALV_DISPLAY .
    GS_LAYOUT-ZEBRA        = 'X'.
      GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      GS_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    gS_layout-no_input          = 'X'.
      gS_layout-totals_text       = 'Totals'(201).
      gS_layout-subtotals_text = 'Subtotal'.
      IF IT_SCALE[] IS INITIAL.
        MESSAGE I001(38) WITH 'No Data to Display'.
      ELSE.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM             = SY-REPID
       IS_LAYOUT                      = GS_LAYOUT
      IT_FIELDCAT                    = IT_FIELDCAT
       I_SAVE                         = G_SAVE
       IS_VARIANT                     = GX_VARIANT
      TABLES
        T_OUTTAB                       = IT_SCALE[].
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    ThanX in Adavance....

    Hi Prasad,
    I provided some code snippets for you. Please go through.
    Hope this proves to be helpful to you.
    The steps for coloring a line i the grid is much the same as making a traffic light.
    To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Heres another Example for you:
        & Report  Z_ALV_COLOURS                                              &
        & This report shows how to use colours in REUSE_ALV_GRID_DISPLAY     &
        & C = Colour        (all codes must start with 'C')                  &
        & X = Colour number (1-9)                                            &
        & Y = Intensified   (0 = off, 1 = on)                                &
        & Z = Inverse       (0 = off, 1 = on)                                &
        report  z_alv_colours.
        data count_1(1) type c.
    ALV definitions
        type-pools: slis.
        data i_fieldcat type slis_t_fieldcat_alv with header line.
        data i_layout   type slis_layout_alv.
        types: begin of t_alv,
              f1(4) type c,
              f2(15) type c,
              f3(4) type c,
              f4(4) type c,
              f5(4) type c,
              f6(4) type c,
              colour(4)   type c,
              coltab type slis_t_specialcol_alv,
        end of t_alv.
        data: i_alv type standard table of t_alv with header line.
        data l_alvcolor type slis_specialcol_alv.
        & create table entries for LINE colours                              &
        do 9 times.
          count_1 = sy-index.
          clear i_alv.
          concatenate 'C' count_1 '0' '0' into i_alv-f1.
          concatenate 'C' count_1 '0' '0' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f3 = 'X'.
          append i_alv.
    Intensified
          clear i_alv.
          concatenate 'C' count_1 '1' '0' into i_alv-f1.
          concatenate 'C' count_1 '1' '0' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f4 = 'X'.
          append i_alv.
    Inverse
          clear i_alv.
          concatenate 'C' count_1 '0' '1' into i_alv-f1.
          concatenate 'C' count_1 '0' '1' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f5 = 'X'.
          append i_alv.
    Intensified & Inverse
          clear i_alv.
          concatenate 'C' count_1 '1' '1' into i_alv-f1.
          concatenate 'C' count_1 '1' '1' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f6 = 'X'.
          append i_alv.
        enddo.
    create table entries for CELL colours
        do 9 times.
          count_1 = sy-index.
          concatenate 'C' count_1 '0' '0' into i_alv-f1.
          i_alv-f2 = 'Cell colour'.
          concatenate 'C' count_1 '0' '0' into i_alv-f3.
          concatenate 'C' count_1 '1' '0' into i_alv-f4.
          concatenate 'C' count_1 '0' '1' into i_alv-f5.
          concatenate 'C' count_1 '1' '1' into i_alv-f6.
          append i_alv.
        enddo.
        & Create table entries for CELL colours                              &
        loop at i_alv where f2 = 'Cell colour'.
    Colour cells
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F3'.
          l_alvcolor-color-col = i_alv-f3+1(1).
          l_alvcolor-color-int = i_alv-f3+2(1).
          l_alvcolor-color-inv = i_alv-f3+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F4'.
          l_alvcolor-color-col = i_alv-f4+1(1).
          l_alvcolor-color-int = i_alv-f4+2(1).
          l_alvcolor-color-inv = i_alv-f4+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F5'.
          l_alvcolor-color-col = i_alv-f5+1(1).
          l_alvcolor-color-int = i_alv-f5+2(1).
          l_alvcolor-color-inv = i_alv-f5+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F6'.
          l_alvcolor-color-col = i_alv-f6+1(1).
          l_alvcolor-color-int = i_alv-f6+2(1).
          l_alvcolor-color-inv = i_alv-f6+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          modify i_alv.
        endloop.
        & Configure ALV settings                                             &
    Create field catalog
        perform create_field_catalog using 'F1'     'T_ALV' 'Colour name'.
        perform create_field_catalog using 'F2'     'T_ALV' 'Description'.
        perform create_field_catalog using 'F3'     'T_ALV' 'BaseColour'.
        perform create_field_catalog using 'F4'     'T_ALV' 'Intensified'.
        perform create_field_catalog using 'F5'     'T_ALV' 'Inverse'.
        perform create_field_catalog using 'F6'     'T_ALV' 'Both Inv/Int'.
        perform create_field_catalog using 'COLOUR' 'T_ALV' 'Colour'.
    Layout
        clear i_layout.
        i_layout-colwidth_optimize   = 'X'.
        i_layout-info_fieldname      = 'COLOUR'.   " for line colour
        i_layout-coltab_fieldname    = 'COLTAB'.   " for cell colour
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            i_callback_program      = sy-cprog
            i_callback_user_command = 'USER_COMMAND'
            is_layout               = i_layout
            it_fieldcat             = i_fieldcat[]
            i_default               = 'X'
            i_save                  = 'A'
          tables
            t_outtab                = i_alv.
        & Form  CREATE_FIELD_CATALOG                                          &
        form create_field_catalog using    p_fieldname
                                           p_tabname
                                           p_text.
          i_fieldcat-fieldname        = p_fieldname.
          i_fieldcat-tabname          = p_tabname.
          i_fieldcat-seltext_l        = p_text.
          append i_fieldcat.
        endform.                    " CREATE_FIELD_CATALOG
    For more information about Coloring in ALV, Please refer :
    Coloring Rows in ALV
    Hope this helps you in solving your issue.
    Please Reward Points if any of the above points are helpful to you.
    Regards,
    Kalyan Chakravarthy

  • How to use ALV Grid?

    Hi,
    I am totally new to ALV Grids. Could you give a full example of creating a ALV Grid with 2 columns, thinking there is a internal table itab with itab-col1 & itab-col2. Please start from initialising variables and onwards.
    Thanks,
    Kishan

    Hi,
    Simple example of how to implement an ALV grid
    Note that this example uses table ZSFLIGHT. The table is equivalent to the table SFLIGHT.
    Steps:
    1.        Create an executable program (Report)
    2.        Create a screen (100) and place a custom container named ALV_CONTAINER on the screen
    3.        Create a Pushbutton. Give it the text Exit and the functioncode EXIT
    REPORT sapmz_hf_alv_grid .
    TABLES: zsflight.
    G L O B A L   I N T E R N  A L   T A B L E S
    DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    G L O B A L   D A T A
    DATA: ok_code LIKE sy-ucomm,
    g_wa_sflight LIKE sflight.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid             TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    Create objects
    IF go_custom_container IS INITIAL.
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
      i_parent = go_custom_container.
    PERFORM load_data_into_grid.
    ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Form  load_data_into_grid
    FORM load_data_into_grid.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    Load data into the grid and display them
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
    CHANGING  it_outtab        = gi_sflight.
    ENDFORM.                    " load_data_into_grid
    Allow the user to save and reuse the layout
    A button can be shown on the grid toolbar, allowing the user to save and reuse a layout. The button looks like this: 
    See also example in SAP standard program BCALV_GRID_09.
    To do this use the parameters IS_VARIANT and I_SAVE of the set_table_for_first_display method. Note that the IS_VARIANT
    parameter must have the structure DISVARIANT.
    The I_SAVE "Options for saving layouts" parameter can have the following values:
    ·        U Only user specific layouts can be saved
    ·        X Only global layouts can be saved
    ·        A Both user specific and global layouts can be saved
    ·        Space Layouts can not be saved
    Add the following code to the example:
    FORM load_data_into_grid.
    DATA:
      For parameter IS_VARIANT
    l_layout TYPE disvariant.
    Code..........    
    Load data into the grid and display them
    l_layout-report = sy-repid.
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
         is_variant       = l_layout
         i_save           = 'A'
    CHANGING  it_outtab        = gi_
    Integrate user defined functions in the grid toolbar
    Possibilities:
    ·        Replace existing functions in the toolbar or context men with user defined functions
    ·        Add new functions to the toolbar or context menu
    Note that the whole toolbar can be removed using the IT_TOOLBAR_EXCLUDING parameter of the set_table_for_first_display
    method.
    See also example in SAP standard program BCALV_GRID_05
    1) To get access to the icons insert the following statement in the top of the program:
    TYPE-POOLS: icon.
    2) To allow the declaration of o_event_receiver before the lcl_event_receiver class is defined, declare it as deferred in the start of
    the program
    To allow the declaration of o_event_receiver before the lcl_event_receiver class is defined, declare it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    3) Declare reference to the event handler class
    DATA:
    o_event_receiver TYPE REF TO lcl_event_receiver.
    4) Class for event receiver. This class adds the new button to the toolbar and handles the event when the button is pushed
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
          CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal           TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu                    TYPE i VALUE 2,
    c_separator               TYPE i VALUE 3,
    c_radio_button            TYPE i VALUE 4,
    c_checkbox                TYPE i VALUE 5,
    c_menu_entry              TYPE i VALUE 6.
    DATA:
    ls_toolbar  TYPE stb_button.
      Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
      Append a new button that to the toolbar. Use E_OBJECT of
      event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
      This class has one attribute MT_TOOLBAR which is of table type
      TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE'        TO ls_toolbar-function.
    MOVE  icon_change    TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change'        TO ls_toolbar-text.
    MOVE ' '             TO ls_toolbar-disabled.
    APPEND ls_toolbar    TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
      Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    5) In the PBO module, crate object for event handler and set handler
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    6) In the PBO module after the CALL METHOD go_grid->set_table_for_first_display, raise event
    toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
    Set focus to the grid
    After CALL METHOD go_grid->set_table_for_first_display insert the following statement:
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    Set the title of the grid
    Fill the grid_title field of structure lvc_s_layo.
    Note that the structure lvc_s_layo can be used for to customize the grid appearance in many ways.
    DATA:
    ALV control: Layout structure
    gs_layout TYPE lvc_s_layo.
    Set grid title
    gs_layout-grid_title = 'Flights'.
    CALL METHOD go_grid->set_table_for_first_display
       EXPORTING i_structure_name = 'SFLIGHT'
                               is_layout               = gs_layout
       CHANGING   it_outtab               = gi_sflight.
    Customize the appearence of the grid
    The structure lvc_s_layo contains fields for setting graphical properties, displaying exceptions, calculating totals and enabling specific
    interaction options.
    Fill the apporpiate fields of structure lvc_s_layo and insert it as a parameter in the CALL METHOD
    go_grid->set_table_for_first_display. See the example under Set the title of the grid.
    If you want to change apperance after list output, use the methods get_frontend_layout and set_frontend_layout.
    Examples of fields in structure lvc_s_layo:
    GRID_TITLE Setting the title of the grid
    SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:
    ·        A Multiple columns, multiple rows with selection buttons.
    ·        B Simple selection, listbox, Single row/column
    ·        C Multiple rows without buttons
    ·        D Multiple rows with buttons and select all ICON
    Setting and getting selected rows (Columns) and read line contents
    You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows
    and set_selected_rows. There are similar methods for columns.
    Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected
    row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
    Data declaration:
    DATA:
    Internal table for indexes of selected rows
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    Example 1: Reading index of selected row(s) and using it to read the grid table
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
         textline1 = 'You must choose a valid line'.
    EXIT.
    ENDIF.
    LOOP AT gi_index_rows INTO g_selected_row.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Example 2: Set selected row(s).
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
    exporting
    it_index_rows = gi_index_rows.
    ENDIF.
    Make an Exception field ( = Traffic lights)
    There can be defined a column in the grid for display of traffic lights. This field is of type Char 1, and can contain the following values:
    ·        1 Red
    ·        2 Yellow
    ·        3 Green
    The name of the traffic light field is supplied inh the gs_layout-excp_fname used by method set_table_for_first_display.
    Example
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
    TYPES:  traffic_light TYPE c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
      Set the exception field of the table
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
        g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
      Name of the exception field (Traffic light field)
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
      Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
                         is_layout               = gs_layout
    CHANGING  it_outtab                 = gi_sflight.
    Color a line
    The steps for coloring a line i the grid is much the same as making a traffic light.
    To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-line_color    = 'C610'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
                        is_layout                = gs_layout
    CHANGING  it_outtab                 = gi_sflight.
    Refresh grid display
    Use the grid method REFRESH_TABLE_DISPLAY
    Example:
    CALL METHOD go_grid->refresh_table_display.
    Complete code for the ALV grid example
    This example shows and ALV grid with flights. After selecting a line a change button can be pushed to display a change screen. After
    the changes have been saved, the ALV grid screen is displayed again, and the grid is updated with the changes.
    The example shows:
    ·        How to setup the ALV grid
    ·        How to ste focus to the grid
    ·        How to set the title of the grid
    ·        How to allow a user to save and reuse a grid layout (Variant)
    ·        How to customize the ALV grid toolbar
    ·        Refresh the grid
    ·        Set and get row selection and read line contents
    ·        Make and exception field (Traffic light)
    ·        Coloring a line
    Steps:
    ·        Create screen 100 with the ALV grid. Remember to include an exit button
    ·        Add a change button to the ALV grid toolbar
    ·        Create screen 200 the Change screen
    The screens: 
    The code:
    REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L   I N T E R N  A L   T A B L E S
    *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
    TYPES: BEGIN OF st_sflight.
      INCLUDE STRUCTURE zsflight.
          Field for traffic light
    TYPES:  traffic_light TYPE c.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    G L O B A L   D A T A
    DATA: ok_code         LIKE sy-ucomm,
        Work area for internal table
    g_wa_sflight    TYPE st_sflight,
        ALV control: Layout structure
    gs_layout       TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid             TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container,
    o_event_receiver    TYPE REF TO lcl_event_receiver.
    DATA:
    Work area for screen 200
    g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
    DATA:
    Internal table
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
       e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
          CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal           TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu                    TYPE i VALUE 2,
    c_separator               TYPE i VALUE 3,
    c_radio_button            TYPE i VALUE 4,
    c_checkbox                TYPE i VALUE 5,
    c_menu_entry              TYPE i VALUE 6.
    DATA:
      ls_toolbar  TYPE stb_button.
      Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
      Append a new button that to the toolbar. Use E_OBJECT of
      event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
      This class has one attribute MT_TOOLBAR which is of table type
      TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE'        TO ls_toolbar-function.
    MOVE  icon_change    TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change'        TO ls_toolbar-text.
    MOVE ' '             TO ls_toolbar-disabled.
    APPEND ls_toolbar    TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
      Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
      PERFORM change_flight.
           LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    DATA:
      For parameter IS_VARIANT that is sued to set up options for storing
      the grid layout as a variant in method set_table_for_first_display
    l_layout TYPE disvariant,
      Utillity field
    l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
      EXPORTING
        it_index_rows = gi_index_rows.
    CALL METHOD cl_gui_cfw=>flush.
    REFRESH gi_index_rows.
    ENDIF.
    Read data and create objects
    IF go_custom_container IS INITIAL.
      Read data from datbase table
    PERFORM get_data.
      Create objects for container and ALV grid
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
      i_parent = go_custom_container.
      Create object for event_receiver class
      and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
      Layout (Variant) for ALV grid
    l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
      Set grid title
    gs_layout-grid_title = 'Flights'.
      Selection mode - Single row without buttons
      (This is the default  mode
    gs_layout-sel_mode = 'B'.
      Name of the exception field (Traffic light field) and the color
      field + set the exception and color field of the table
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
          Value of traffic light field
      g_wa_sflight-traffic_light = '1'.
          Value of color field:
          C = Color, 6=Color 1=Intesified on, 0: Inverse display off
      g_wa_sflight-line_color    = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
           g_wa_sflight-paymentsum < 1000000.
      g_wa_sflight-traffic_light = '2'.
    ELSE.
      g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
      Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
              is_variant       = l_layout
              i_save           = 'A'
              is_layout        = gs_layout
    CHANGING  it_outtab        = gi_sflight.
    *-- End of grid setup -
      Raise event toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
      Set focus to the grid. This is not necessary in this
      example as there is only one control on the screen
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
    MODULE user_command_0200 INPUT.
    CASE ok_code.
    WHEN 'EXIT200'.
    LEAVE TO SCREEN 100.
    WHEN'SAVE'.
    PERFORM save_changes.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Form  get_data
    FORM get_data.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    ENDFORM.                    " load_data_into_grid
    *&      Form  change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
    FORM change_flight.
    DATA:l_lines TYPE i.
    REFRESH gi_index_rows.
    CLEAR   g_selected_row.
    Read index of selected rows
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table  gi_index_rows will be empty
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
       EXPORTING
            textline1 = 'You must choose a line'.
    EXIT.
    ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
    LOOP AT gi_index_rows INTO g_selected_row.
    IF sy-tabix = 1.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
    CLEAR g_screen200.
    MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
    LEAVE TO SCREEN '200'.
    ENDFORM.                    " change_flight
    *&      Form  save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
    FORM save_changes.
    DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
    MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
    MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
      C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color    = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
       g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    clear g_wa_sflight-line_color.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    clear g_wa_sflight-line_color.
    ENDIF.
    MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    LEAVE TO SCREEN '100'.
    ENDFORM.                    " save_changes
    rgds,
    latheesh

  • Can we configure in GRID. which target DB is on Standard edition?

    Hi,
    I have GRID setup of 11gR1 and DB is 11gR2 Enterprise edition on Linux 64 bit
    I want to know, Can we install agent on Target server? But target server DB has STD edition of 10g.
    Please let me know if any one done with this.

    Hello,
    I have GRID setup of 11gR1 and DB is 11gR2 Enterprise edition on Linux 64 bit
    I want to know, Can we install agent on Target server? But target server DB has STD edition of 10g.Yes, you can have a Target server DB in 10g Standard Edition.
    However, the Repository of the Grid Control should be necessary in Enterprise Edition.
    NB: The Repository is a technical database. So you don't have to pay additional fees for it.
    Please have a look on this Note of My Oracle Support, it will give useful Certification Matrix:
    Oracle Enterprise Manager Grid Control Certification Checker (Doc ID 412431.1)Hope this help.
    Best regards,
    Jean-Valentin

  • Color the sub-total row in an alv-grid

    Hi all.
    I work on SAP 4.7 WAS6.20 and output a table with the cl_gui_alv_grid. I´m able to color special rows (or columns) in the alv grid. But I want to color individually the sub-total lines (like the lines before) and don´t want the yellow color for all of the sub-total lines.
    Do you know how to color the sub-total-lines?
    Thanks a lot.
    Michael

    Hi,
    U can color an individula row see the link below
    Color a line
    The steps for coloring a line i the grid is much the same as making a traffic light.
    * To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
    *       Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    * Loop trough the table to set the color properties of each line. The color properties field is
    * Char 4 and the characters is set as follows:
    * Char 1 = C = This is a color property
    * Char 2 = 6 = Color code (1 - 7)
    * Char 3 = Intensified on/of = 1 = on
    * Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    * Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    * Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight
    see the link
    http://www.sapgenie.com/abap/controls/alvgrid.htm

  • ALV GRID Using oo abap example

    Hi Friends,
    I am new to oo abap, Can any one give me a basic example how i can create alv grid in oo abap.
    regards,
    DVNS

    HI,
    Programming for ALV grid display using the classes involves  creation of a screen and calling it for display.
    Since there has to be a linking between the program and the screen we have created , this comes in the form of a container. We use two important classes during the programming for displaying ALV grid, CL_GUI_ALV_GRID and CL_GUI_CUSTOM_CONTAINER.
    Steps To Use ALV Grid in a Program
    1. Declare reference variables for,
           Container (class CL_GUI_CUSTOM_CONTAINER) and
           Grid (class CL_GUI_ALV_GRID)
    Example
    DATA: grid  TYPE REF TO cl_gui_alv_grid,
                custom_container  TYPE REF TO cl_gui_custom_container
    2. Create Standard Screen and a container on that screen  and give a name to that container ( Use custom control button from tool bar) . This name will be used to link the container we have created on the screen with the object reference of class CL_GUI_CUSTOM_CONTAINER, which we have declared in the first step
    3. Call the screen which has been created
    4. Instantiate the container control and the ALV Grid Control in PBO of the screen.
    Example
    IF custom_container IS INITIAL.
      CREATE OBJECT custom_container
             EXPORTING
            CONTAINER_NAME = ‘MY_CONTAINER'.
    CREATE OBJECT grid
           EXPORTING
           I_PARENT = custom_container.
    ENDIF
    5. For displaying the data, call the method set_table_for_first_display of object reference of CL_GUI_ALV_GRID.
    Example
    CALL METHOD grid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE               =
    I_BYPASSING_BUFFER            =
    I_CONSISTENCY_CHECK           =
    I_STRUCTURE_NAME              =
    IS_VARIANT                    =
    I_SAVE                        =
    I_DEFAULT                     =
    IS_LAYOUT                     =
    IS_PRINT                      =
    IT_SPECIAL_GROUPS             =
    IT_TOOLBAR_EXCLUDING          =
    IT_HYPERLINK                  =
    IT_ALV_GRAPHICS               =
    IT_EXCEPT_QINFO               =
    CHANGING
    IT_OUTTAB                     =
    IT_FIELDCATALOG               =
    IT_SORT                       =
    IT_FILTER                     =
    EXCEPTION
    INVALID_PARAMETER_COMBINATION =
    PROGRAM_ERROR                 =
    TOO_MANY_LINES                =
    others                        =
    EXPLANATION OF SOME IMPORTANT PARAMETERS.
    I_BYPASSING_BUFFER & I_BUFFER_ACTIVE :
    When the program is run for the first time, the fields present in the output table and their positions are stored in a buffer.  So the buffer is taken as reference for the successive executions.  In order to bypass this buffer the above parameter values should be ‘X’ and  ‘ ‘(space)  respectively. If these values are not passed  to the function module, the changes made in the structure of the internal table will not be reflected in the output.
    I_STRUCTURE_NAME:
    If the structure of your output table corresponds to a structure stored in the Data Dictionary (DDIC), the ALV Grid Control can use this information to generate the field catalog automatically. Pass the table structure as parameter. In this case, all fields of this DDIC structure are displayed in the list.
    IS_VARIANT :
    It allows the user to save and reuse the layout. It is a structure of type DISVARIANT and contain the display variant name. It  facilitates pre-assignment for a layout, rather than displaying report and then choosing displaying variant.
    I_SAVE:
    This single character variable specifies whether the user specific display variants can be saved or not.
    The I_SAVE "Options for saving layouts" parameter can have the following values:
    U Only user specific layouts can be saved
    X Only global layouts can be saved
    A Both user specific and global layouts can be saved
    Space Layouts can not be saved
    IS_LAYOUT:
    This structure of type LVC_S_LAYO
    is used to control the layout of the ALV.  Two important fields are:
    GRID TITLE. : Title of grid
    ZEBRA : Alternate lines in list are displayed in different colors.
    IT_FIELDCATALOG:
    This internal table of type LVC_T_FCAT
    is used to specify the position of various fields in the report itab.
    There are three ways we can fill the field catalog table
    1. Automatically through data dictionary structure (DDIC). In this case we pass the table structure to I_STRUCTURE_NAME.
    2. Manually in ABAP program. Filling the internal table of type LVC_T_FCAT
    1.                  . With each row corresponding to each column of output table. Each row of this table will hold value like
    i). TABNAME & FIELDNAME specifies the reference fields for F1 help
    ii). CTABNAME & CFIELDNAME specifies the reference fields for currency formatting
    iii). QTABNAME & QFIELDNAME specifies the reference fields for quantity formatting
    iv). SELTEXT_L holds the long description of the field
    v).  SELTEXT_M holds the medium description of the field
    vi). SELTEXT_S holds the small description of the field
    vii). KEY specifies the Key field ( cannot be hidden )
    viii). OUTPUTLEN species the output length of the field
    ix). DO_SUM specifies that subtotal is required on this field
    x). NO_OUT specifies a hidden field
    3.  Semi-Automatically by combining the above 2 procedures.
    Call function Module REUSE_ALV_FIELDCATALOG_MERGE and pass DDIC
    structure or the output table to generate the field catalog.
    Add additional Rows or modify existing properties of the fields to be displayed.
    METHODS OF IMPLEMENTING SOME EXTRA FEATURES
    Set focus to the grid
    After CALL METHODgrid->set_table_for_first_display insert the following stament:
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = grid
    Refresh grid display
    Use the grid method REFRESH_TABLE_DISPLAY
    Example:
    CALL METHOD grid->refresh_table_display.
    Set the title of the grid
    Fill the grid_title field of structure lvc_s_layo.
    DATA:
    gs_layout TYPE lvc_s_layo.
    gs_layout-grid_title = 'TITLE'.
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'structure name'
    is_layout               = gs_layout
    CHANGING   it_outtab               = Output table.
    The structure lvc_s_layo contains fields for setting graphical properties, displaying exceptions, calculating totals and enabling specific interaction options
    Event Handling
    We can handle the events triggered by
    1. User defined Text Output
    2. Mouse-controlled Actions
    3. Self-defined and Standard Functions
    Steps for Event Handling
    1. Define a (local) class for event handling
    2. Define a method for each event you need to handle
    3. Implement your event handler methods.
    4. Create Object of the above class
    5. Link used events and event handler methods of the  receiver object and the grid
    object.
    Example program : Handling “Double Click” Event
    Step1.Define a class.
    class lcl_my_event_receiver definition.
    public section.
    methods:
    handle_double_click
    for event double_click of cl_gui_alv_grid.
    endclass.
    Step 2. Implement the class
    class lcl_my_event_receiver implementation.
    method handle_double_click.
    message i001(zz) with ' double click event - Triggerd '.
    endmethod.
    endclass.
    Step 3. Declare and create Object for the local class defined and implemented in steps 1 and 2 respectively
    o_receiver   TYPE REF TO lcl_my_event_receiver   (Declaration)
    create object o_receiver.                                            (Instantiation)
    Step 4. Link the method for handling the event with the grid object in the PBO of screen after instantiating the grid object
    set handler o_receiver->handle_double_click for grid.
    EXAMPLE PROGRAM TO CHANGE A CLASSICAL REPORT OUTPUT TO A ALV GRID
    This can be used as a template program to convert a classical report layout to a ALV grid.
    Report<Report name>
    Grid data Declarations----------------------------------------------*
      INCLUDE ZVINALVD.
    Internal table for ALV grid
    TYPES: BEGIN OF T_ALV,
             Field1 like table-field1,
             Field2 like table-field2,
           END OF T_ALV.
    DATA: I_ALV  TYPE TABLE OF T_ALV.
    DATA: WA_ALV TYPE T_ALV.
    -Class declarations----
      INCLUDE ZVINALVE.
    Add a checkbox in selection screen for ALV grid display. If it is unchecked
    output will be of classical type.
    SELECTION-SCREEN BEGIN OF BLOCK box01.
    SELECTION-SCREEN: BEGIN OF LINE.                           
    SELECTION-SCREEN: COMMENT 4(30) ‘To display repot output as a ALV grid’.                  
    PARAMETERS: p_alv AS CHECKBOX.                             
    SELECTION-SCREEN: END OF LINE.                             
    SELECTION-SCREEN END OF BLOCK box01.
    START-OF-SELECTION.
    Fill the ALV grid internal table
    END-OF-SELECTION.
    IF P_ALV = ‘X’.
      PERFORM ALV_DISPLAY.
    ELSE.
      PERFORM CLASSICAL_DISPLAY.
    ENDIF.
    Alv Display
    FORM ALV_DISPLAY.
      CALL SCREEN 100.
    ENDFORM.
    Module  STATUS_0100  OUTPUT
    PBO for ALV Grid
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'GRID_DISPLAY'.
      DATA:
    For parameter IS_VARIANT that is used to set up options for storing
    the grid layout as a variant in method set_table_for_first_display
      l_layout TYPE disvariant.
      GS_LAYOUT-SEL_MODE = 'B'.
    Optimize column width
      GS_LAYOUT-CWIDTH_OPT = 'X'.
    Read data and create objects
      IF go_custom_container IS INITIAL.
    Create objects for container and ALV grid
        CREATE OBJECT go_custom_container
          EXPORTING container_name = 'ALV_CONTAINER'.
        CREATE OBJECT go_grid
          EXPORTING i_parent = go_custom_container.
    Create object for event_receiver class
    and set handlers
        CREATE OBJECT o_event_receiver.
        SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
        SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    Layout (Variant) for ALV grid
        l_layout-report = sy-repid. "Layout to report
    To built fieldcatalog
        PERFORM alv_build_fieldcatalog.
    Grid setup for first display
        CALL METHOD go_grid->set_table_for_first_display
          EXPORTING
                    is_variant      = l_layout
                    i_save          = 'A'
                    is_layout       = gs_layout
          CHANGING  it_outtab       = I_ALV
                    it_fieldcatalog = fieldcat.
    Raise event toolbar to show the modified toolbar
        CALL METHOD go_grid->set_toolbar_interactive.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Form ALV_BUILD_FIELDCATALOG.
    Store contents of selected line in a internal table
    FORM alv_build_fieldcatalog.
      CLEAR afield.
      afield-fieldname = 'FIELD1'.
      afield-tabname   = 'I_ALV'.
      afield-coltext   = ‘Field Name 1’.
      afield-lzero     = ' '.
      afield-key       = 'X'.
      afield-outputlen =  XX.
      APPEND afield TO fieldcat.
      CLEAR afield.
      afield-fieldname = 'FIELD2'.
      afield-tabname   = 'I_ALV'.
      afield-coltext   = ‘Field Name 2’.
      APPEND afield TO fieldcat.
    ENDFORM.                    " alv_build_fieldcatalog
    Module  USER_COMMAND_0100  INPUT
    PAI for ALV Grid
    MODULE USER_COMMAND_0100 INPUT.
      CASE OK_100.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Form  SELECT_LINE
    Store contents of selected line in a internal table
    FORM SELECT_LINE.
      DATA:l_lines TYPE i.
      REFRESH gi_index_rows.
      CLEAR   g_selected_row.
    Read index of selected rows
      CALL METHOD go_grid->get_selected_rows
        IMPORTING et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table  gi_index_rows will be empty
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines = 0.
        CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
             EXPORTING
                  textline1 = 'You must choose a line'.
        EXIT.
      ENDIF.
    Read indexes of selected rows.
      LOOP AT gi_index_rows INTO g_selected_row.
        IF sy-tabix = 1.
          READ TABLE I_ALV INDEX g_selected_row-index INTO
                         WA_ALV.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " SELECT_LINE
    Includes:
    1. ZVINALVD for data declarations
    INCLUDE ZVINALVD .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    GLOBAL DATA FOR ALV GRID
    DATA:
    OK code for alv grid screen
      OK_100(4)           TYPE C,
    ALV control: Layout structure
      gs_layout           TYPE   lvc_s_layo,
    Declare reference variables to the ALV grid and the container
      go_grid             TYPE REF TO cl_gui_alv_grid,
      go_custom_container TYPE REF TO cl_gui_custom_container,
      o_event_receiver    TYPE REF TO lcl_event_receiver,
    Data for storing information about selected rows in the grid
    Internal table
      gi_index_rows       TYPE lvc_t_row,
    Information about 1 row
      g_selected_row      LIKE lvc_s_row.
    fieldcatalog
    DATA: fieldcat        TYPE LVC_T_FCAT,
          afield          TYPE LVC_S_FCAT.
    2. ZVINALVE for Class/object declarations
    INCLUDE ZVINALVE.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING e_object e_interactive,
          handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
            IMPORTING e_ucomm.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_toolbar.
    Event handler method for event toolbar.
        CONSTANTS:
    Constants for button type
            c_button_normal           TYPE i VALUE 0,
            c_menu_and_default_button TYPE i VALUE 1,
            c_menu                    TYPE i VALUE 2,
            c_separator               TYPE i VALUE 3,
            c_radio_button            TYPE i VALUE 4,
            c_checkbox                TYPE i VALUE 5,
            c_menu_entry              TYPE i VALUE 6.
        DATA: ls_toolbar              TYPE stb_button.
    Append seperator to the normal toolbar
        CLEAR ls_toolbar.
        MOVE c_separator TO ls_toolbar-butn_type..
        APPEND ls_toolbar TO e_object->mt_toolbar.
    Append a new button that to the toolbar. Use E_OBJECT of
    event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
    This class has one attribute MT_TOOLBAR which is of table type
    TTB_BUTTON. The structure is STB_BUTTON
        CLEAR ls_toolbar.
        MOVE 'DISPLAY'        TO ls_toolbar-function.
        MOVE  icon_DISPLAY    TO ls_toolbar-icon.
        MOVE 'Displaying customer' TO ls_toolbar-quickinfo.
        MOVE 'Display'        TO ls_toolbar-text.
        MOVE ' '             TO ls_toolbar-disabled.
        APPEND ls_toolbar    TO e_object->mt_toolbar.
      ENDMETHOD.
      METHOD handle_user_command.
    Handle own functions defined in the toolbar
        CASE e_ucomm.
          WHEN 'DISPLAY'.
            PERFORM SELECT_LINE.
        ENDCASE.
    ENDMETHOD.
    Reward if useful

  • Oracle grid and db installer fails upon launch - win7x64

    Hi. First let me say this is not my first time installing Oracle. I have installed oracle on Linux (just DB, ASM + DB) and Windows 7 x64 (just DB) successfully in the past. I've been working with Oracle for several years now. I'm a developer, not a DBA.
    I'm attempting a new development installation on my home computer, which is running Windows 7 64-bit. I've downloaded the 64 bit media for the database and grid infrastructure.
    My machine is a quad core i5 with 8GB ram. The storage is as follows:
    1 x 64GB SSD (C: drive with Windows installation, 20GB free)
    1 x 3TB spinning (D: drive, all program data, 2.8TB free)
    4 x 1TB spinning (unmounted, unformatted, for use with ASM)
    I have installed both the 32 bit and 64 bit current JDK.
    I am logged in as an Administrator.
    I have the oracle installation media in:
    D:\Temp\grid
    D:\Temp\database
    I have the ORACLE_BASE system environment variable set to:
    D:\Oracle (this directory exists, and is empty)
    Steps to produce problem:
    Start > All Programs > Accessories > Terminal (Right click, run as Adminstrator)
    Command Prompt input pasted below:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.
    C:\Windows\system32>D:
    D:\>cd \temp\grid
    D:\Temp\grid>setup
    D:\Temp\grid>
    Oracle installer quits immediatly
    I am left with an install actions log file in D:\Users\myuser\AppData\Local\Temp\OraInstall<currenttimestamp>\
    The log file contains:
    Using paramFile: D:\Temp\grid\install\oraparam.ini
    Checking monitor: must be configured to display at least 256 colors. Actual 4294967296 Passed
    The number of files bootstrapped for the jre is 0.
    The number of files bootstrapped for the oui is 0.
    There are no errors in the Windows event viewer.
    Any steps as to what I can check would be great, I've never seen this behavior before. Thanks.

    Wow. I found the solution buried here: Re: Can't run Oracle 11g r2 setup.exe on win2008 r2 sp1 x64
    Apparently if the amount of free space is too great (you're kidding me, right Oracle?!) the installer will just die. Sounds like a bug that someone should look into fixing....
    So from the post I've mentioned above, I gather that you need less than 2 TB of free space. I navigated to my D drive and did the following:
    D:\Temp>fsutil file createnew imhuge.dat 1024000000000
    File D:\Temp\imhuge.dat is created
    Now, the OUI happily starts.

  • Issue with Grid POV

    Hi ,
    We have a report where in the GRid pov, we have set 3 dimensions as 'User Point of View" and others locked for a specific member..
    We recently migrated from V7 to V11 and we are running into a issue where the lock on the dimensions goes away and all the dimensions are set to 'user Point of view"...Is there a way to fix this?
    For Ex:
    I have a dimension called "Scenario" set to 'Actual" and it is locked..
    but when I run the report , it brings it up as a User POV...

    When you right click on the Grid setup and click "Grid Point of View" does it show "Actual" grayed out?

  • Multiple selection in DISPLAY only ALV GRID

    Hi,
    I would like to make the rows of the ALV Grid Display only at the same time I would like to make multiple selection possible.
    Multiple selection is possible by giving EDIT = 'X' at the layout level. But then if we give EDIT = ' ' at the fieldcatalogue level or no_input = 'X' at the layout level it is still in Editable mode. Kindly help me.
    Thanks

    Hi,
    Setting and getting selected rows (Columns) and read line contents
    You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
    Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
    Data declaration:
    DATA:
    Internal table for indexes of selected rows
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    Example 1: Reading index of selected row(s) and using it to read the grid table
      CALL METHOD go_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines = 0.
        CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
             EXPORTING
                  textline1 = 'You must choose a valid line'.
        EXIT.
      ENDIF.
      LOOP AT gi_index_rows INTO g_selected_row.
         READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
        ENDIF.
      ENDLOOP.
    Example 2: Set selected row(s).
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines > 0.
        CALL METHOD go_grid->set_selected_rows
            exporting
              it_index_rows = gi_index_rows.
      ENDIF.
    Make an Exception field ( = Traffic lights)
    There can be defined a column in the grid for display of traffic lights. This field is of type Char 1, and can contain the following values:
    1 Red
    2 Yellow
    3 Green
    The name of the traffic light field is supplied inh the gs_layout-excp_fname used by method set_table_for_first_display.
    Example
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
    TYPES:  traffic_light TYPE c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
      Set the exception field of the table
        LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-traffic_light = '1'.
          ELSEIF g_wa_sflight-paymentsum => 100000 AND
                 g_wa_sflight-paymentsum < 1000000.
            g_wa_sflight-traffic_light = '2'.
          ELSE.
            g_wa_sflight-traffic_light = '3'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
      Name of the exception field (Traffic light field)
        gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
      Grid setup for first display
        CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                  is_layout               = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Color a line
    The steps for coloring a line i the grid is much the same as making a traffic light.
    To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Refresh grid display
    Use the grid method REFRESH_TABLE_DISPLAY
    Example:
    CALL METHOD go_grid->refresh_table_display.
    ALV Grid Control with column and row selection
    Selecting and Deselecting Rows
    Use
    Depending on where the ALV grid control is used, there are various methods for selecting and deselecting cells and rows:
    If no pushbuttons are displayed on the left edge of the list:
    You can only select one row at a time.
    You can select multiple rows.
    If pushbuttons are displayed on the left edge of the list:
    You can select several rows or individual cells.
    You can select several rows as well as several cells or individual cells.
    Procedure
    If no pushbuttons are displayed on the left edge of the list, you select a row by clicking an entry in the row.
    If pushbuttons are displayed on the left edge of the list, you select a row by clicking the pushbutton on the relevant row.
    In this case, you select the relevant cell by selecting the entry in the row.
    In both cases:
    To select several rows, press the Shift button and choose the cells as described above.
    Adjacent rows:
    Select a row, choose Shift or Control, and select the desired rows,
    or
    Choose Shift, and select the first and the last of the desired rows,
    or
    Select a row, keep the mouse button pressed, and pass over the desired rows.
    Rows that are not adjacent:
    Select a row, choose Control, and select the desired rows.
    All rows:
    You can only select all rows at once if pushbuttons are displayed on the left side of your list. To select all rows, choose .
    To deselect individual rows, press the Ctrl button and click the relevant row.
    Result
    The selected cells have an orange background. The position of your cursor is indicated with a yellow background.

  • GRID 3D VIsualization tool...any ideas?????

    HI all,
    Hope you are doing well,
    I am a Masters Student of Server Side Development, and Looking for a project in Java and GRID. I have decided to build a computational GRID using Java RMI but can't think of any interesting real world application. Ideally I want to develop a 2D/3D visualization tool that utilize the computational GRID setup and keep me up on my toes for three months...feel free to express any other interesting topics in java and grid...
    Thanx in Advance..
    Tanvir

    Ok figured it out. "Snap to" selection.
    Select snap to "division"

  • Java RMI GRID Project

    HI all,
    Hope you are doing well,
    I am a Masters Student of Server Side Development, and Looking for a project in Java and GRID. I have decided to build a computational GRID using Java RMI but can't think of any interesting real world application. Ideally I want to develop a 2D/3D visualization tool that utilize the computational GRID setup and keep me up on my toes for three months...feel free to express any other interesting topics in java and grid...
    Thanx in Advance..
    Tanvir

    HI! though i have no project for you but i think you can help me with my porblem, as i will be very thankful to u as it is realted to grid computing and i m new in rmi , since i have just done the hello world example.. below is the scenario:
    the problem is that a client comes and right like this for e.g; sqr(log(sin(n)))
    then this n value will first go to sqr server , then to log and at the end to the sin server which means that sin server will first return the value of the n to log and after the log is computed on the value which was return by the sin server, it will go to the log server and in the end the log server returns the log of that value to the client, as this phenomenon is called grid computing. this is the what i want...
    now, where i m stuck is that i know how to make a server and a client .. but i dont know how will i interact one server to the other and returning back the value ... pls help me with some coding of this or any tutorial if u have .. i will be vary glad if u help me in this i will really appreciate your corporation!
    thank you! waiting for ur reply u can also mail me on [email protected]
    yours sincerely
    Danish

  • Cloning-Grid control

    Hi,
    we have grid control setup to monitor our production database,we have some issues with grid control and we want clone to replicate the issues in test environment.Can we clone Grid setup. If so ,please let us know the procedure.
    Our Grid env details
    ==========
    ORACLE_HOME=/u01/oracle/db10g
    GRID_HOME=/u01/oracle/oms10g
    AGENT_HOME=/u01/oracle/agent10g
    can we clone all the 3 three?
    Regards,
    Mannu

    Hello,
    I've not seen any documentation to clone grid control i.e. OMS, db home, and agent home. However, if i had to do it, I would use the procedure to migrate Grid Control to a new machine and make some changes along the way.
    1. Install 2nd OMS in test environment pointing to existing repository.
    This will install OMS home and agent home on your test machine.
    2. Install db software on test machine and copy existing repository to test machine.
    3. Update OMS to point to this new repository.
    At this point, you have everything running in your test environment. However, the production OMS is "aware" of this OMS so you need to clean up the targets on your production OMS that points to your test environment and repeat the same thing for the test OMS so it's not "aware" of the production targets.
    If you need more details, let me know.
    HTH

  • Color a line in ALV Grid Control

    <<Do not ask for or offer points>>
    Hi all,
    How to color a line in ALV Grid Control using OOPs.
    The appropriate replies will be rewarded.
    regards,
    S Philip
    Edited by: Matt on Dec 22, 2008 11:05 AM

    <<Points unassigned - cut and paste not allowed.  http://sgstocks.tripod.com/alvgrid_control.htm>>
    Hi,
    To color a line, the structure of the  table must include a  Char4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Regards,
    John
    Edited by: Matt on Dec 22, 2008 11:18 AM

Maybe you are looking for