Displaying selection screen data on alv header in multiple rows and columns

Hi
Presently in my requirement , whatever  the data entered in  selection screen  should display  on alv header  and item details on alv grid display.
for eg...
on alv header
  customer no :  1000 to 2000         sales order no: 111
  name :    gff to ff                                 sales org:
  city:                                         country:
  item details below this   
  plz guide me how to solve this issue.
Thanks & Regards,
Pradeep

Hi,
Check this code this may help you.
<code>
TYPE-POOLS : SLIS.
TABLES VBRK.
TYPES : BEGIN OF TY_VBRK,
        VBELN TYPE VBRK-VBELN,
        VKORG TYPE VBRK-VKORG,
        VTWEG TYPE VBRK-VTWEG,
        SPART TYPE VBRK-SPART,
        FKDAT TYPE VBRK-FKDAT,
        END OF TY_VBRK,
        BEGIN OF TY_VBRP,
        VBELN TYPE VBRP-VBELN,
        POSNR TYPE VBRP-POSNR,
        MATNR TYPE VBRP-MATNR,
        ARKTX TYPE VBRP-ARKTX,
        FKIMG TYPE VBRP-FKIMG,
        NETWR TYPE VBRP-NETWR,
        END OF TY_VBRP,
        BEGIN OF TY_TARGET,
        VBELN TYPE VBRK-VBELN,
        VKORG TYPE VBRK-VKORG,
        VTWEG TYPE VBRK-VTWEG,
        SPART TYPE VBRK-SPART,
        FKDAT TYPE VBRK-FKDAT,
        POSNR TYPE VBRP-POSNR,
        MATNR TYPE VBRP-MATNR,
        ARKTX TYPE VBRP-ARKTX,
        FKIMG TYPE VBRP-FKIMG,
        NETWR TYPE VBRP-NETWR,
        END OF TY_TARGET.
DATA : T_VBRK TYPE TABLE OF TY_VBRK,
       W_VBRK TYPE TY_VBRK,
        T_VBRP TYPE TABLE OF TY_VBRP,
        W_VBRP TYPE TY_VBRP,
        T_TARGET TYPE TABLE OF TY_TARGET,
        W_TARGET TYPE TY_TARGET,
FIELD CATALOG ******************
        T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
        W_FCAT TYPE SLIS_FIELDCAT_ALV,
*************************************SUB TOTALS AND SORTING***********
        T_SORT TYPE SLIS_T_SORTINFO_ALV,
        W_SORT TYPE SLIS_SORTINFO_ALV,
*************************************FOR LIST HEADER******************
        T_LIST_HEAD TYPE SLIS_T_LISTHEADER,
        W_LIST_HEAD TYPE SLIS_LISTHEADER,
        T_LIST_HEAD1 TYPE SLIS_T_LISTHEADER,
        W_LIST_HEAD1 TYPE SLIS_LISTHEADER,
*************************************FOR LIST HEADER******************
        W_LAYOUT TYPE SLIS_LAYOUT_ALV,
************************************FOR EVENTS************************
        T_EVENT TYPE SLIS_T_EVENT,
        W_EVENT TYPE SLIS_ALV_EVENT.
*********************************SELECT OPTIONS***********************
SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN DEFAULT 90005316 TO 90005330.
**RETRIVING DATA************************
PERFORM DATA_RETRIVE.
**BUILDING THE FIELD CATALOG************
PERFORM BUILD_FCAT.
**BUILDING THE TABLE FOR LIST HEADER****
PERFORM BUILD_LIST_HEAD.
*******************************CALLING THE FUNCTION MODULE************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    I_CALLBACK_PROGRAM     = SY-REPID
    I_CALLBACK_TOP_OF_PAGE = 'LIST_TOP_OF_PAGE'
    IT_FIELDCAT            = T_FCAT
    IT_SORT                = T_SORT
  TABLES
    T_OUTTAB               = T_TARGET.
