Alv drilldown-fields are hiding in secondary list-when layout option used

hey guys,
i displayed alv grid using fms.
the basic list has default layout option.
but when user gives a deault layout,and try to see secondary list,the fields appear as hidden.
one has to unhide them manualy to see.

Kumar,
  Check the Field catalog Before displaying Secondary list, If NO_OUT is set for Hidden fields.
Thanks,
Kishore

Similar Messages

  • Why fields are not shown in list form ?

    Hello,
    I have performed below steps to create list programmatically in my project :
    Programmatically created content types having columns named – Contact Email,Contact Person,Location,Type and Postion.
    I manually created list named test and attached above content type.
    Issue: Content type has been created and attached to the list named
    test.I added columns from content type to list via modify view.
    However when I click on Add new item, I am unable to see the content type fields in the form.
    I can see only inbuilt Title field in list form while above fields are not there.
    Any idea what can be the possible reason for this and how to resolve it?
    Thanks and Regards,
    Dipti Chhatrapati

    Refer this article
    The Microsoft.SharePoint.SPFieldCollection.AddFieldAsXml method
    http://blogs.msdn.com/b/sharepointdev/archive/2011/01/20/why-do-my-new-list-fields-not-appear-on-the-new-edit-or-display-forms.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Why are input-output lights flashing when not in use? Pirated signal?

    I have my airport base station set up to not make itself public (ie. you must type the name of the network and password for it to appear and let you in). However, I noticed the other morning when I got up (in the dark!) that the lights were flashing like crazy. It really looks like it is in use. Is there anyway to minitor whether or not somebody is stealing signal from me, or is there another explanation?
    Thanks!

    I also can state that it is absolutely normal behavior and nothing to worry about (there is always some network traffic).
    Regarding security, if you really think that could be an issue, you should allow only devices their MAC addresses have been registered to the AirPort to get access.
    This does not take effect to encryption, but prevents unauthorized people (e.g. your neighbor) to share your WLAN network - regardless if they know your password or not.
    Settings are done at the AirPort maintenance software: Select the station, click on "configure", on new window select the tab "Access" and then add the MAC addresses of all devices that are allowed being connected.
    (Note that I use the German version of the AirPort maintenance software, so I'm not sure if I named it correctly).
    MAC addresses are located on all network cards or their packaging, bottom of notebooks (if they have a (W)LAN adapter; remove battery in case you can't find it, sometimes it is hidden there) or somewhere at the back panel of your desktop computer with integrated (W)LAN adapter.
    Just to explain: MAC addresses are unique to each device, they should never appear twice in the World; therefore this is a very safe solution.
    And if you not care much about encryption, you can turn it off completely and profit from faster network access (but this is at your own risk).

  • What are the mapfiles for and when should I use them?

    Hi,
    what are the map files for and why/when should I use them?
    /usr/lib/ld/map.noexstk
    usr/lib/ld/map.noexbss
    /usr/lib/ld/map.noexdata
    /usr/lib/ld/map.pagealign

    Hi, I'm sure you've read the comments, but for the benefit of those who haven't: /usr/lib/ld/map.noexstk # Linker mapfile to create a non-executable stack definition within an # executable. /usr/lib/ld/map.noexbss # Link-editor mapfile to create a non-executable bss segment definition # within an executable. /usr/lib/ld/map.noexdata # Link-editor mapfile to create a non-executable data segment definition # within an executable. These stop the various segments from being executable. Which could reduce the risk surface for exploiting security holes in an application. /usr/lib/ld/map.pagealign # Linker mapfile to create page-aligned data within an executable. Aligning the start of the data segment can reduce the number of TLB entries needed to map the data. So the smallest TLB page size is 8KB, then we have 64KB, then 4MB etc. If the data starts on a 4MB boundary then it can be mapped with 4MB pages, if not then it has to be mapped with 8KB pages until a 64KB boundary, then 64KB pages until we get to a 4MB boundary. You sometimes get a bit of performance from this, but you may also get performance stability from it. If the mapping is random sometimes it works well, sometimes it works less well. Regards, Darryl.

  • ALV drilldown not possible in report once i apply layout save option

    Hi All,
    I have developed one ALV report.
    Firstly i use drill down in the report means call transaction by double click event.
    Then i apply layout save option in same report.
    But as soon as i apply layout save option the call transaction is not possible.
    How to resolve this problem.
    Regards,
    Deepak.

    Hi,
    when you applied save button did you use any other PF status apart froms standard ALV pf-status..
    if so...
    go to the pf-status which you have declared ...
    then go to the function keys...
    under Recommended Function Key Settings for the F2 key  set the function code as
    &IC1
    this will resolve your issue
    Regards,
    Siddarth

  • ALV Grid fields from editable to non-editable mode

    Hi,
    I am displaying my data through ALV Grid. In my grid the non-key fields are in editable mode.
    When I edit any of the editable fields and place the cursor on other field the field which I have edited should become disable(non-editable). Again if I want to edit the same field which is now in non-editable mode should again change to editable mode when the cursor is placed on it.
    Thanks & Regards,
    Adithya M.

    Hi Adithya,
    I am confused by your statement "place the cursor on other field the field which I have edited should become disable" -- are you stating that this is the requirement or what is currently happening with your program.  The way the edit fields should work by default is they are editable at all times unless you tell it otherwise. 
    If you are saying your requirement is to change the field to disabled once the field is edited (runtime change), first you want to handle the event on data changed then within your method of handling on data changed, you can disable the field from being edited by using cell styles and changing the value to disabled. 
    If you look at program BCALV_GRID_EDIT,
    You will find code where it disables the field for edit using Cell Style -- this will give you an idea how Cell Style controls editable fields and display fields:
            ls_cell-style  = cl_gui_alv_grid=>mc_style_enabled.
            ls_cell-maxlen = 4.
            ls_cell-fieldname = 'CARRNAME'.
            append ls_cell to gt_sflight-cell.
    This specific code will set the field disabled when the program is first exectued, in your case if you need to do this at run time, after someone edits the field, you need to implement handling the event on data changed, in the same program you will find:
    method handle_data_changed.                 
       perform data_changed using er_data_changed.
    endmethod.                     
    It is within this method that you can disable a field for editing.
    However, once it is disabled you will not get back into the handle_data_changed method.  I'm not sure I understand your statement "Again if I want to edit the same field which is now in non-editable mode should again change to editable mode when the cursor is placed on it."  Why would you want the user to be able to edit something, then show it disabled, then let them click on it and edit it again?  Why not just leave it in edit mode?  Maybe if I understand the requirement better, I can answer this portion of the question. 
    If this is based on security or changing from edit to display for the entire grid, you can run the same program mentioned above and click on the Change/Display button in the top left to see how it enables and disables the entire grid for editing.
    Cheers,
    Bonnie

  • Sharepoint Document Information Panel (DIP) and Taxonomy fields are readonly

    In SharePoint 2010 I have a document template with custom content type. When I add new document to a document library Word 2010 opens but taxonomy fields are in read only mode. If I try to save the file then it gives me error that requires the read only
    fields to be filled in. After that I can fill in the taxonomy fields. This happens on my computer with Word 2010 but in the same environment it doesn't happen with some other users. How can I make some changes that taxonomy fields can be filled in the first
    attempt?

    I was facing the same issue on SharePoint 2013 with Word 2013. 
    Everything was working until I decided to install April 2015 CU, while updating the CU I had to cancel the update and since then I was facing different issues. 
    I restarted all app pools from IIS manager, later I noticed that Taxonomy fields are disabled in both list item properties and in Document Information Panel. 
    I ran configuration wizard for sharepoint 2013 and it fixed the problem for me. I hope that this will solve the problem for you as well.
    Thanks.

  • How do I fix my contacts which because of the iCloud are double and triple listed on my Mac, iPhone and iPad?

    I find that my contacts on my Mac book Pro, iPhone 4s, and iPad2 are double or triple listed.  I have used time machine to restore a clean set of contacts, but the cloud keep adding double and triple listings of contacts, making more of a mess that I started with. How do I clean this up and return to a normal set of contacts?

    Actually, I spent two days and all I did was make it worse. So, I finally called Apple and after an intense hour, she (apple) fixed it. I could never have done this myself. My problem was an obscure file in Address Book needed to be deleted and then I could reach back in Time machine and restore address book. Prior to that all my restores were by corrupted by iCloud. Until that file was deleted, I keep getting double entries. The file was something like .v22abcd.. But that was my problem, yours could be different

  • ALV flter fields where we can get.

    hi friends,
    i created a ALV report i placed upload button on the man bar. when we press it upload data using bdc conditions. it is working fine.
    but if user filter some data on the alv display using filter button, how can i get data which is showing on the alv display. can i get that data or not.
    thanq.
    rajesh.k

    Hi,
    create a field called BOX in your itab of lenght 1 and type c.
    do not display this in the ALV, ( no field cat for this )
    but in the layout - box_fieldname = 'BOX'.
    Now after the filter ask your user to select the rows by clicking the button which is available in the left side.
    so that those filtered and selected rows will be marked as 'X' in the box field in your internal table.
    Now you can get all the filtered as well as selected rows.
    Regards,
    Venkatesh

  • No events listed when syncing with iPhone

    When syncing with iTunes, events are no longer listed when choosing option s photos on the iPhone?? Why

    I confirmed that I have the radio button checked that says "Sync all Contacts", but not the one that specifically shows Yahoo! Address Book. So the question remains, why does iTunes consistently prompt me to sync Yahoo! Address Book? How can I stop that from happening?

  • Dynamic Change of FieldCatalog in OO ALV Secondary List

    Dear All,
    i have Scenario like when i go to secondary list on some event, the fieldcatlog for the info is generated. then again i go back and choose some other event, now the secondary fieldcatalog list should contain few extra fields which are not being displayed. i am refreshing the fieldcatalog and filling the fieldcatalog table with new fields everytime. but the system displays only the first generated fieldcatalog.
    any ideas what can be done?
    Thanks & Regards
    Rahul

    Hello Rahul
    The following sample report <b>ZUS_SDN_TWO_ALV_GRIDS_A</b> shows how to dynamically change the fieldcatalog of the second ALV list depending on which customer has been selected (by double-clicking) on the first ALV list.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS_A
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_two_alv_grids_a.
    " Dynamic fieldcatalog on second ALV list
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_row              TYPE i.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        md_row = e_row-index.
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
    *        IS_ROW_ID    =
    *        IS_COLUMN_ID =
            is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = '1000'.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 2
          columns           = 1
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Display data
      gs_layout-grid_title = 'Customers'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knb1
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gs_layout-grid_title = 'Customers Details (Sales Areas)'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv  " empty !!!
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          OTHERS         = 2.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1,
        ls_fcat     TYPE lvc_s_fcat,
        lt_fcat     TYPE lvc_t_fcat.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  knvv INTO TABLE gt_knvv
             WHERE  kunnr  = ls_knb1-kunnr.
      CALL METHOD go_grid2->get_frontend_fieldcatalog
        IMPORTING
          et_fieldcatalog = lt_fcat.
      " Logic of fieldcatalog modification:
      " 1st customer selected -> show 1 column only
      " 2nd customer selected -> show 2 columns only
      " 3rd customer selected -> show 3 columns
      LOOP AT lt_fcat INTO ls_fcat.
        IF ( syst-tabix <= ld_row ).
          ls_fcat-no_out = ' '.
        ELSE.
          ls_fcat-no_out = 'X'.
        ENDIF.
        MODIFY lt_fcat FROM ls_fcat.
      ENDLOOP.
      go_grid2->set_frontend_fieldcatalog( lt_fcat ).
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    Regards
      Uwe

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts
    Help needed Displaying ALV  Secondary list without using oops concept.
    its urgent
    regds
    rajasekhar

    hi chk this code
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
         I_CALLBACK_PF_STATUS_SET       = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
         IS_VARIANT                     = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'Z50651_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    REPORT  Z_ALV_INTERACTIVE  MESSAGE-ID ZMSG_50651
                                    LINE-SIZE 100
                                    LINE-COUNT 60
                                    NO STANDARD PAGE HEADING.
    ******************TABLES DECLARATION*****************
    TABLES : VBAP,MARA.
    *****************TYPE POOLS**************************
    TYPE-POOLS : SLIS.
    ****************INTERNAL TABLES**********************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN, "SALES DOCUMENT
    POSNR LIKE VBAP-POSNR, "SALES DOCUMENT ITEM
    MATNR LIKE VBAP-MATNR, "MATERIAL NUMBER
    END OF IT_VBAP.
    ****************TEMPORARY VARIABLES******************
    DATA : V_VBELN LIKE VBAP-VBELN."SALES DOCUMENT
    DATA : V_MTART LIKE MARA-MTART. "MATERIAL TYPE
    *****************FIELD CATALOG***********************
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    ****************LAYOUT*******************************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    ***************VARIANT*******************************
    DATA : G_VARIANT LIKE DISVARIANT.
    ****************SAVE*********************************
    DATA : G_SAVE(1) TYPE C.
    *****************EVENTS******************************
    DATA : XS_EVENTS TYPE SLIS_ALV_EVENT,
           G_EVENTS TYPE SLIS_T_EVENT.
    ******************PF STATUS**************************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    ******************USER COMMAND************************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
           R_UCOMM LIKE SY-UCOMM.
    ****************SELECTION SCREEN************************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    ***************AT SELECTION SCREEN*********************
    AT SELECTION-SCREEN.
      PERFORM VALIDATE.
    **************START-OF-SELECTION**************************
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM VARIANT.
      PERFORM SAVE.
      PERFORM EVENTS.
      PERFORM ALV_DISPLAY.
    *********************FORMS*******************************************
    *&      Form  validate
          text
    -->  p1        text
    <--  p2        text
    FORM VALIDATE .
      SELECT SINGLE VBELN
                    FROM VBAP
                    INTO V_VBELN
                    WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'enter valid vbeln'.
      ENDIF.
    ENDFORM.                    " validate
    *&      Form  get_details
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DETAILS .
      SELECT VBELN
             POSNR
             MATNR
             FROM VBAP
             INTO TABLE IT_VBAP
             WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no details found'.
      ENDIF.
    ENDFORM.                    " get_details
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-OUTPUTLEN = 6.
      WA_FIELDCAT-SELTEXT_L = 'ITEM'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-OUTPUTLEN = 18.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NO'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " fieldcat
    *&      Form  LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM.                    " LAYOUT
    *&      Form  VARIANT
          text
    -->  p1        text
    <--  p2        text
    FORM VARIANT .
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = SY-REPID.
    ENDFORM.                    " VARIANT
    *&      Form  SAVE
          text
    -->  p1        text
    <--  p2        text
    FORM SAVE .
      CLEAR G_SAVE.
      G_SAVE = 'A'.
    ENDFORM.                    " SAVE
    *&      Form  EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENTS.
      XS_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENTS-FORM = 'TOP_OF_PAGE'.
      APPEND XS_EVENTS TO G_EVENTS.
    ENDFORM.                    " EVENTS
    *&      Form  TOP_OF_PAGE
          text
    FORM TOP_OF_PAGE.
      WRITE :/ ' INTELLI GROUP'.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
       I_CALLBACK_PF_STATUS_SET         = PF_STATUS
         I_CALLBACK_USER_COMMAND        = USER_COMMAND
      I_STRUCTURE_NAME               =
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
         I_SAVE                         = G_SAVE
        IS_VARIANT                      = G_VARIANT
         IT_EVENTS                      = G_EVENTS
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = IT_VBAP
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  SET_PF_STATUS
          text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD' EXCLUDING EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  SET_USER_COMMAND
          text
    FORM SET_USER_COMMAND USING R_UCOMM
                                RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'DC'.
          READ TABLE IT_VBAP INDEX RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            SELECT SINGLE MTART
                          FROM MARA
                          INTO V_MTART
                          WHERE MATNR = IT_VBAP-MATNR.
            IF SY-SUBRC <> 0.
       MESSAGE E000 WITH 'NO MATERIAL DESCRIPTION FOR SELECTED MATERIAL NO'.
            ELSE.
              WRITE :/ 'MATERIAL NO :',IT_VBAP-MATNR.
              WRITE :/ 'MATERIAL TYPE :' , V_MTART.
      SUBMIT SLIS_DUMMY WITH P_MATNR EQ IT_VBAP-MATNR
                        WITH P_MTART EQ V_MTART.
            ENDIF.
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CLOSE'.
          CALL TRANSACTION 'SE38'.
      ENDCASE.
    plz reward if useful

  • Alv interactive report  for secondary list

    Hi All,
    This is my code for ALV interactive report. Its working Properly for me when i select material number iam able to display the secondary list properly . if i sorted the basic list other than material number for ex . created date . iam uable to display correct secondary list . Can any one help me in this issue?
    REPORT  ZWRLOMDMM_PMG_PHWEB_PLD   NO STANDARD PAGE HEADING
            LINE-SIZE 120
            LINE-COUNT 65
            MESSAGE-ID 00.
    TABLES                                                              *
    TABLES: MARA ,      "General Material Data
            ZWPBPH.     " Published Product Hierarchy
    TYPE-POOLS                                                          *
    TYPE-POOLS:SLIS .
    DATA:FIELDCATALOG_BASIC TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
         FIELDCATALOG_SECONDARY TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
         GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
         GD_LAYOUT TYPE SLIS_LAYOUT_ALV,
         GD_REPID LIKE SY-REPID.
    INTERNAL TABLES                                                     *
    *Internal Tables to Get Data.
    *Internal Table For MARA Table.
    DATA:BEGIN OF T_MARA OCCURS 0 ,
            MATNR LIKE MARA-MATNR,
            MTART LIKE MARA-MTART,
            ERSDA LIKE MARA-ERSDA,
            ERNAM LIKE MARA-ERNAM,
            AENAM LIKE MARA-AENAM,
            SPART LIKE MARA-SPART,
         END OF T_MARA.
    *Internal Table For ZWPBPH Table.
    DATA:BEGIN OF T_ZWPBPH OCCURS 0 ,
           PBPINO LIKE ZWPBPH-PBPINO,
           PBPAPINO LIKE ZWPBPH-PBPAPINO,
         END OF T_ZWPBPH.
    *Internal Table For Basic List Field Catalog.
    DATA:BEGIN OF T_ALV OCCURS 0 ,
           MATNR LIKE MARA-MATNR,
           MTART LIKE MARA-MTART,
           ERSDA LIKE MARA-ERSDA,
           ERNAM LIKE MARA-ERNAM,
           SPART LIKE MARA-SPART,
           SPART1(3),
         END OF T_ALV.
    *Internal Table For Secondary List Field Catalog.
    DATA: BEGIN OF T_ALVS OCCURS 0 ,
            MATNR LIKE MARA-MATNR,
            AENAM LIKE MARA-AENAM,
            LAEDA LIKE MARA-LAEDA,
          END OF T_ALVS.
    *Internal Table For Model
    DATA:T_MODEL LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Product
    DATA:T_PRODUCT LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Family
    DATA:T_FAMILY LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Line
    DATA:T_LINE LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Type
    DATA:T_TYPE LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    SELECTION SCREEN                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: P_MATN RADIOBUTTON GROUP R1  USER-COMMAND run default 'X'.
    SELECT-OPTIONS: P_MATNR FOR MARA-MATNR MODIF ID SC1 .
    PARAMETERS: P_DAT RADIOBUTTON GROUP R1  .
    SELECT-OPTIONS: : P_DATE FOR MARA-LAEDA  MODIF ID SC2.
    PARAMETERS: P_DIV RADIOBUTTON GROUP R1  .
    SELECT-OPTIONS: : P_DIVIS for mara-spart  MODIF ID SC3.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION                                                      *
    INITIALIZATION.
      REFRESH: T_MARA,
               T_ZWPBPH,
               T_ALV,
               T_ALVS,
               T_MODEL,
               T_PRODUCT,
               T_FAMILY,
               T_LINE,
               T_TYPE.
      CLEAR:   T_MARA,
               T_ZWPBPH,
               T_ALV,
               T_ALVS,
               T_MODEL,
               T_PRODUCT,
               T_FAMILY,
               T_LINE,
               T_TYPE.
      GD_REPID = SY-REPID.
    *AT SELECTION-SCREEN OUTPUT.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF P_MATN = 'X'.
          FREE : P_DIVIS,P_DATE.
          IF SCREEN-GROUP1 = 'SC2' or SCREEN-GROUP1 = 'SC3'.
            SCREEN-INPUT  = 0.
            MODIFY SCREEN.
            CONTINUE.
          ENDIF .
        ENDIF.
        IF P_DAT = 'X'.
          FREE : P_MATNR,P_DIVIS.
          IF SCREEN-GROUP1 = 'SC1' or  SCREEN-GROUP1 = 'SC3'.
            SCREEN-INPUT  = 0.
            MODIFY SCREEN.
            CONTINUE.
          ENDIF .
        ENDIF.
        IF P_DIV = 'X'.
          FREE : P_DATE,P_MATNR.
          IF SCREEN-GROUP1 = 'SC1' or SCREEN-GROUP1 = 'SC2'.
            SCREEN-INPUT = 0.
            MODIFY SCREEN.
            CONTINUE.
          ENDIF .
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION                                                  *
    START-OF-SELECTION.
      PERFORM GET_FIELDCATALOG_BASIC.
      PERFORM GET_FIELDCATALOG_SECONDARY.
      PERFORM POPULATE_DATA.
    END-OF-SELECTION                                                    *
    END-OF-SELECTION.
    *&      FORM GET_FIELDCATALOG_BASIC.
    Get Fieldcatalog For Basic List
    FORM GET_FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'MATNR'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Material Number'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 20.
      FIELDCATALOG_BASIC-HOTSPOT   = 'X'.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'MTART'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Material Type'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 20.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'ERSDA'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Created Date'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 12.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'ERNAM'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Created By'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 15.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'SPART'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Division PMG'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 14.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'SPART1'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Division PhWEB'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 14.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
    ENDFORM.                    "GET_FIELDCATALOG_BASIC
    *&      FORM GET_FIELDCATALOG_SECONDARY
    Get Fieldcatalog For Secondary List
    FORM GET_FIELDCATALOG_SECONDARY.
      FIELDCATALOG_SECONDARY-FIELDNAME = 'MATNR'.
      FIELDCATALOG_SECONDARY-SELTEXT_M = 'Material Number'.
      FIELDCATALOG_SECONDARY-COL_POS   = 0.
      FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
      FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
      FIELDCATALOG_SECONDARY-KEY       = 'X'.
      APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
      CLEAR FIELDCATALOG_SECONDARY.
      FIELDCATALOG_SECONDARY-FIELDNAME = 'AENAM'.
      FIELDCATALOG_SECONDARY-SELTEXT_M = 'Changed By'.
      FIELDCATALOG_SECONDARY-COL_POS   = 0.
      FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
      FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
      FIELDCATALOG_SECONDARY-KEY       = 'X'.
      APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
      CLEAR FIELDCATALOG_SECONDARY.
      FIELDCATALOG_SECONDARY-FIELDNAME = 'LAEDA'.
      FIELDCATALOG_SECONDARY-SELTEXT_M = 'Changed ON'.
      FIELDCATALOG_SECONDARY-COL_POS   = 0.
      FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
      FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
      FIELDCATALOG_SECONDARY-KEY       = 'X'.
      APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
      CLEAR FIELDCATALOG_SECONDARY.
    ENDFORM.                    "GET_FIELDCATALOG_SECONDARY
    *&      FORM POPULATE_DATA
    FORM POPULATE_DATA.
    *Get Data From MARA And ZWPBPH Tables
      IF P_MATN = 'X'.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
    where MATNR IN P_MATNR .
        IF SY-SUBRC <> 0.
          MESSAGE E001(0) WITH 'Invalid Material Number'.
        ENDIF.
      ELSEIF P_DAT = 'X'.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
    where LAEDA IN P_DATE .
        IF SY-SUBRC <> 0.
          MESSAGE E001(0) WITH 'Invalid Date Range'.
        ENDIF.
      ELSEIF P_DIV = 'X'.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
    where SPART IN P_DIVIS .
        IF SY-SUBRC <> 0.
          MESSAGE E001(0) WITH 'Invalid Division'.
        ENDIF.
      ELSEIF P_MATN = ' ' AND P_DAT = ' ' AND  P_DIV = ' '.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM T_MARA COMPARING MATNR.
      SORT T_MARA BY MATNR.
      IF T_MARA[] IS NOT INITIAL .
    SELECT PBPINO PBPAPINO FROM ZWPBPH INTO TABLE T_ZWPBPH FOR ALL ENTRIES
    IN T_MARA WHERE PBPINO = T_MARA-MATNR.
      ENDIF.
      IF SY-SUBRC = 0.
        LOOP AT  T_ZWPBPH.
          SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO  T_MODEL   WHERE
          PBPINO = T_ZWPBPH-PBPAPINO.
          IF SY-SUBRC = 0.
          SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH  INTO T_PRODUCT   WHERE
          PBPINO
          = T_MODEL-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
           SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH  INTO T_FAMILY   WHERE
           PBPINO = T_PRODUCT-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
            SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH  INTO T_LINE   WHERE
            PBPINO = T_FAMILY-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
       SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_TYPE   WHERE PBPINO
        = T_LINE-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
         SELECT SINGLE MTART ERSDA ERNAM SPART FROM MARA INTO CORRESPONDING
          FIELDS OF T_ALV WHERE MATNR = T_ZWPBPH-PBPINO AND SPART <>
        T_TYPE-PBPAPINO+1(2).
          ENDIF.
          IF SY-SUBRC = 0.
            MOVE T_ZWPBPH-PBPINO TO T_ALV-MATNR.
            MOVE T_TYPE-PBPAPINO+1(2) TO T_ALV-SPART1.
            APPEND T_ALV.
            SELECT SINGLE MATNR AENAM LAEDA FROM MARA INTO CORRESPONDING
            FIELDS OF T_ALVS WHERE MATNR = T_ZWPBPH-PBPINO.
            APPEND T_ALVS.
            CLEAR T_ALVS.
          ENDIF.
        ENDLOOP.
      ENDIF.
      SORT T_ALV BY MATNR.
      SORT T_ALVS BY MATNR.
      call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = GD_REPID
          i_callback_user_command = 'DISPLAY_DETAIL'
          it_fieldcat             = FIELDCATALOG_BASIC[]
          i_save                  = 'X'
        TABLES
          t_outtab                = T_ALV
        EXCEPTIONS
          program_error           = 1
          others                  = 2.
    ENDFORM.                    "POPULATE_DATA
    *&      Form  DISPLAY_DETAIL
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM DISPLAY_DETAIL USING UCOMM LIKE SY-UCOMM
    SELFIELD TYPE SLIS_SELFIELD.
    Select Material Number For Secondary List
      DATA: T_ALV_TEMP LIKE T_ALVS OCCURS 0 WITH HEADER LINE.
      IF UCOMM = '&IC1'.
        READ TABLE T_ALVS INDEX SELFIELD-TABINDEX.
        IF SY-SUBRC = 0.
          MOVE T_ALVS TO T_ALV_TEMP.
          APPEND T_ALV_TEMP.
        ENDIF.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program = GD_REPID
            it_fieldcat        = FIELDCATALOG_SECONDARY[]
          TABLES
            t_outtab           = T_ALV_TEMP.
      ENDIF.
    ENDFORM.                    "DISPLAY_DETAIL

    Hi,
    Try this in the routine display details
    READ TABLE T_ALV INDEX SELFIELD-TABINDEX.
    READ TABLE T_ALVS with key matnr = T_ALV-MATNR
    thanks

  • Adding button in the secondary list and alv grid

    Hi all ,
                i have devloped an alv grid interactive report as below, my problem is i want to add some button in the secondary list and do some interactions. but i dont know how to do that. i m sending u my code below ,,, plzz suggest what can be done do add that.
    <code>
    *& Report  Z_demo_SALESDOC
    REPORT  z_demo_salesdoc.
    TABLES: vbak, vbap.
    TYPE-POOLS:slis.
    DATA: BEGIN OF it_vbak OCCURS 0,
           vbeln TYPE vbak-vbeln,
           ernam TYPE vbak-ernam,
           erdat TYPE vbak-erdat,
           auart TYPE vbak-auart,
           END OF it_vbak.
    DATA: BEGIN OF it_vbap OCCURS 0,
           vbeln TYPE vbap-vbeln,
           posnr TYPE vbap-vbeln,
           matnr TYPE vbap-matnr,
           zmeng TYPE vbap-zmeng,
           netwr TYPE vbap-netwr,
           END OF it_vbap.
    DATA:it_event TYPE slis_t_event.
    DATA: t_field TYPE slis_t_fieldcat_alv,
          w_field TYPE slis_fieldcat_alv,
          t_field1 TYPE slis_t_fieldcat_alv,
          w_field1 TYPE slis_fieldcat_alv,
          w_layout TYPE slis_layout_alv,
          t_sort TYPE slis_t_sortinfo_alv,
          w_sort TYPE slis_sortinfo_alv.
    CONSTANTS: c_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
               c_usercommand  TYPE slis_formname VALUE 'USER_COMMAND'.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln MODIF ID m1,
                    s_erdat FOR vbak-erdat MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    PARAMETERS:rb1 RADIOBUTTON GROUP g1 USER-COMMAND us1,
               rb2 RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN OUTPUT.
      IF rb1 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1    = 'M1'.
         IF screen-name    CS 'S_VBELN'.
            screen-active    = '0'.
           screen-input     = '0'.
          screen-output    = '0'.
          screen-invisible = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF rb2 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1    = 'M2'.
            screen-active    = '0'.
           screen-input     = '0'.
          screen-output    = '0'.
          screen-invisible = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN.
      DATA: v_vbeln LIKE vbak-vbeln.
      SELECT SINGLE vbeln
                      FROM vbak
                      INTO (v_vbeln)
                      WHERE vbeln IN s_vbeln .
      IF sy-subrc <> 0.
        MESSAGE e001(q) WITH 'Invalid Sales document'.
      ENDIF.
      DATA: v_erdat LIKE vbak-erdat.
      SELECT SINGLE erdat
                      FROM vbak
                      INTO (v_erdat)
                      WHERE erdat IN s_erdat.
      IF sy-subrc <> 0.
        MESSAGE e001(q) WITH 'No document available with given date'.
      ENDIF.
    START-OF-SELECTION.
      PERFORM get_data_vbak.
      PERFORM build_field_catalog.
    PERFORM fill_event.
      PERFORM print_data_vbak.
    END-OF-SELECTION.
    *&      Form  get_data_vbak
          text
    -->  p1        text
    <--  p2        text
    FORM get_data_vbak .
      SELECT vbeln ernam erdat auart
                                FROM vbak
                                INTO TABLE it_vbak
                                WHERE vbeln IN s_vbeln AND erdat IN s_erdat.
    ENDFORM.                    " get_data_vbak
    *&      Form  build_field_catalog
          text
    -->  p1        text
    <--  p2        text
    FORM build_field_catalog .
      w_field-col_pos = 1.
      w_field-fieldname = 'VBELN'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Sales Order'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_field-col_pos = 2.
      w_field-fieldname = 'ERNAM'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Created by'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_field-col_pos = 3.
      w_field-fieldname = 'ERDAT'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Created Date'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_field-col_pos = 4.
      w_field-fieldname = 'AUART'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Order type'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_sort-spos = 1.
      w_sort-fieldname = 'VBELN'.
      w_sort-up = 'X'.
      APPEND w_sort TO t_sort.
      w_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " build_field_catalog
    *&      Form  user_command
          text
         -->RF_UCOMM     text
         -->RS_SELFIELD  text
    FORM user_command USING rf_ucomm    TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE rf_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'VBELN'.
            READ TABLE it_vbak INDEX rs_selfield-tabindex.
            IF sy-subrc = 0.
              PERFORM get_data_vbap.
              PERFORM build_field_catalog2.
              PERFORM print_field_data.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  print_data_vbak
          text
    -->  p1        text
    <--  p2        text
    FORM print_data_vbak .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
       i_callback_user_command           = 'USER_COMMAND'
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = I_GRID_TITLE
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
         is_layout                         = w_layout
       it_fieldcat                       = t_field[]
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
       it_sort                           = t_sort
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      it_events                         = it_event[]
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        TABLES
          t_outtab                          = it_vbak
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " print_data_vbak
    *&      Form  fill_event
          text
    FORM fill_event .
      DATA : st_event TYPE slis_alv_event.
    *- Clear.
      CLEAR : st_event, it_event[].
    *- Local variable
      DATA : l_tabix TYPE sy-tabix.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_event
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *- Read event table
      READ TABLE it_event WITH KEY name = slis_ev_user_command
                           INTO st_event.
    *- Clear
      CLEAR l_tabix.
      l_tabix = sy-tabix.
    *- Check subrc
      IF sy-subrc = 0.
        st_event-form = c_usercommand.
    *- Modify
        MODIFY it_event FROM st_event INDEX l_tabix.
    *- Clear
        CLEAR st_event.
      ENDIF.
    ENDFORM.                    " fill_event
    *&      Form  get_data_vbap
          text
    FORM get_data_vbap .
      IF NOT it_vbak[] IS INITIAL.
        SELECT vbeln
               posnr
               matnr
               zmeng
               netwr
            FROM vbap
            INTO TABLE it_vbap
            WHERE vbeln = it_vbak-vbeln.
        IF sy-subrc = 0.
          SORT it_vbap BY vbeln.
        ENDIF.
      ENDIF.
    ENDFORM.                    " get_data_vbap
    *&      Form  build_field_catalog2
          text
    FORM build_field_catalog2 .
      CLEAR:t_field1,w_field1.
      w_field1-col_pos = 1.
      w_field1-fieldname = 'VBELN'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Sales Order'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 2.
      w_field1-fieldname = 'POSNR'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Sales Doc Item'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 3.
      w_field1-fieldname = 'MATNR'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Material No'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 4.
      w_field1-fieldname = 'ZMENG'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Target quan units'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 5.
      w_field1-fieldname = 'NETWR'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Net value dc cu'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
    ENDFORM.                    " build_field_catalog2
    *&      Form  print_field_data
          text
    FORM print_field_data .
    SET PF-STATUS 'VBAP'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
         i_grid_title                      = 'VBAP DETAILS'
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
      IS_LAYOUT                         = IS_LAYOUT
         it_fieldcat                       = t_field1[]
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
      IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      IT_EVENTS                         = IT_EVENTS
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        TABLES
          t_outtab                          = it_vbap
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " print_field_data
    </code>

    Hi Satya..
    This is the Sample code...
    DATA : V_FORM_GUI TYPE SLIS_FORMNAME VALUE 'F_GUI'.  "Form name
    **Secondary List
    FORM print_field_data .
    SET PF-STATUS 'VBAP'.  "This statement will not work for ALV
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    i_callback_program = sy-repid
    <b> I_CALLBACK_PF_STATUS_SET = V_FORM_GUI  
                                                      "Subroutine in which GUI status is called</b>
    I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'   "To handle GUI
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME = I_STRUCTURE_NAME
    I_BACKGROUND_ID = ' '
    i_grid_title = 'VBAP DETAILS'
    I_GRID_SETTINGS = I_GRID_SETTINGS
    IS_LAYOUT = IS_LAYOUT
    it_fieldcat = t_field1[]
    IT_EXCLUDING = IT_EXCLUDING
    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS
    IT_SORT = IT_SORT
    IT_FILTER = IT_FILTER
    IS_SEL_HIDE = IS_SEL_HIDE
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT = IS_VARIANT
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT = IT_EVENT_EXIT
    IS_PRINT = IS_PRINT
    IS_REPREP_ID = IS_REPREP_ID
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    I_HTML_HEIGHT_TOP = 0
    I_HTML_HEIGHT_END = 0
    IT_ALV_GRAPHICS = IT_ALV_GRAPHICS
    IT_HYPERLINK = IT_HYPERLINK
    IT_ADD_FIELDCAT = IT_ADD_FIELDCAT
    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO
    IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER
    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
    TABLES
    t_outtab = it_vbap
    EXCEPTIONS
    program_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " print_field_data
    FORM F_GUI USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'GUI_1'.  "Double click and Create this GUI status and add buttons
    ENDFORM.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • How to create a secondary list of alv grid inside the function module

    Hi All,
    My requirement is to create a RFC function module to display the alv grid of one table.
    i have created that.
    while clicking on the records of the alv it should open the secondary list of another table.
    My problem is it is not fetching the records of the internal table of the primary list since it is created inside the function module(FUNCTION...ENDFUNCTION).
    pls help me on this.
    Thanks in Advance.

    hi,
    READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
    here sel_sheet is the internal table for the primary list..
    i called the function module "reuse_lav_grid_display" inside Function...Endfunction.
    so when i am using  READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
    inside the user command perform therecords in this internal table is not populating..
    pls help me on this.
    thanks in advance.

Maybe you are looking for

  • Memory error after C042 errors on users database

    Hi, We recently have memory error messages on the POA and on the Client. The error seemed to follow several C042 errors: The database function 53 reported error [C042] on user4mn.db Error: Memory error. Memory function failure [8101] User: I cannot f

  • Pass Language report is being run in to RDF as parameter

    I need to figure out how to pass what language was selected when a user runs a report to the rdf file as a parameter. For example, my user default language is English, but I want to run the report in French. When I run the report in French, all of th

  • PRS-T3 does not unlock with correct PIN

    I have not used my PRS-T3 reader for a few months. Now, it does not let me past the Device lock screen, i.e. keep asking me to "Enter 4-Digit PIN" when I do just that and WITH THE CORRECT PIN -  which I have NOT forgotten. I just want to use the read

  • OBBH Substitutuions for line items.

    HI, We are trying to assign cost centers for GL accounts using FI susbstitution rules ( OBBH ) in exit routine ZGGBS000 ( RGGBS000 ). The BSEG and BKPF ( line item substitution ) values are populated when the routine is triggered however we also need

  • Generate Invoice

    I am not clear yet on what is done in Acrobat directly and what requires the use of LiveCycle...just steer me please. I have a multiple page Form I am working on. Not sure yet if it will be a Portfolio. The series of forms make up a registration pack