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

Similar Messages

  • Printing Selection-Screen while printing ALV Grid output display

    Hi,
    I have a requirement wherein I want to print the Selection Screen also while printing the output in simple ALV grid Display.
    Currently when I print the ALV output report, only the header and the Body of the ALV is getting printed. But the requirement is that I also want to print Selection screen along with this.
    If anyone has faced a similar situation, plz let me know what needs to be done in order to print the selection screen also while printing the ALV report output.
    Rgds,
    Nitin

    Hi,
    You can use given function module to print your
    selection screen
    RS_REFRESH_FROM_SELECTOPTIONS
    >This will get Current contents of selection screen
    RS_LIST_SELECTION_TABLE
    >This will Generates list according to values in selection table(RSPARAMS)
    Sample
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
           EXPORTING
                curr_report     = p_repid
           TABLES
                selection_table = it_int_tab
           EXCEPTIONS
                not_found       = 1
                no_report       = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
        WRITE:1  'Selection Criteria'(i19),
             /1  sy-uline(18),
             /1  'Variant Name'(i21),
             23  sy-slset.
    *--  This function module lists the Selection Screen contents
        CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
             EXPORTING
                  report        = p_repid
                  seltext       = 'X'
                  newpage       = space
             TABLES
                  sel_tab       = it_int_tab
             EXCEPTIONS
                  sel_tab_empty = 1
                  OTHERS        = 2.
    Mark all helpful answers

  • How to Print Selection-Screen along with ALV Report output

    Hi,
    I have a requirement wherein i need to also print the Selection Screen of a report when I print the ALV report output.
    Basically i need to print the ALV output along with selection screen.
    Could you plz suggest me the way.
    Regards,
    Nitin

    Hi,
    My selection Screen is a very big one. It contains around 30 select-options.
    So is their any standard method in which you can choose whether you want to take the output printout with or without Selection screen.
    Regards,
    Nitin

  • 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

  • Select  mutiple rows in ALV report output

    Hi All,
    I want to select the Multiple records i in ALV report output with out holding the CNTL(Control Key).
    Is there any options in Layout?
    Please let me know
    regards,
    Ajay
    Edited by: Ajay reddy on May 30, 2010 3:27 PM

    Hi Ajay,
    To select several rows without Control button, if the rows are adjacent:
    - select the first and the last of the desired rows with Shift button pressed
    or
    - select a row, keep the mouse button pressed, and pass over the desired rows
    I don't know an option without Control if the rows are not adjacent.
    http://help.sap.com/saphelp_bw/helpdata/en/d1/7d9d37664e4d45e10000009b38f8cf/content.htm
    Regards,
    Paulo Carvalho

  • 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

  • How to display selected table fields in ALV report.

    Hi,
    I am displaying data from table EKPO using ALV through this query.
    select * from ekpo into table itab_ekpo up to 25 rows.
    bt if i need to display selected fields like
    select ebeln matnr netpr from ekpo into table itab_ekpo up to 25 rows.
    IT gives  error GETWA_NOT_ASSIGNED.
    FIELD SYMBOL HAS NOT YET BEEN ASSIGNED
    CAN ANYONE PLZ HELP ME.

    Hi ,
          I am pasting the code in which i am getting the error.Plz help.
    REPORT  ZHALV.
    tables:ekpo.
    data itab_ekpo type ekpo occurs 100 with header line.
    types: begin of itab_new,
           f_ebeln type ekpo-ebeln,
           f_matnr type ekpo-matnr,
           f_netpr type ekpo-netpr,
           end of itab_new.
    data itab1 TYPE STANDARD TABLE OF itab_new initial size 0.
    type-pools: slis.
    DATA: lt_fieldcat TYPE slis_t_fieldcat_alv,
          lf_fieldcat TYPE slis_fieldcat_alv.
    DATA:    ws_repid TYPE sy-repid VALUE 'ZHALV'.
    DATA:  l_layout   TYPE slis_layout_alv.
    selection-screen Begin of block block1 with frame title text-111.
    select-options : S_EBELN for EKPO-EBELN.
    selection-screen end of block block1.
    INITIALIZATION.
    start-of-selection.
      select ebeln matnr netpr from ekpo into table itab1 up to 10 rows WHERE EBELN IN S_EBELN.
    *select * from ekpo into table itab_ekpo up to 25 rows.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM GET_DETAILS.
    end-of-selection.
    *&      Form  build_fieldcatalog
          text
    FORM build_fieldcatalog .
    PURCHASING DOCUMENT NUMBER
      CLEAR lf_fieldcat.
      lf_fieldcat-fieldname = 'EBELN'.
      lf_fieldcat-ref_tabname = 'EKKO'.
      lf_fieldcat-ref_fieldname = 'EBELN'.
    MATERIAL NUMBER
      CLEAR lf_fieldcat.
      lf_fieldcat-fieldname = 'MATNR'.
      lf_fieldcat-ref_tabname = 'EKPO'.
      lf_fieldcat-ref_fieldname = 'MATNR'.
      APPEND lf_fieldcat TO lt_fieldcat.
    NET PRICE IN PURCHASING DOCUMENT
      CLEAR lf_fieldcat.
      lf_fieldcat-fieldname = 'NETPR'.
      lf_fieldcat-ref_tabname = 'EKPO'.
      lf_fieldcat-ref_fieldname = 'NETPR'.
      lf_fieldcat-cfieldname = 'WAERS'.
      lf_fieldcat-do_sum = 'X'.
      APPEND lf_fieldcat TO lt_fieldcat.
    ENDFORM.                    " build_fieldcatalog
    *&      Form  GET_DETAILS
          text
    FORM GET_DETAILS.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
                                 I_INTERFACE_CHECK                 = ' '
                                 I_BYPASSING_BUFFER                = ' '
                                 I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = ws_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                  = 'EKPO'
                                 I_BACKGROUND_ID                   = ' '
                                 I_GRID_TITLE                      =
                                 I_GRID_SETTINGS                   =
                                 IS_LAYOUT                         =
                                  IT_FIELDCAT                       = lt_fieldcat
                                 IT_EXCLUDING                      =
                                 IT_SPECIAL_GROUPS                 =
                                 IT_SORT                           =
                                 IT_FILTER                         =
                                 IS_SEL_HIDE                       =
        I_DEFAULT                         = 'X'
        I_SAVE                            = 'A'
                                 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                          = itab1
          EXCEPTIONS
                                 PROGRAM_ERROR                     = 1
                                OTHERS                            = 2.
      IF SY-SUBRC <> 0.
        WRITE: 'SY-SUBRC: ', SY-SUBRC .
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *append itab_ekpo to i_tab.
    ENDFORM.                    "GET_DETAILS

  • Display seletion screen values in alv grid output

    Hi,
    I am changing from alv list to alv grid. In ALV list after displaying output, in application tool bar one button is there that is "Display selections", when i click it, is giving all selection screen values in a popup. i want same funtionality in ALV grid.
    By
    jagan

    Hi,
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = l_repid
          i_callback_top_of_page = 'TOP_OF_PAGE'
    FORM top_of_page .
      PERFORM populate_top_of_page .
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = ig_header.
    ENDFORM.                    " top_of_page
    *&      Form  populate_top_of_page
    FORM populate_top_of_page .
      REFRESH ig_header.
      CLEAR wg_header .
      wg_header-typ  = c_h.
      wg_header-info = 'Selection Criteria:'(004).
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      IF NOT s_lgort IS INITIAL.
        CONCATENATE s_lgort-low '-'(111) s_lgort-high
               INTO g_text1 SEPARATED BY space .
      ENDIF.
      wg_header-typ  = c_s.
      wg_header-key = 'Storage Location :'(005).
      wg_header-info = g_text1 .
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      CLEAR g_text1.
      IF NOT s_ekgrp IS INITIAL.
        CONCATENATE s_ekgrp-low '-'(111) s_ekgrp-high
               INTO g_text1 SEPARATED BY space .
      ENDIF.
      wg_header-typ  = c_s.
      wg_header-key = 'Purchasing Group :'(006).
      wg_header-info = g_text1 .
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      CLEAR g_text1.
      IF NOT s_werks IS INITIAL.
        CONCATENATE s_werks-low '-'(111) s_werks-high
               INTO g_text1 SEPARATED BY space .
      ENDIF.
      wg_header-typ  = c_s.
      wg_header-key = 'Plant :'(007).
      wg_header-info = g_text1 .
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      CLEAR g_text1.
    ENDFORM.                    " populate_top_of_page
    Hope this is helpful...
    Regards
    Milan

  • 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

  • How to get selection screen details of any report dynamically

    Hi
    We have a requirement where we need to submit different reports based upon  certain conditions. I need to know FM or other way around to fetch the details of selection screen (name of selection screen parameters or select option and whether its a parameter or select option) any report. Please guide me in this regard.
    Regards
    Swetabh

    DATA : SEL_TAB TYPE RSPARAMS OCCURS 0.
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
        EXPORTING
          CURR_REPORT           = 'ZRP_PACKING_INVOICE_MAIN'
        TABLES
          SELECTION_TABLE       =  SEL_TAB.
        SUBMIT ZSH_SD_INVOICE_NEW WITH
                                        SELECTION-TABLE  SEL_TAB  AND  RETURN.
    above f.m will get the all details of selection screen and give u in internal table  and that can be passed to submit statement...

  • ALV Report output as per selection screen

    Hi,
    I got a requirement. In selection screen there is field where i can entered 1 to 12 numbers. When i entered a number,  so that in output of an alv report should display that many fields
    for eg.
    if  i entered 5 in selection screen
    in out put 5 fields of alv report should display.
    Thanks....
    Moderator message : Spec dumping / Outsourcing is not allowed. Thread locked.
    Edited by: Vinod Kumar on Jul 15, 2011 11:34 AM

    hi,
    u sort the internal table by the materials in our variant.
    like sort itab by jtab
    itab consists of all materials
    jtab cosists of materials in variant.
    hope it may helpful,
    regards,
    chandu

  • 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!!

  • Double Click on ALV Report Output, Bringing to selections creen

    Hello Gurus,
    Please help me When i do double click on ALV Report  output , it is going back to Selection screen, actually its working as Back button. Now how to stop it.. I did debugging but i cannot trace it.

    PERFORM SUB_CREATE_FCAT.
    DATA W_REPID LIKE SY-REPID.
        W_REPID = SY-REPID.
    ls_layout-colwidth_optimize = 'X'.
    ls_layout-zebra = 'X'.
    PERFORM SUB_SORT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                 = SY-CPROG
          I_CALLBACK_PF_STATUS_SET          = 'STATUS'
           I_CALLBACK_USER_COMMAND           = 'C_USERCOMMAND '
    *     I_CALLBACK_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                         = ls_layout
           IT_FIELDCAT                       = IT_FIELDCAT
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
           IT_SORT                           = IT_SORT
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
          I_SAVE                            = 'U'
    *     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                          = T_FINAL
    *   EXCEPTIONS
    *     PROGRAM_ERROR                     = 1
    *     OTHERS                            = 2
       IF sy-subrc <> 0.
    * Implement suitable error handling here
       ENDIF.

  • Issue in displaying header details in ALV report

    Hi,
    I have used slis_t_listheader and REUSE_ALV_COMMENTARY_WRITE to display the header details in ALV report.I want the details to be displayed as below.
    Requester : ----------------------                                                                               Page: 1
    Program: -----------------------                                                                                Date:---------
                                                                     Title of Report
    But when I use the structure slis_t_listheader to display the header details,all the fields are coming one below the other.
    How can I get the fields as shown in the above format
    Edited by: Abaper12345 on Jun 25, 2009 7:54 AM

    Hi,
    Go through following code... its showing the data exactly the way you want....
    REPORT  TEST3.
    TYPE-POOLS:slis.
    TABLES:MARA.
    *Type Declaration
    TYPES:BEGIN OF t_mara,
          matnr TYPE mara-matnr,
          ersda TYPE mara-ersda,
          ernam TYPE mara-ernam,
          END OF t_mara.
    *Internal Table
    data:it_mara type standard table of t_mara.
    *Work Area
    data:wa_mara type t_mara.
    DATA:i_repid TYPE sy-repid .
    i_repid = sy-repid.
    *Declaration for field catalog
    DATA : fcat TYPE slis_t_fieldcat_alv,
           wa_fcat TYPE slis_fieldcat_alv.
    *Declaration for Layout
    data : WA_LAYOUT type SLIS_LAYOUT_ALV.
    *Initializing ColumnWidth_Optimize For Layout
      WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    START-OF-SELECTION
    START-OF-SELECTION.
    *Fetching data into internal tables
      PERFORM get_data.
    *Buil Fieldcatalog
      PERFORM build_fcat.
    *Display ALV Report
      PERFORM alv_display.
    *Build Fieldcat
    FORM build_fcat .
      wa_fcat-tabname = 'IT_MARA'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-inttype = 'C'.
      wa_fcat-seltext_m = 'Material Number'.
      wa_fcat-outputlen = 25.
      wa_fcat-col_pos = 1.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'IT_MARA'.
      wa_fcat-fieldname = 'ERSDA'.
      wa_fcat-inttype = 'C'.
      wa_fcat-seltext_m = 'Date'.
      wa_fcat-outputlen = 25.
      wa_fcat-col_pos = 1.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'IT_MARA'.
      wa_fcat-fieldname = 'ERNAM'.
      wa_fcat-inttype = 'C'.
      wa_fcat-seltext_m = 'User'.
      wa_fcat-outputlen = 25.
      wa_fcat-col_pos = 1.
      APPEND wa_fcat TO fcat.
      CLEAR wa_fcat.
      endform.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    form GET_DATA .
    select matnr ersda ernam from mara into table it_mara.
    endform.                    " GET_DATA
    *&      Form  ALV_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    form ALV_DISPLAY .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = i_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
       I_CALLBACK_HTML_TOP_OF_PAGE       = '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                       = fcat
      TABLES
        t_outtab                          = it_mara
    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  html_top_of_page " I_CALLBACK_HTML_TOP_OF_PAGE  "
    FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
    CALL METHOD document->add_text
      EXPORTING
        text          = 'Program'
        sap_color     = document->list_group
        sap_fontstyle = document->standard
       sap_emphasis  = document->strong.
    CALL METHOD document->new_line
      EXPORTING
        repeat = 1
    CALL METHOD document->add_text
      EXPORTING
        text          = 'Requester'
        sap_color     = document->list_group
        sap_fontstyle = document->standard
       sap_emphasis  = document->strong.
    CALL METHOD document->new_line
      EXPORTING
        repeat = 1
    CALL METHOD document->add_gap
      EXPORTING
         width      = 125
    CALL METHOD document->add_text
      EXPORTING
        text          = 'This Is Test Data'
        sap_color     = document->list_group
       sap_fontsize  = document->LARGE
       sap_fontstyle = document->standard
       sap_emphasis  = document->strong.
    ENDFORM.                    "HTML_TOP_OF_PAGE
    Thanks & Regards
    Ashu SIngh

  • ALV report which displays Delivery and Invoice details..by linking vbfa.

    Hi...
    I wants to develop an ALV Report, which displays Delivery details as well as Invoice details for a range of given sale orders.
    For this report I am using Tables : VBAK,VBAP,LIKP,LIPS,VBFA tables .
    Here VBFA is a table for Document flow how to link this with report ??
    Please reply.
    Regards ,
    ASHOK
    Moderator message : Not enough re-search before posting, spec dumping not allowed. Thread locked.
    Edited by: Vinod Kumar on Aug 1, 2011 9:58 AM

    VBFA has VBELV and POSNV can be used to map VBAP (sales order item) i.e.
    VBFA-VBELV = VBAP-VBELN AND
    VBFA-POSNV = VBAP-POSNV
    with VBTYP_N = J Values available in VBFA-VBELN and VBFA-POSNN will be LIPS -VBELN and LIPS-POSNR
    VBTYP_N/ VBTYP_V = J stands for delivery and C stands for order
    Nitesh

Maybe you are looking for