*&      Form  DATA_RETRIVE
FORM DATA_RETRIVE .
SELECT VBELN VKORG VTWEG SPART FKDAT FROM VBRK INTO CORRESPONDING FIELDS
OF TABLE T_VBRK WHERE VBELN IN S_VBELN.
  IF SY-SUBRC EQ 0.
    SORT T_VBRK BY VBELN.
    SELECT VBELN POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE
     T_VBRP FOR ALL ENTRIES IN T_VBRK WHERE VBELN = T_VBRK-VBELN.
  ENDIF.
  LOOP AT T_VBRP INTO W_VBRP.
    LOOP AT T_VBRK INTO W_VBRK WHERE VBELN = W_VBRP-VBELN.
      W_TARGET-VBELN = W_VBRK-VBELN.
      W_TARGET-VKORG = W_VBRK-VKORG.
      W_TARGET-VTWEG = W_VBRK-VTWEG.
      W_TARGET-SPART = W_VBRK-SPART.
      W_TARGET-FKDAT = W_VBRK-FKDAT.
      W_TARGET-POSNR = W_VBRP-POSNR.
      W_TARGET-MATNR = W_VBRP-MATNR.
      W_TARGET-ARKTX = W_VBRP-ARKTX.
      W_TARGET-FKIMG = W_VBRP-FKIMG.
      W_TARGET-NETWR = W_VBRP-NETWR.
      APPEND W_TARGET TO T_TARGET.
    ENDLOOP.
  ENDLOOP.
  SORT T_TARGET BY VBELN.
ENDFORM.                    " DATA_RETRIVE
*&      Form  BUILD_FCAT
FORM BUILD_FCAT .
  W_FCAT-COL_POS = 1.
  W_FCAT-FIELDNAME = 'VBELN'.
  W_FCAT-SELTEXT_M = 'BILLING NO'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 2.
  W_FCAT-FIELDNAME = 'VKORG'.
  W_FCAT-SELTEXT_M = 'SALES ORGANIZATION'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 3.
  W_FCAT-FIELDNAME = 'VTWEG'.
  W_FCAT-SELTEXT_M = 'DISTRIBUTION CHANNEL'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 4.
  W_FCAT-FIELDNAME = 'SPART'.
  W_FCAT-SELTEXT_M = 'DIVISION'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 5.
  W_FCAT-FIELDNAME = 'FKDAT'.
  W_FCAT-SELTEXT_M = 'CREATION DATE'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 6.
  W_FCAT-FIELDNAME = 'POSNR'.
  W_FCAT-SELTEXT_M = 'BILLING ITEM'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 7.
  W_FCAT-FIELDNAME = 'MATNR'.
  W_FCAT-SELTEXT_M = 'MATERIAL NUM'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 8.
  W_FCAT-FIELDNAME = 'ARKTX'.
  W_FCAT-SELTEXT_M = 'DESCRIPTION'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 9.
  W_FCAT-FIELDNAME = 'FKIMG'.
  W_FCAT-SELTEXT_M = 'QUANTITY'.
  APPEND W_FCAT TO T_FCAT.
  W_FCAT-COL_POS = 10.
  W_FCAT-FIELDNAME = 'NETWR'.
  W_FCAT-SELTEXT_M = 'NET VALUE'.
  W_FCAT-DO_SUM = 'X'.
  APPEND W_FCAT TO T_FCAT.
ENDFORM.                    " BUILD_FCAT
*&      Form  BUILD_LIST_HEAD
FORM BUILD_LIST_HEAD .
  DATA : L_DATE(10),
         L_TIME(8).
  W_LIST_HEAD-TYP = 'S'.
  W_LIST_HEAD-KEY = 'Sales org :'.
  W_LIST_HEAD-INFO = S_VBELN-LOW .
  APPEND W_LIST_HEAD TO T_LIST_HEAD.
  CLEAR W_LIST_HEAD.
  W_LIST_HEAD-TYP = 'S'.
  W_LIST_HEAD-KEY = 'TO '.
  W_LIST_HEAD-INFO =  S_VBELN-HIGH.
  APPEND W_LIST_HEAD TO T_LIST_HEAD.
  CLEAR W_LIST_HEAD.
ENDFORM.                    " BUILD_LIST_HEAD
*&      Form  LIST_TOP_OF_PAGE
FORM LIST_TOP_OF_PAGE .
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = T_LIST_HEAD.
ENDFORM.                    " LIST_TOP_OF_PAGE
<code>
Regards

