Using a ABAP SES TREX Index in KM

Dear Experts i have created a TREX index with transaction SES_ADMIN for data from the ABAP stack. Is it possible to use this index in EP with KM? The index is created in ABAP Stack and is available in TREX Administration tool.
I am hoping it is possible to manage this index with KM please tell me how this is possible.
Regards.
Martijn

Hi Martijn,
       No, you must create index in KM Portal. Then if you have integrated stack ABAP with TREX, you can see and manage all created indexes.
      Using TREX you also index ABAP, SAP PI or BI. It's very easy to do.
Regards,
Patricio.

Similar Messages

  • TREX Indexing

    Hi everyone!
    Does anyone ever experienced problems with TREX indexing after installing SES?
    In my project i've just setup SES and strangly Attached files are still being indexed on the old index queues and when i search for the content of the files using the TRM search it doesn't return the expected results.
    Many thanks.

    Hi Reddy,
    TREX Queue maintains both index and deindex call entires.
    Since you have deleted the ABC folder with 10 documents, it also has the deindex count of 10 .
    This is the reason why you have 22 indexed documents plus the previous 10 deindexed documents.
    You can check this by display queue entries and check for all synchronized documents.
    Regards,
    Srini

  • Context Search through TREX : Index Monitoring

    Hi,
    If you are using PI 7.1 with EHP1, then you can following threads to search the messages using Trex:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d05c14c3-34af-2b10-a1b1-fa2a39e0d2ae
    /people/niki.scaglione2/blog/2010/02/22/payload-searching-without-trex
    It should be there, sicne Trex server is installed.
    Else, you have to write the ABAP code for search:
    /people/sravya.talanki2/blog/2006/02/21/abap-based-trex-in-xi-proto
    Regards,
    Sushama

    Hi ,
       The global settings is valid for all components u have selected for indexing. You can use the default value itself.
    ther are parameters like
        1)     Maximum number of messages per package to be transferred to the TREX server
        2)     Maximum size in KB of message packages transferred to the TREX server
        3)    Time interval in minutes for the periodic transfer of message packages to the TREX server for indexing
        4)    Time interval in hours for the periodic reorganization of the index of a component on the TREX server
        5)    Time period in days for the retention period of messages in the index
        6)    Time interval in minutes for the periodic processing of the TREX queue
        7)     Maximum number of entries for processing in the TREX queue
    Also ther are filters  available. if the filter is empty then all the messages will get indexed and will be available in search,
    if u enter any details in filter option, then  that particular interface only be indexed and only indexed messages will be available for content base search. The use of filter will improve the performance in case of large message flow and also it will save your hardware resources. but make sure that all required interfaces will be available in filter or other wise will searching you will get confused.
    Regards
    Pradeep P N

  • TREX indexing from content server(maxdb)

    Hello.
    I've installed standalone TREX on Linux, configured the connection to R3 system and to Portal as well. On the R3 I have configured connection to the SAP Content serve(via archive link) where we save some documents(pdf, doc. files). The part which I don't understand is how can I configure the repository of the content server as a source for the Trex index?
    Any hint would be useful. Thanks in advance.
    Vit

    Hi,
    the question is what exactly do you wanna do?
    Integrating a archivelink in the Portal or indexing the documents via ERP?
    In the first case you must create a web repository and define an index.
    In the other case it depends on the SAP Solution but mostly you have to customize the SM59, SRMO, SKPR06.
    Best reagrds
    Frank

  • Transporting KM documents and TREX indexes

    Hi,
    We are planning to transport KM contents with folder permissions and their asscoiated TREX indexes to a new set of EP-KMC and TREX system.
    Can KM migration tool be used for transporting contents from one server to another with permissions.. Or shud we use ICE? Is there any recommended way ?
    How do we transport serach indexes from one server TREx installion to another of the same version..
    Any help ?
    Regards
    Bharathwaj

    Hi Bharathwaj,
    At the moment, the normal way to transport KM content (including ACL) is the ICE way. There are some known restrictions, see http://help.sap.com/saphelp_nw04/helpdata/en/e2/61701deb253242bea2ebeafa190e83/frameset.htm , but if you can live with that, it's the most straight forward way.
    I'm unsure if the migration tool can do that / how easy that would be; never used it.
    A real KM transport tool will be part of the next major release...
    TREX indexes are not transportable at the moment. You have to re-create them on the target system.
    Hope it helps
    Detlev

  • Read data from MDM For Lookup and Flat table using MDM ABAP API

    Hi,
    I have requriment to read data from MDM from FLAT and Lookup table using MDM ABAP API. My design  is like this ,
    I have one ITEMS (Main table in MDM) and inside that i have one Lookup flat table ITEM_TYPE , my requriment is to read Item number and its related Item type.
    From ABAP.
    Please help if any body has any idea.
    Regards,
    Shyam

    HI Guys,
    I found my solution by myself. Below is the solution , hope this will help others:-
    Retrieve data from MDM  using MDM ABAP API.
    Step- 1. Create structure in SAP with the same name as that of MDM field code for MDM Main table.
    Step-2. Create another structure in SAP having all  lookup fields of MDM , fieldname in ECC must be same as that of MDM field
    code.
    Step-3.Create structure in SAP for  individual lookup field(Single Field only)   with the same name as MDM Field code.
    Step-4.
    DATA: IT_QUERY            TYPE STANDARD TABLE OF MDM_QUERY,  "MDM_QUERY_TABLE,
          WA_QUERY            TYPE  MDM_QUERY,
          WA_CDT_TEXT         TYPE  MDM_CDT_TEXT,
          IT_RESULT_SET_KEY   TYPE  MDM_SEARCH_RESULT_TABLE,
          WA_RESULT_SET_KEY   TYPE  MDM_SEARCH_RESULT,
          WA_STRING           TYPE  STRING.
    DATA:<Internal table> TYPE STANDARD TABLE OF <SAP Str Having all LOOKup Fields>    
    DATA: :<Internal table>TYPE STANDARD TABLE OF <SAP Str one LOOKup field>,
         <Workarea> LIKE LINE OF :<Internal table>.
    *PASS LOGICAL OBJECT NAME.
    V_LOG_OBJECT_NAME = 'Logical object name defined in Customization'.
    Define logon language, country & region for server
    WA_LANGUAGE-LANGUAGE = 'eng'.
    WA_LANGUAGE-COUNTRY = 'US'.
    WA_LANGUAGE-REGION = 'USA'.
    TRY.
        CREATE OBJECT LR_API
          EXPORTING
            IV_LOG_OBJECT_NAME = V_LOG_OBJECT_NAME.
    ENDTRY.
    CONNECT to repository. Apply particular logon language info
    CALL METHOD LR_API->MO_ACCESSOR->CONNECT
      EXPORTING
        IS_REPOSITORY_LANGUAGE = WA_LANGUAGE.
    *NOW PASS ITEM NO AND GET KEY FROM MDM.
    CLEAR WA_QUERY.
    WA_QUERY-PARAMETER_CODE  = <MDM FIELD CODE>. "Field code
    WA_QUERY-OPERATOR        = 'EQ'. "Contains
    WA_QUERY-DIMENSION_TYPE  = 1. "Field search
    WA_QUERY-CONSTRAINT_TYPE = 8. "Text search
    WA_STRING                = <Field Value>.
    GET REFERENCE OF WA_STRING INTO WA_QUERY-VALUE_LOW.
    APPEND WA_QUERY TO IT_QUERY.
    CLEAR WA_QUERY.
    *PASS ITEM NUMBER AND GET RELATED KEY FROM MDM.
    TRY.
        CALL METHOD LR_API->MO_CORE_SERVICE->QUERY
          EXPORTING
            IV_OBJECT_TYPE_CODE = <MDM Main Table>
            IT_QUERY            = IT_QUERY
          IMPORTING
            ET_RESULT_SET       = IT_RESULT_SET_KEY.
      CATCH CX_MDM_COMMUNICATION_FAILURE .
      CATCH CX_MDM_KERNEL .
      CATCH CX_MDM_NOT_SUPPORTED .
      CATCH CX_MDM_USAGE_ERROR .
      CATCH CX_MDM_PROVIDER .
      CATCH CX_MDM_SERVER_RC_CODE .
    ENDTRY.
    Pass record id into keys.
    LOOP AT IT_RESULT_SET_KEY INTO WA_RESULT_SET_KEY.
      WA_KEYS = WA_RESULT_SET_KEY-RECORD_IDS.
    ENDLOOP.
    WA_RESULT_SET_DEFINITION-FIELD_NAME = <Look field name>.
    APPEND WA_RESULT_SET_DEFINITION TO IT_RESULT_SET_DEFINITION.
    CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE
      EXPORTING
        IV_OBJECT_TYPE_CODE      = <MDM Main Table>
        IT_RESULT_SET_DEFINITION = IT_RESULT_SET_DEFINITION
        IT_KEYS                  = WA_KEYS
      IMPORTING
        ET_RESULT_SET            = IT_RESULT_SET.
    LOOP AT IT_RESULT_SET INTO
            WA_RESULT_SET.
    *PASS KEYS INTO MAIN TABLE TO GET Structure for FALT or Look up Table
      TRY.
          CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
            EXPORTING
              IV_OBJECT_TYPE_CODE = <MDM Main Table>
              IT_KEYS             = WA_KEYS
            IMPORTING
              ET_DDIC_STRUCTURE =<SAP Strct having all Look up fileds of MDM>         
      ENDTRY.
      LOOP AT <SAP Strct having all Look up fileds of MDM> INTO <Work area>.
        CLEAR WA_KEYS.
        APPEND <Work area>-field name TO WA_KEYS.
        CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
          EXPORTING
            IV_OBJECT_TYPE_CODE = <MDM Lookup table name>
            IT_KEYS             = WA_KEYS
          IMPORTING
            ET_DDIC_STRUCTURE   = <Single Structure in SAP For Lookup field>.
        READ TABLE <Single Structure in SAP For Lookup field>. INTO <Work Area> INDEX 1.
    Here you can get the value of realted lookup fields associated with main table data.
      ENDLOOP.
    ENDLOOP.
    LR_API->MO_ACCESSOR->DISCONNECT( ).
    Edited by: Shyam Babu Sah on Nov 24, 2009 4:52 AM

  • Extending TREX indexes

    Hi Experts,
    may I request, can anyone suggest whether it is possible to extend TREX indexes, how it is done, if it possible to extend the search interfaces for TREX in ABAP?
    With unfeigned regards,
    Ramana Malladi

    Hi,
    It seems that you have not the actual TREX version and there is some database incompatibilities.
    Download the actual version from service.sap.com:
    TREX 6.1 for Search and Classif. (TREX) (From SP000 To SP025 or higher (Recommendation: SP027))
    Greetings,
    Praveen Gudapati
    [Points are always welcome for helpful answers]

  • Portal Search Not Working - Only Returns Portal Content, Not TREX Indexes

    I have configured two indexes using the portal.  One is for documents that reside on the portal, and the other one is for a website that we have configured in TREX using Cruiser.  The TREX Admin console shows that the website information has been indexed.  However, when I search on a word in Portal, only the portal contents are displayed.  Is there a different search field for looking up TREX/indexed files?  I'm using the search field that's on the front page of the portal.  Also, both indexes belong to the same index group.  I did use the serach feature built-in to TREX Admin to verify that there were documents stored in the index.

    Please check Below Link
    http://help.sap.com/saphelp_nw04/helpdata/en/46/5d5040b48a6913e10000000a1550b0/frameset.htm
    And Edit Crawler Parameter's field Follow Redirects on Web-Sites to YES

  • Where are TREX index stored? TREX server File system? or KM repository?

    hi, friends:
    can  someone tell me where are TREX index stored ?
    in TREX server file system?
    or in portal KM repository? file system or DB?
    thank you
    Carol

    Carol,
    TREX is a separate product. During installation and configuration of TREX you connect it to the portal. The search iViews of the portal will use the configured TREX server to do the actual search:
    SAP Help: http://help.sap.com/saphelp_nw70/helpdata/EN/a4/929d4206b70931e10000000a1550b0/content.htm
    The index is stored on the TREX server: TREX/IndexServer/basepath/index=%(SAP_RETRIEVAL_PATH)/index
    SAP Help: http://help.sap.com/saphelp_nw70/helpdata/EN/4c/d91e40777cdd5fe10000000a155106/content.htm
    br,
    Tobias

  • Webinar: Understanding TREX Indexing and Search Options

    <b>SAP NetWeaver Know-How Network Webinar: 
    Understanding TREX Indexing and Search Options
    Wednesday 25 August 2004
    11 a.m. EDT</b>
    On Wednesday 25 August, Larry Brambrut, an EP RIG Consultant, hosts the webinar titled  <b>Understanding TREX Indexing and Search Options</b> as part of the ongoing SAP NetWeaver Know-How Network Webinar Series.
    Here’s how Larry describes his webinar presentation:
    “This session will describe the enhancements to "Search and Classification"(TREX) in NetWeaver '04 and EP 6.0 SP2 Patch 6. The session will include a discussion of the CM enhancements such as new crawlers, new search UI options and plug-ins, and TREX enhancements such as the new TREX architecture, delta indexing, and new TREX Admin Tool.”
    SDN invites you to post your questions to the presenter prior to the webinar and continue the online discussion afterward.
    <b>How to Participate</b>
    (Please go to the SDN webinar schedule page to find more information)
    Dial-in Information:
    Date: Wednesday 25 August 2004
    Time: 11 a.m. EDT
    Within the U.S., call: +1.888.428.4473
    Outside the U.S., call: +1.651.291.0618
    Password: NetWeaver04
    WebEx Information:
    Topic: SAP NetWeaver Know-How Network
    Date: Wednesday 25 August 2004
    Time: 11 a.m. EDT
    Meeting Number: 742391500
    Meeting Password: netweaver04 (lowercase)
    WebEx Link: sap.webex.com
    Replay Information:
    A recorded replay of this call will be available for approximately three months after the webinar. Access this recording by dialing the appropriate number and using the replay access code 720155.
    Toll-free: +1.800.475.6701
    International: +1.320.365.3844
    <b>
    About the SAP NetWeaver Know-How Webinar Series</b>
    The SAP NetWeaver Know-How Webinar Series is driven by the SAP NetWeaver Regional Implementation Group (RIG), part of the SAP Development organization. The mission of the SAP NetWeaver RIG is to enable customers, employees, and partners to successfully implement the SAP NetWeaver solution. This SAP RIG has expertise in BI, EP, XI, and WebAS. They contribute their implementation expertise to the SDN implementation forums as well as to the SAP NetWeaver Know-How Webinar Series.
    <b>Disclaimer</b>
    SDN is not responsible for any changes to the webinar schedule. The webinar schedule may be changed or cancelled without prior notice.

    Hi there,
    I just read this thread, and maybe someone here can answer my current trex question:
    I have created an ordinary CM repository, and created an index with this repository as source. Now the problem: I would like to exclude files in the repository with specific mimetypes from the TREX indexing process.
    I have verified that the TrexValidMimetypes.ini does not contain any reference to the Mimetypes I'm creating, but never the less, the document titles are searchable and are returned when searching.
    How do I get around this issue?
    Is it possible in NW04 or EP6.0 SP3 PXXX??
    Regards,
    Hco

  • TREX – Indexed information by document type

    Hi,
    Where can i find documentation about what properties TREX indexes for each document type?
    For example: 
    - Each word document has the following properties (Title, Subject, Author, Manager, Company, Category, Comments Keywords, …). The PDF documents have similar properties. Is this information indexed by TREX?
    My question is related with AutoCAD documents. These documents contain legend information, and need to know if this information is indexed by TREX and can be used to search?
    Thanks and regards,
    John

    Hi,
    Check this thread:
    https://www.sdn.sap.com/irj/sdn/thread?threadID=140959
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers

  • Sharing TREX indexes between portal instances

    Hi people,
    We created several TREX search indexes in our development portal and we need to reuse them in our productive environment.
    As I read in Migrating Content, changing namespace I understand that the indexes cannot be transported between portal instances.
    My question is: Is there any way to access existing TREX indexes in new portal instances ?
    Thanks

    Hi Daniel,
    of course you can use the same TREX server from two different portals.
    I assume though, that the issue will be, that the resource IDs and subsequently access URLs will not be the same on the two portals. Or that, for other reasons, you will not be able to ensure abolute synchronicity of KM content in the two portals.
    => Cannot use same index for not exactly same content...
    Regards, Karsten
    PS: In this rough context, please also have a look at the linked thread and at the text below, concerning TREX use by totally different apps.
    TRex index_service
    When running several solutions against one TREX, currently you, in the project, have to ensure the following:
    - availability of a TREX Server release that is compatible to all the respective solution releases (check the PPMS or PAM entries of DMS, EP, SRM, etc.)
    - adequate sizing (see above link to distributed systems)
    - maintenance of the proper TREX address in all solutions
    AND MOST IMPORTATNTLY:
    Although TREX does offer index namespaces, most solutions do not address that yet and create indexes in one common directory on the TREX Server.
    Thus, if more than one of the solutions creates technical index names on the TREX Server that are likely to reoccur (e.g. "Test" is created on TREX Server with that directory name, rather than with some techID as directory name), you have to educate the future administrators/powerusers of the project to create only indexes that follow a naming conventiont to avoid index name conflicts (e.g. start all index names with solution prefix "DMS_...", "xRPM_...")
    Note:
    Using one TREX instance instead of several only provides "IT-side integration". It does not produce an information integration. Each solution will only search in its own indexes.
    An enterprise search over KM, ERP, BI and more will be offered with the SAP NetWeaver release <b>after</b> 2004s.

  • TREX indexing encrypted files

    Hello,
    In the context of an upgrade of e-recruiting (from 3.0 to 6.0) we installed a new Trex (release 7.10).
    I recreated all indexes and I have problems with two files.
    This files are uploaded by applicant and they are encrypted.
    I have errors into the preprocessing because this files are encrypted.
    In this moment I have two questions :
    a) How can I index this two files ?
    b) How can I decide into my ABAP server (e-recruiting) that I don't want to index this files ?
    Thanks for your help
    Dominique

    Hi Paulo,
    TREX indexes the file name and the content of the file for all files, including Excel files. I have come across several different issues with TREX not being able to index certain Excel files due to filter bugs. Check TREX 7.10 central Note 1021162 for a listing of the different revs.
    Are you having issues trying to index a file? If so, what error are you getting?
    Thanks!
    -Stephen Spalding

  • TREX indexing error

    Hi people, I'm trying to create an index in EP 6.40 SP18 but when created, the following error appears if I try to reindex:
    Wrong operation clearing index failed:QS error: queue not cleared;location=hermes:31003,index=inox_bd_om (Errorcode 6030)
    I've checked in TREX monitor that all the component are green, so any idea what could be the reason? (I also have checked in Visual Administrator that server name and port are ok in TREX service).
    Thanks to all!
    Jesús Ruiz

    Jesús Ruiz,
    It looks like the clear queue command is failing.  What happens if you clear the queue using TREXAdmin on the TREX OS?  In the queue topic select the queue and right click one of the options is Clear.
    Best regards,
    Duncan

  • Open a Browser using OO ABAP

    Hello,
    Is there any way to open and close browser using OO ABAP?
    Points will be rewarded for suitable answers.
    Regards,
    Pagal

    Hi this will help u.
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    Example:
    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
    chk this blog
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    with regards,
    Hema Sundara.
    reward if found helpful.

Maybe you are looking for