Similar Messages

  • Displaying selection screen details in Alv Report  output display as Header

    Hi all,
    May be somebody knows how I can show selected values with select-options in top_of_page using REUSE_ALV_GRID_DISPLAY.
    This shoud work for all the reports and diff selection screens .
    I need one dynamic process which will for display any report selection screen selected details.(Basically varient information of report).
    Small example if possible, please.
    Thanks in advance,
    Rimas

    Hi Thiru,
    Thanks for the input.
    This is my exact requirement.
    Hi Experts,
    I would like to Display / Print  Select-options selected details in ALV Header.
    Ex: Say suppose here i enter kunnr as 1000
                                            lifnr as    2000 to 4000
                                            p_langu as  'EN'.
                                           p_dir  as 'C:\TEMP,
                                           p_upda as 'X'
    for selection screen below.                    
    SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
    SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr.
    PARAMETER      : p_lanuge LIKE t002-spras DEFAULT sy-langu.
    PARAMETER: p_dir  LIKE rlgrap-filename
               DEFAULT text-003 LOWER CASE.
    PARAMETERS: p_upd AS CHECKBOX DEFAULT 'X'.
    I dont want to Hard code selection screen values like
    DATA: header TYPE slis_t_listheader,
    wa TYPE slis_listheader,
    wa-typ = 'S'(093).
      wa-key = s_lifnr .
      wa-info = 'Vendor no".
      APPEND wa TO header.
    I want dynamic process for all of my selection screen values selected
    hard code may be it will be fine small selection screen it will work.
    Fur that i got one process to get dynamically through fm
    Ex: DATA: irsparams TYPE rsparams OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
    EXPORTING
    curr_report = program
    TABLES
    selection_table = irsparams
    EXCEPTIONS
    not_found = 1
    no_report = 2
    OTHERS = 3.
    loop at irsparams.
    write : / irsparams-SELNAME.
    write : / irsparams-SIGN.
    write : / irsparams-OPTION.
    write : / irsparams-LOW.
    write : / irsparams-HIGH.
    endloop.
    I have done my requirement partially but i am failed to achive my full  requirement.
    Because
    rsparams  strcture is diff from  slis_t_listheader.
    Can any one help me for further assistence to display irsparams strcture data in alv header.
    Thanks
    Nag

  • How to save data from JTable multiple rows and columns

    Hi Y_Not thanks for your help before...
    But what should I do if I want to get/save many data from many column and rows??

    i don't quite understand your (repeated) question. what is the problem with "multiple rows and columns". Y_NOT and i have shown you ways to access them.
    all you need are 2 loops: one around your number of rows and one around the number of columns or vice versa depending in which order you want to save things:
    for (int col = 0; col < data.size(); col++) {
        for (int row = 0 ; row < data[col].size(); row++) {
            // save your data
            saveData(data[col].getElementAt(row));
            // or use yourtable.getValueAt(row, col);
    }this is not a problem of Swing/Java but of simple algorithm...
    thomas

  • Multiple Rows and Columns selection on ALV

    Hi all,
    What is the best solution to allow the multiple selection or combination of selection (rows and columns) on an ALV ?
    I would like to be able to select some rows and some columns and to get the result cells in order to update them.
    Thanks in advance for your help.
    David

    Thanks Srinivas and Seela,
    I forgot to precise that my ALV is dynamic, I used the method 'add_new_child_node'.
    I tried the different possibilties with method attributes but I don't find the good attributes combination to allow columns selection.
    I add also that I have to be able to select several no adjacent columns.
    What do you think about this workaround :
    Is it possible to add a line on my ALV with checkbox between the header line (with column title) and data line.
    I will search using the method add_cell_variant but I don't know if it's possible with dynamic ALV.
    Thanks.
    David

  • Display selection screen details in the header of ALV

    hi..
    can someone please help me on how to display the data in the selection screen in the header in ALV?
    i hope someone can help me..thanks very much..

    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100

  • To display  selection screen date parameter  in smart form

    Hi to all
    My requirement is to display date parameters which are given at selection screen (module pool program ) on the smart forms.
    I just want to dispaly this on selection.
    SO_BLDAT-LOW
    SO_BLDAT-HIGH
    Please guide.
    Regards
    Anubhav

    Hi,
      If you are calling the smartform from the module program then export the parameters from the calling FM  
      and import the same in the smartform.
    Regards,
    Sandeep

  • ALV column header with multiple rows and ALV column header span

    How could I have in an ALV a column header on several lines and/or a column header that spans on multiple columns?
    i.e. I would like to have in an ALV two columns, each with it's own distinct header and additionally another column header for both of the columns, that spans across both columns. How could I program this?

    Hi,
    follow below mentioned code
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    Regards,
    Srini.

  • Displaying selection screen as pop-up from dialog box

    Hi,
          I have a screen which is of dialog-box type. This dialog screen shows an ALV and has a button in the ALV toolbar. On pressing this button, a pop-up screen is to be displayed. This pop-up screen is designed as a selection-screen. Is it possible to display this selection screen as a pop-up from a dialog box screen?
    Regards,
    Suhas

    Hi Suhas,
    Its possible to display selection screen as pop-up from dialog box.....Check the code below...copy paste and execute...
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE text-001.
    PARAMETER p.
    SELECTION-SCREEN END   OF SCREEN 123.
    CALL SELECTION-SCREEN 123 STARTING AT 20 5
                                ENDING AT 80 15.
    The below code might help u to add a button in alvgrid's toolbar......
    *       CLASS lcl_event_handler DEFINITION
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        DATA: wa_toolbar   TYPE stb_button,
              calc         TYPE REF   TO cl_gui_frontend_services.
        METHODS : toolbar_handle FOR EVENT toolbar      OF cl_gui_alv_grid
                                        IMPORTING e_object
                                                  e_interactive,
                  ucomm_handle   FOR EVENT user_command OF cl_gui_alv_grid
                                        IMPORTING e_ucomm.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD toolbar_handle.
        MOVE   3 TO  wa_toolbar-butn_type.
        APPEND wa_toolbar   TO e_object->mt_toolbar.
        MOVE : 0            TO wa_toolbar-butn_type,
               'CALC'       TO wa_toolbar-function,
               '@0M@'       TO wa_toolbar-icon,
               'Calculator' TO wa_toolbar-quickinfo.
        APPEND wa_toolbar TO e_object->mt_toolbar.
      ENDMETHOD. "toolbar_handle
      METHOD ucomm_handle.
        IF e_ucomm = 'CALC'.   " When button added in toolbar is clicked
          IF calc IS INITIAL.
            CREATE OBJECT calc.
          ENDIF.
          CALL METHOD cl_gui_frontend_services=>execute
       EXPORTING
         application            = 'CALC'.
        ENDIF.
      ENDMETHOD. "ucomm_handle
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    DATA : container    TYPE REF   TO cl_gui_custom_container,
           grid         TYPE REF   TO cl_gui_alv_grid,
           event        TYPE REF   TO lcl_event_handler,
           it_display   TYPE TABLE OF mara,
           wa_display   TYPE mara.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'BASIC'.
      PERFORM build_it_display.
      PERFORM create_objects.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          SET SCREEN 0.
          LEAVE SCREEN.
        WHEN 'EXIT'.
          SET SCREEN 0.
          LEAVE SCREEN.
        WHEN 'CANC'.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  build_it_display
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_it_display .
      SELECT * FROM mara UP TO 15 ROWS INTO TABLE it_display.
    ENDFORM.                    " build_it_display
    *&      Form  create_objects
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_objects .
      IF container IS INITIAL.
        CREATE OBJECT container
        EXPORTING
          container_name     = 'CUSTOM'.
        CREATE OBJECT event.
        CREATE OBJECT grid
          EXPORTING
            i_parent         = container.
        SET HANDLER event->toolbar_handle FOR grid.
        SET HANDLER event->ucomm_handle   FOR grid.
        CALL METHOD grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'MARA'
          CHANGING
            it_outtab        = it_display.
      ENDIF.
    ENDFORM.                    " create_objects
    Cheers,
    Jose.

  • Change Layout in Selection Screen for OO ALV-Grid

    Hello everyone,
    I got a problem regarding layouts for objectoriented ALV Grid. I want to make it possible that user can take the layout for ALV he wants to on the selection screen. So far thats no problem and it works. But there are some little problems which I do not know how to fix them. But first the facts:
    (1) I got my parameter for layout
    PARAMETER: p_vari  TYPE disvariant-variant.
    (2) I fill my global layout structure in initialization
    INITIALIZATION.
    * Variante vorbelegen
       gs_variant-username = sy-uname.
       gs_variant-report   = sy-repid.
    * Layout holen
       CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
         EXPORTING
           i_save        = 'A'
         CHANGING
           cs_variant    = gs_variant
         EXCEPTIONS
           wrong_input   = 1
           not_found     = 2
           program_error = 3
           OTHERS        = 4.
       IF sy-subrc = 0.
         p_vari = gs_variant-variant.
       ENDIF.
    (3) I got my handling for F4-value help on variant parameter
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
       CALL FUNCTION 'LVC_VARIANT_F4'
         EXPORTING
           is_variant    = gs_variant
           i_save        = 'A'
         IMPORTING
           es_variant    = gs_variant
         EXCEPTIONS
           not_found     = 1
           program_error = 2
           OTHERS        = 3.
       IF sy-subrc <> 0.
         MESSAGE text-m01 TYPE 'S'.
       ELSE.
         p_vari = gs_variant-variant.
       ENDIF.
    (4) I give back my parameters content into the variant structure at start of selection
    START-OF-SELECTION.
       gs_variant-username = sy-uname.
       gs_variant-report   = sy-repid.
       gs_variant-variant  = p_vari.
    This works all fine but I got some problems when using default variants/layouts. For example I got a default variant only for me. When starting the selection screen it works fine that the default layout was written. It is displayed automatically in the variant parameter. But I want that if i I empty the content (blank it out) from my variant parameter, that report should start with "normal" layout how it was written in the report and NOT with default layout.
    When I clear the gs_variant it works like I want it, but then the alv layout button looks like (without functions for layout), because I do not have the reference to my report.
    So what to do? :-)
    Regards
    Michael

    Wow that was fast, works great, thanks :-)
    I did not use this parameter in set table method but now I fill it dynamically.
    Ok next problem, one step harder ;-)
    Now I have one selection screen for one ALV-Grid, but four radio buttons which control with which data the ALV gets filled (four different fieldcats, data tables and so on). Each Grid got an own HANDLE so that the layouts can be separated in four categories.
    Now I want that by changing the radio button the individual standard layout for the chosen alv grid is getting filled.
    This works fine when using it in selection screen output.
    AT SELECTION-SCREEN OUTPUT.
       CLEAR gs_variant.
    * Layout-Handles individuell für Klausel-Radiobuttons setzen
       IF     p_py IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLPY'.
       ELSEIF p_rh IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLRH'.
       ELSEIF p_aj IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLAJ'.
       ELSEIF p_sr IS NOT INITIAL.
         gs_variant-username = sy-uname.
         gs_variant-report   = sy-repid.
         gs_variant-handle   = 'KLSR'.
       ENDIF.
    * Layout holen
       CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
         EXPORTING
           i_save        = 'A'
         CHANGING
           cs_variant    = gs_variant
         EXCEPTIONS
           wrong_input   = 1
           not_found     = 2
           program_error = 3
           OTHERS        = 4.
       IF sy-subrc = 0.
         p_vari = gs_variant-variant.
       ELSE.
         CLEAR p_vari.
       ENDIF.
    But unfortunately selection screen output is getting passed by EACH changing in the selection screen. This means when I try to clear the default layout in my parameter field, it gets refilled automatically with default layout. If I do a condition around the filling (only if not initial) the default value filling does not work fine in every case, e.g. when clearing the parameters field and then change the radiobutton -> then it does not get filled automatically.

  • Pass selection screen value to ALV

    Hi
    I need to pass selection screen values to ALV top of page. How to do this?

    Hi,
    Have a look on the following example.
    TYPE-POOLS: SLIS.
    TABLES: LFA1.
    SELECT-OPTIONS: LIFNR FOR LFA1-LIFNR.
    DATA:  BEGIN OF ITAB OCCURS 0,
           LIFNR LIKE LFA1-LIFNR,
           NAME1 LIKE LFA1-NAME1,
           ORT01 LIKE LFA1-ORT01,
           LAND1 LIKE LFA1-LAND1,
           REGIO LIKE LFA1-REGIO,
           END OF ITAB.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 5 ROWS.
    DATA:  LAYOUT TYPE SLIS_LAYOUT_ALV,
           HEADER TYPE SLIS_T_LISTHEADER WITH HEADER LINE,
           FLDCAT TYPE SLIS_T_FIELDCAT_ALV.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'ITAB'
      I_STRUCTURE_NAME             = ITAB
      I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = SY-REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = FLDCAT
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_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.
    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            = 'TOP-OF-PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = FLDCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_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
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = ITAB
    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.
    DATA: S(10).
    S = 'TO'.
    FORM TOP-OF-PAGE.
    HEADER-TYP = 'S'.
    HEADER-KEY = 'LIFNR'.
    CONCATENATE LIFNR-LOW LIFNR-HIGH INTO HEADER-INFO SEPARATED BY SPACE.
    APPEND HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = HEADER[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.
    Reward,if useful.
    Thanks,
    Chandu

  • Print Selection Screen Parameters in ALV report only once

    Does anyone know how to print the selection screen within a ALV report.
    I've tried everything. I have the code to capture the selection parameters into a internal table. I can use top_of_page but I only want it printed once.

    Hi,
      If you have captured the selection screen entries in an internal table, then you could display it once by using the BLOCK LIST ALV.
    Check the function module.
    REUSE_ALV_BLOCK_LIST_DISPLAY
    Using this function module more than 1 alv could be display in the report.
    In our case ..there will be two alvs ...one for the selection screen n other for the main report output.
    Check the following example on the block List ALV....
    <b>BALVBT01</b>.
    Regards,
    Vara

  • Selection screen data validation problem

    Hello all,
    Transaction FBL3N has an authority check on company.  If the user enters a company for which they have no authority, a message displays and they can then exclude that company.  The following steps can be repeated as many times as are required to ensure that all selection-screen values can be used.  The program, RFITEMGL, is doing all of the authorization using the code of the logical database that is part of the program.
    I added the following logic in my program, which works fine, except when the entered values fail the authority check, I can't get off of screen 1000 and get to the sub-screen to exclude the unauthorized values unless I first change the range on screen 1000.
    For an example:
    If I enter range '100 ' through '900 ', and there is an unauthorized company, '200' in that range,  I can't add '200' as an excluded value without first changing the range to '100 ' to ' 199 ' on screen 1000.
    Any thoughts on a solution?  I tried looking at the logical database code without much success.
    at selection-screen on s_bukrs.
    check if person entering company has authority
    data: i_t001 type table of t001.
    data: w_t001 type          t001.
      select * from t001
               into table i_t001
               where bukrs in s_bukrs.
      loop at i_t001 into w_t001.
        authority-check object 'F_BKPF_BUK'
                    id 'BUKRS' field w_t001-bukrs
                    id 'ACTVT' field '03'.
        if sy-subrc ne 0.
          message e000(zf) with 'Company'
                              w_t001-bukrs
                              'not authorized'.
        endif.
      endloop.
    Thanks
    Bruce

    Hi,
    Yes this is normal way as you entered wrong value in s_bukrs unless and until you change that you cannot proceed further.
    instead of at selection-screen on s_bukrs.
    use at selection-screen.
    if s_bukrs is not initial.
    do processing .,
    and display info message'
    endif.
    or ., instead of error message  use dispaly like 'E'
    like.,
    at selection-screen on s_bukrs.
    check authority.,
    MESSAGE 'You are not Authorized to use the Company Code' type 'S' display like 'E'.
    hope this helps you,
    Thanks & Regards.

  • Need a POP-UP which can display internal table data in ALV format

    HI All,
    I need to display INTERNAL TABLE values through a POP-UP. Only condition is that the window with the internal table data should be in ALV format and not in TEXT only format.
    To clarify, I used FM 'POPUP_WITH_TABLE_DISPLAY_OK'   and  'POPUP_WITH_TABLE_DISPLAY', but both display the data in TEXT format and there is no provision to put the FIELD names there. Everthing needs to be put into internal table and it displays it in text format.
    So I want a FM where I can display internal tabel data in ALV format( same format that would appear if you creata search help for a filed and output window would have all the ALV features like SORT buttons etc.
    Hope there is some FM to achieve this ALV format data thing.
    Thanks in advance for all your help.
    Regards
    FX3

    check this
    REPORT y_demo_alv_3.
    TYPE-POOLS: slis.
    DATA: BEGIN OF i_outtab OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA:   w_chk TYPE c.                  "For multiple selection
    DATA: END OF i_outtab.
    *       I_OUTTAB TYPE SFLIGHT OCCURS 0,
    DATA: i_private TYPE slis_data_caller_exit,
          i_selfield TYPE slis_selfield,
          W_exit(1) TYPE c.
    PARAMETERS: p_title TYPE sy-title.
    START-OF-SELECTION.
      SELECT * FROM sflight INTO TABLE i_outtab.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
                i_title                 = p_title
                i_selection             = 'X'
                i_zebra                 = 'X'
    *           I_SCREEN_START_COLUMN   = 0
    *           I_SCREEN_START_LINE     = 0
    *           I_SCREEN_END_COLUMN     = 0
    *           I_SCREEN_END_LINE       = 0
                i_checkbox_fieldname    = 'W_CHK'
    *           I_LINEMARK_FIELDNAME    =
    *           I_SCROLL_TO_SEL_LINE    = 'X'
                i_tabname               = 'I_OUTTAB'
                i_structure_name        = 'SFLIGHT'
    *           IT_FIELDCAT             =
    *           IT_EXCLUDING            =
    *           I_CALLBACK_PROGRAM      =
    *           I_CALLBACK_USER_COMMAND =
    *            IS_PRIVATE             = I_PRIVATE
         IMPORTING
                es_selfield             = i_selfield
                e_exit                  = w_exit
           TABLES
                t_outtab                = i_outtab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    *    MESSAGE i000(0k) WITH sy-subrc.
      ENDIF.
    *****the internal table is modified with a cross sign for marking the
    ***rows selected
      LOOP AT i_outtab WHERE w_chk = 'X'.
        WRITE: /  i_outtab-carrid, i_outtab-price.
      ENDLOOP.

  • Is there any option to display selection screen text in bold or big font?

    Hi all,
    Is there any option to display selection screen text in bold letters or with increase font size?
    Thanks n Regards

    Hi,
    Just give atry in this way..
    open the same program ans selection-screen screen no will be 1000 in se51 screen painter,
    go to properties of the texts u want to change then go to display tab and check the checkbox bright.
    it may or may not work but this will work in module pool .
    just give a try...
    Regards,
    Suresh.

  • FM to display Selection screen on report output??

    Hi Experts,
    Is there an FM to display Selection screen on report output.
    Thanks In Advance.

    Hi Ashwin,
    Refer to below link
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/content.htm
    or
    The easiest way is to define your selection screen in the TOP include of your module pool.
    Then call the selection screen.
    Selection Screen
    selection-screen begin of screen 1010 as window title text-001.
    selection-screen begin of block b1 with frame title text-002.
    parameters: p_vornr type resb-vornr,
    p_refno(20) type c,
    p_plnid type zplcfg-plnid as listbox visible length 20,
    p_sorts type c as listbox visible length 20.
    selection-screen begin of line.
    selection-screen comment (20) text-004.
    selection-screen position 33.
    parameters: p_order as checkbox default 'X'.
    selection-screen end of line.
    selection-screen end of block b1.
    selection-screen end of screen 1010.
    Now call the selection screen.
    call selection-screen 1010.
    if sy-subrc = 0.
    perform get_production_orders.
    perform process_orders.
    endif.
    Thanks!!

Maybe you are looking for

  • HT4436 Can I use 2 apple ID's for iCloud on the same laptop?

    I have my iCloud account for my iPhone set to sync with our MacBook, and I was wondering if my wife can set her iCloud account for her iPhone to sync on the same MacBook?  If she does will it cause any problems with both our iCloud accounts on one la

  • How to get the selectOneRadio value in javascript

    Hi, I want the selectOneRadio value in javascript. Can anyone give us a solution how to get the selectOneRadio value to javascript from jspx page. Thanks, Eswari

  • Loss of Packet with Ethernet Over SDH

    Hi all, I have a strange behaviour when I connect 2 giga optical interface of 2 cisco 7600 over an SDH link (7600 - ADM ----sdh----ADM - 7600). I can observe loss of packet even with a simple ping with size 100B...but the misterious is that if I star

  • Installation of Apple OS X 10.5 Leopard

    The installation process is problematic at best. Better heed Apple's warnings to backup all of your files. Unfortunately, I did not back up my files and lost thousands of photographs stored in iPhoto. In addition, all of my Application software, emai

  • Query regarding gps receiver

    hello every1, I have a Novatel centimetre accuracy GPS receiver.I have written a code in Labview 8.0 for it.But it doesnt seem to obtain any data via serial port.The logic is perfectly fine since I have used it for another GPS receiver.Earlier I had