Alv output with 2 tables..

Hi gurus,
my requirement is as follows:
I have two radio buttons , for two radiobuttons i have two different tables ( different fields in final table ) to display in alv
How can i do this..?
Like the way we do in report program for alv grid display..
Need this urgently..
best regards,
navin fernandes.

hi
1 bind both the view , to 2 different context attribute of type WDUI_VISIBILITY
2 initially set both the views under ur ViewContainer to invisible
// set the context attrribute to '01' to make it invisible
3 now bind the VISIBLE property of ur views to the context attribute
4 now make a action for ur radiobutton & in OnAction of tht , set the attribute to '02' to make either of ur view visible
5 other view wud remain invisible still
u can use code wizard set_attribute method , press control +f7 and set the attribute to '02'
DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
    DATA ls_cn_node TYPE wd_this->element_cn_node .
    DATA lv_attr  LIKE ls_city-ca_attr.
*   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
    lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
*   get element via lead selection
    lo_el_cn_node = lo_nd_cn_node->get_element(  ).
*   set single attribute
    lo_el_cn_node->set_attribute(
      EXPORTING
        name =  `CA_ATTR`
       value = '02' ).
// attribute CA_ATTR under node CN_NODE  set to '02' now
regards,
amit

Similar Messages

  • How to get ALV Output with selected Layout

    I have a program which displays the output in ALV list format and i changed the layout and saved
    In the selection-screen i have a field to select the layout after selecting the layout it output is not coming with that layout
    can anyone tell me what is the problem
    or give me a sample code
    Thank you

    Hi,
    Check this code.
    Hope it helps.
    *& Report  zSALES_ORDER
    report  z_sales_order.
    type-pools: slis.
    *DATA DECLARATION.
    types: begin of i_vbak,
           vbeln type vbeln_va,
           augru type augru,
           erdat type erdat,
           end of i_vbak.
    types: begin of i_vbap,
           vbeln type vbeln_va,
           augru type augru,
           posnr type posnr_va,
           matnr type matnr,
           zmeng type dzmeng,
           end of i_vbap.
    types: begin of i_makt,
           matnr type matnr,
           maktx type maktx,
           end of i_makt.
    types: begin of i_lips,
           posnr type posnr_vl,
           matnr type matnr,
           lfimg type lfimg,
           end of i_lips.
    types: begin of i_reason,
           spras type spras,
           augru type augru,
           bezei type bezei40,
           end of i_reason.
    types: begin of i_vbpa,
           vbeln type vbeln,
           parvw type parvw,
           kunnr type kunnr,
           end of i_vbpa.
    types: begin of i_kna1,
           kunnr type kunnr,
           name1 type name1_gp,
           end of i_kna1.
    types: begin of i_final,
           vbeln type vbeln_va,
           posnr type posnr_va,
           matnr type matnr,
           zmeng type dzmeng,
           maktx type maktx,
           lfimg type lfimg,
           spras type spras,
           augru type augru,
           bezei type bezei40,
           parvw type parvw,
           kunnr type kunnr,
           name1 type name1_gp,
           end of i_final.
    *INTERNAL TABLES
    data: it_vbak type standard table of i_vbak.
    data: it_vbap type standard table of i_vbap.
    data: it_makt type standard table of i_makt.
    data: it_lips type standard table of i_lips.
    data: it_vbpa type standard table of i_vbpa.
    data: it_kna1 type standard table of i_kna1.
    data: it_final type standard table of i_final.
    data: it_reason type standard table of i_reason.
    data : v_flag.
    *WORK AREA
    data: wa_vbak type i_vbak.
    data: wa_vbap type i_vbap.
    data: wa_makt type i_makt.
    data: wa_lips type i_lips.
    data: wa_vbpa type i_vbpa.
    data: wa_kna1 type i_kna1.
    data: wa_final type i_final.
    data: wa_reason type i_reason.
    *DATA DECLARATION.
    data: v_progname type sy-repid.
    data: v_vbeln type vbak-vbeln.
    data: v_gridtitle type lvc_title.
    *PARAMETERS: D_VARI LIKE DISVARIANT-VARIANT.
    data: i_variant like disvariant.
    data: p_vari like disvariant-variant.
    *DATA DECLARATION FOR CATALOGS LAYOUT SORT EVENTCATALOG TOPOFPAGE.
    data: i_fieldcat type slis_t_fieldcat_alv.
    data: i_layout type slis_layout_alv.
    data: i_sortinfo type slis_t_sortinfo_alv.
    data: i_listheader type slis_t_listheader.
    data: i_eventcat type slis_t_event.
    *INITIALIZATION - First point of execution of program
                    To initialize Any variables that are to be
                    used in the program, even before selection screen
                    appears.
    initialization.
      v_progname = sy-repid.
      v_flag = space.
      perform z_default_variant.
    *SELECTION SCREEN
      selection-screen begin of block blk1 with frame title text-002.
      select-options: s_vbeln for v_vbeln.
      selection-screen end of block blk1.
    *Variable for ALV Variant
      selection-screen begin of block b_var with frame title text-020.
      parameters: d_vari like disvariant-variant.
      selection-screen end of block b_var.
    *AT SLECTION-SCREEN.
    at selection-screen.
      perform z_validations.
    *AT SELECTION SCREEN.
    at selection-screen on d_vari.
    CHECK FOR THE EXISTENCE OF THE VARIANT SELECTED
      perform zf_check_var_exist.
    at selection-screen on value-request for d_vari.
    PROVIDE THE F4-HELP.
      perform zf_variant_f4.
    *START OF SELECTION.
    start-of-selection.
      perform z_select.
      perform check_validation_flag.
      perform z_fieldcat using i_fieldcat.
      perform z_layout.
      perform z_sortinfo using i_sortinfo.
      perform z_eventcat using i_eventcat.
      perform z_gridtitle.
      perform z_listheader using i_listheader.
      perform z_display.
    *&      Form  Z_VALIDATIONS
          text
    -->  p1        text
    <--  p2        text
    form z_validations .
      select vbeln into v_vbeln
                   up to 1 rows
                   from vbak
                   where vbeln in s_vbeln.
      endselect.
      if sy-subrc <> 0.
        message i002(sy) with 'No Records'.
        v_flag = 'X'.
      endif.
    endform.                    " Z_VALIDATIONS
    *&      Form  Z_FIELDCAT
          text
         -->P_I_FIELDCAT  text
    form z_fieldcat  using  p_i_fieldcat type slis_t_fieldcat_alv.
      data: i_fieldcat type slis_fieldcat_alv.
    *VBAK-VELN
      i_fieldcat-col_pos     = '1'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'VBELN'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-key         = 'X'.                        " SO THAT THIS FIELD IS NOT SCROLLABLE AND HIDDABLE.
      i_fieldcat-just        = 'C'.                        " FOR JUSTIFICATION.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'SALES ORDER'.              " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   =  15.                         " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBAK'.                     " FOR F1 & F4 HELP AS REFERNCED TO THE DDIC TABLE.
      append i_fieldcat to p_i_fieldcat.
    *VBAP-SPRAS
      i_fieldcat-col_pos     = '2'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'SPRAS'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'LANGUAGE'.                     " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 5.                          " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'TVAUT'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *VBAP-AUGRU
      i_fieldcat-col_pos     = '3'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'AUGRU'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'REASON'.                     " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 5.                          " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBAK'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *VBAP-bezei
      i_fieldcat-col_pos     = '4'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'BEZEI'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'DESCRIPTION'.                     " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 20.                          " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'TVAUT'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *VBAP-POSNR
      i_fieldcat-col_pos     = '5'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'POSNR'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'ITEM'.                     " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 8.                          " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBAP'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *VBAP-MATNR.
      i_fieldcat-col_pos     = '6'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'MATNR'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'MATERIAL'.                 " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 10.                         " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBAP'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *VBAP-ZMENG
      i_fieldcat-col_pos     = '7'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'ZMENG'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'QUANT'.                     " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 10.                          " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBAP'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *MAKT-MAKTX
      i_fieldcat-col_pos     = '8'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'MAKTX'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'DESCRIPTION'.                     " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 20.                          " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'MAKT'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *LIPS-VBELN
      i_fieldcat-col_pos     = '9'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'VBELN'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'DELIVERY'.                 " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   = 15.                         " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'LIPS'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *LIPS-LFIMG
      i_fieldcat-col_pos     = '10'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'LFIMG'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-do_sum      = 'X'.
      i_fieldcat-seltext_l   = 'LFIMG'.                    " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   =  18.                        " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'LIPS'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *parvw
      i_fieldcat-col_pos     = '11'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'PARVW'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'PARTNER FUN'.                    " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   =  18.                        " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBPA'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *KUNNR
      i_fieldcat-col_pos     = '12'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'KUNNR'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'SHIP'.                    " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   =  18.                        " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'VBPA'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    *NAME1
      i_fieldcat-col_pos     = '13'.                        " POSITION OF THE COLUMN.
      i_fieldcat-fieldname   = 'NAME1'.                    " FIELD FOR WHICH CATALOG ID FILLED.
      i_fieldcat-tabname     = 'IT_FINAL'.                 " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
      i_fieldcat-lzero       = 'X'.                        " OUTPUT WITH LEADING ZEROS.
      i_fieldcat-seltext_l   = 'NAME'.                    " LONG TEXT FOR HEADER.
      i_fieldcat-outputlen   =  18.                        " SET THE OUTPUT LENGTH.
      i_fieldcat-ref_tabname = 'KNA1'.                     " FOR F1 & F4 HELP AS REFERNCED TO TABLE.
      append i_fieldcat to p_i_fieldcat.
    endform.                    " Z_FIELDCAT
    *&      Form  Z_SELECT
          text
    -->  p1        text
    <--  p2        text
    form z_select .
      select vbeln
             augru erdat into corresponding fields of table it_vbak
                   from vbak
                   where vbeln in s_vbeln.
      loop at it_vbak into wa_vbak.
        wa_vbak-erdat = '99991231'.
        modify it_vbak from wa_vbak transporting erdat.
      endloop.
    select * from vbak into corresponding fields of table it_vbak
                   for all entries in it_vbak
                   where erdat = it_vbak-erdat.
      if sy-subrc = 0.
        select vbeln
               posnr
               matnr
               zmeng into corresponding fields of table it_vbap
                     from vbap
                     for all entries in it_vbak
                     where vbeln = it_vbak-vbeln.
        if sy-subrc = 0.
          select spras
                 augru
                 bezei into corresponding fields of table it_reason
                       from tvaut
                       for all entries in it_vbak
                       where augru = it_vbak-augru.
          if sy-subrc = 0.
            select vbeln
                   parvw
                   kunnr into corresponding fields of table it_vbpa
                         from vbpa
                         for all entries in it_vbak
                         where vbeln = it_vbak-vbeln.
            if sy-subrc = 0.
              select kunnr
                     name1 into corresponding fields of table it_kna1
                           from kna1
                           for all entries in it_vbpa
                           where kunnr = it_vbpa-kunnr.
              if sy-subrc = 0.
                select posnr
                       matnr
                       lfimg into corresponding fields of table it_lips
                             from lips
                             for all entries in it_vbap
                             where posnr = it_vbap-posnr.
                if sy-subrc = 0.
                  select matnr
                         maktx into corresponding fields of table it_makt
                               from makt
                               for all entries in it_vbap
                               where matnr = it_vbap-matnr.
                endif.
              endif.
            endif.
          endif.
        endif.
      else.
        message i002(sy) with 'No Data found'.
        leave list-processing.
      endif.
      if sy-subrc = 0.
        loop at it_vbap into wa_vbap.
          read table it_vbak into wa_vbak with key vbeln = wa_vbap-vbeln binary search.
          if sy-subrc = 0.
    *MOVE DATA INTO IT_FINAL.
            move: wa_vbak-vbeln to wa_final-vbeln,
                  wa_vbak-augru to wa_final-augru,
                  wa_vbap-posnr to wa_final-posnr,
                  wa_vbap-matnr to wa_final-matnr,
                  wa_vbap-zmeng to wa_final-zmeng.
          endif.
          read table it_lips into wa_lips with key posnr = wa_final-posnr binary search.
          if sy-subrc = 0.
            move: wa_lips-lfimg to wa_final-lfimg.
          endif.
          read table it_reason into wa_reason with key augru = wa_final-augru binary search.
          if sy-subrc = 0.
            move: wa_reason-spras to wa_final-spras,
                  wa_reason-bezei to wa_final-bezei.
          endif.
          read table it_makt into wa_makt with key matnr = wa_final-matnr binary search.
          if sy-subrc = 0.
            move: wa_makt-maktx to wa_final-maktx.
          endif.
         read table it_vbpa into wa_vbpa with key vbeln = wa_final-vbeln binary search.
          if sy-subrc = 0.
            move: wa_vbpa-parvw to wa_final-parvw,
                  wa_vbpa-kunnr to wa_final-kunnr.
          endif.
           read table it_kna1 into wa_kna1 with key kunnr = wa_final-kunnr binary search.
          if sy-subrc = 0.
            move: wa_kna1-name1 to wa_final-name1.
          endif.
          append wa_final to it_final.
          clear wa_final.
        endloop.
      endif.
    endform.                    " Z_SELECT
    *&      Form  Z_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    form z_layout .
      i_layout-zebra = 'X'.
      i_layout-totals_text = 'Total'(a00).
      i_layout-subtotals_text = 'SubTotal'(a01).
      i_layout-box_tabname = 'IT_FINAL'.
    endform.                    " Z_LAYOUT
    *&      Form  Z_SORTINFO
          text
         -->P_I_SORTINFO  text
    form z_sortinfo  using    p_i_sortinfo type slis_t_sortinfo_alv.
      data: i_sortinfo type slis_sortinfo_alv.
      clear i_sortinfo.
      i_sortinfo-spos = '1'.
      i_sortinfo-fieldname = 'VBELN'.
      i_sortinfo-tabname = 'IT_FINAL'.
      i_sortinfo-up = 'X'.
      i_sortinfo-group = 'UL'.                     " I.E UNDERLINE AFTER EVERY GROUP
      i_sortinfo-subtot = 'X'.
      append i_sortinfo  to p_i_sortinfo.
    endform.                    " Z_SORTINFO
    *&      Form  Z_EVENTCAT
          text
         -->P_I_EVENTCAT  text
    form z_eventcat  using    p_i_eventcat type slis_t_event.
      data: i_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = p_i_eventcat
        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.
      clear i_event.
      read table p_i_eventcat with key name = slis_ev_top_of_page into
      i_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
      if sy-subrc = 0.
        move 'SET_PF_STATUS' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      clear i_event.
      read table p_i_eventcat into i_event with key name = slis_ev_user_command .
      if sy-subrc = 0.
        move 'USER_COMMAND' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
    endform.                    " Z_EVENTCAT
    *&      Form  Z_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    form z_display .
      call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = v_progname
         i_callback_pf_status_set          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = v_gridtitle
         i_save                            = 'A'
         is_layout                         = i_layout
         it_fieldcat                       = i_fieldcat[]
         it_sort                           = i_sortinfo
         it_events                         = i_eventcat
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = it_final
       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.                    " Z_DISPLAY
    *&      Form  Z_GRIDTITLE
          text
    -->  p1        text
    <--  p2        text
    form z_gridtitle .
      v_gridtitle = 'ALV FOR SALES ORDER DISPLAY'.
    endform.                    " Z_GRIDTITLE
    *TOP OF PAGE.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = i_listheader.
    endform.                    "TOP_OF_PAGE
    *MENU SETTINGS.
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ALV_MENU'.
    endform.                    "SET_PF_STATUS
    *USER-COMMAND
    form user_command using p_ucomm type sy-ucomm
                            rs_selfield type slis_selfield.
      data : vbeln type vbeln_va.
      case p_ucomm.
        when 'BACK'.
          leave program.
        when '&IC1'.
          clear : vbeln.
          vbeln = rs_selfield-value.
          set parameter id: 'AUN' field vbeln.
          call transaction 'VA03' and skip first screen.
      endcase.
    endform.                    " USER_COMMAND
    *&      Form  Z_LISTHEADER
          text
         -->P_I_LISTHEADER  text
    form z_listheader using p_i_listheader type slis_t_listheader.
      data: l_listheader type slis_listheader.
      refresh p_i_listheader.
      clear l_listheader.
      l_listheader-typ = 'H'.
      l_listheader-info = text-001.
      append l_listheader to p_i_listheader.
      clear l_listheader.
      l_listheader-typ = 'H'.
      l_listheader-info = text-002.
      append l_listheader to p_i_listheader.
    endform.                    " Z_LISTHEADER
    *&      Form  check_validation_flag
          text
    -->  p1        text
    <--  p2        text
    form check_validation_flag .
      if not v_flag is initial.
        leave list-processing.
      endif.
    endform.                    " check_validation_flag
    *&      Form  Z_DEFAULT_VARIANT
          text
    -->  p1        text
    <--  p2        text
    form z_default_variant .
      i_variant-report = v_progname.
      call function 'REUSE_ALV_VARIANT_DEFAULT_GET'
        exporting
          i_save        = 'A'
        changing
          cs_variant    = i_variant
        exceptions
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          others        = 4.
      if sy-subrc = 0.
        p_vari = i_variant-variant.
       D_VARI = P_VARI.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " Z_DEFAULT_VARIANT
    *&      Form  ZF_CHECK_VAR_EXIST
          text
    -->  p1        text
    <--  p2        text
    form zf_check_var_exist .
      data: l_variant like disvariant.
      if not p_vari is initial.
        clear l_variant.
        l_variant-report = v_progname.
        l_variant-variant = p_vari.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
          exporting
            i_save        = 'U'
          changing
            cs_variant    = l_variant
          exceptions
            wrong_input   = 1
            not_found     = 2
            program_error = 3
            others        = 4.
        if sy-subrc = 0.
          clear i_variant.
          move: l_variant-variant to i_variant-variant,
                l_variant-report to i_variant-report.
        else.
          message id sy-msgid type sy-msgty number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.
      endif.
    endform.                    " ZF_CHECK_VAR_EXIST
    *&      Form  ZF_VARIANT_F4
          text
    -->  p1        text
    <--  p2        text
    form zf_variant_f4 .
      data: x_variant like disvariant.
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant                = i_variant
      I_TABNAME_HEADER          =
      I_TABNAME_ITEM            =
      IT_DEFAULT_FIELDCAT       =
         i_save                    = 'U'
         i_display_via_grid        = 'X'
       importing
      E_EXIT                    =
         es_variant                = x_variant
       exceptions
         not_found                 = 1
         program_error             = 2
         others                    = 3
      if sy-subrc = 0.
        p_vari = x_variant-variant.
        d_vari = p_vari.
        clear i_variant.
        move: x_variant-variant to i_variant-variant,
              x_variant-report to i_variant-report.
      else.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " ZF_VARIANT_F4
    Regards,
    Pritha.

  • Compare editable alv output with database fields

    I generated 1 editable alv report with attaching flat file data,
    but i want to change the wrong fields in alv output and compare with database filds for validation.
    but when i do this . it takes previous entries of flat file.
    how can i solve it?

    Your title is much better than in the first post, however your problem description hasn't changed.
    Let me guess, you are importing a flat file, present the contents in an editable ALV grid, some values are being changed, and now the changed values do not reflect in the internal table, instead you are seeing the values as imported from the file?
    If yes -> FAQ, please search for the many previous discussions of this topic.
    Thomas

  • Regarding ALV outputs ( with layout variants)

    Hi,
    I have a problem where in an ALV report when it is executed with a variant (there is one layout parameter in the screen which is also filled. This layout is set with a filter),
    displays the output. But the displayed output doesn't filter the output as per the required criteria set in the layout filter.
    When I execute the report with the same variant but now if I select the layout by pressing F4 on the layout field and select the same layout as earlier (which is having the filter criteria), now it displays the output as per the required criteria set in the filter.
    I don't understand why if I execute the report with a variant with the layout value also filled, it is not able to give the required output as per the filter criteria set for the layout.
    When the report is executed with the same variant but the layout value selected from F4, it dispalys the correct output with the filter criteria set for the layout.
    In general, I mean why the program is not able to load the layout with filter when it is called from a variant?
    Regards,
    Rajesh

    It depends on your Layout, How you saved it .
    And one more question are you passing the layout parameter and Filter parameter to the Function module

  • Is it possible to create the ALV output with dropdown list for the columns

    Hi forum experts,
                              Could the ALV output contain the dropdown list for the column names? if yes, then how we can acheive this to happen.
    Thanks in advance,
    Regards,
    Samad.
    Edited by: Samad arif on Aug 21, 2009 4:40 PM

    Hi Arif,
    Yes we can .FOr the codding check the article,
    [dropdowns in ALV|https://wiki.sdn.sap.com/wiki/display/Snippets/DropdownsinALV]
    regards,
    Archana
    Edited by: Archana Kumari on Aug 21, 2009 1:22 PM

  • ALV Grid with table type structure

    I created a structure with a table type in it. I want to display an ALV Grid report with that structure. Is it even possible. If yes, can someone please provide some reference. Thanks.
    Edited by: Sreekanth Nadella on Sep 4, 2010 2:29 AM

    Hi Clemens,
    The output should like a normal ALV Grid report. Just like a deep structure, one of the cell will have multiple row/value just like table. So you are looking at something like this.
    A               B               C              1         2         3            D             E
                                                       4         5         6
                                                       7         8         9
    F               G               H              1         2         3            I               J
                                                       4         5         6
                                                       7         8         9
    Thanks.

  • Alv output with lines

    hi all,
       is it possible to display alv report output when printed with horizontal, vertical lines.
    when displayed we can see the lines, but i want to see the lines in the print out also.
    how

    Hi,
    Try using this class SE24-> CL_GUI_ALV_GRID-> to display list in ALV format.
    In the attributes section we can see tehe Printing Options like-
    MC_FC_PRINT
    MC_FC_PRINT_PREV
    using them we can set the lines and thier display on printout aslo.
    We can aslo use the loayout atribues method-SET_LAYOUT_PROPERTIES to set the properties you reuqire.
    You can study more on this.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • Using ALV function with tables

    Hello Everyone,
    Can anyone pls explain with an example how to use ALV in unicode to write out a table.  Since following statements is porducing error:
    write:/T510N, 'T510N was changed'.
    it gives uncompatible error.  In non unicode system it works fine.
    Thanks in advanced.

    Hi
    check this doc regarding Unicode
    The Link will be helpful to you.
    Re: Upgrade 4.6 to ECC - What are the responsibilites
    regarding Unicode influence in Standard programs
    Very good document:
    http://www.doag.org/pub/docs/sig/sap/2004-03/Buhlinger_Maxi_Version.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d37d1ad9-0b01-0010-ed9f-bc3222312dd8
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/589d18d9-0b01-0010-ac8a-8a22852061a2
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f8e316d9-0b01-0010-8e95-829a58c1511a
    You need to use the transaction UCCHECK.
    The report documentation is here
    ABAP Unicode Scan Tool UCCHECK
    You can use transaction UCCHECK to examine a Unicode program set for syntax errors without having to set the program attribute "Unicode checks active" for every individual program. From the list of Unicode syntax errors, you can go directly to the affected programs and remove the errors. It is also possible to automatically create transport requests and set the Unicode program attribute for a program set.
    Some application-specific checks, which draw your attention to program points that are not Unicode-compatible, are also integrated.
    Selection of Objects:
    The program objects can be selected according to object name, object type, author (TADIR), package, and original system. For the Unicode syntax check, only object types for which an independent syntax check can be carried out are appropriate. The following object types are possibilities:
    PROG Report
    CLAS Class
    FUGR Function groups
    FUGX Function group (with customer include, customer area)
    FUGS Function group (with customer include, SAP area)
    LDBA Logical Database
    CNTX Context
    TYPE Type pool
    INTF Interface
    Only Examine Programs with Non-Activated Unicode Flag
    By default, the system only displays program objects that have not yet set the Unicode attribute. If you want to use UCCHECK to process program objects that have already set the attribute, you can deactivate this option.
    Only Objects with TADIR Entry
    By default, the system only displays program objects with a TADIR entry. If you want to examine programs that don't have a TADIR entry, for example locally generated programs without a package, you can deactivate this option.
    Exclude Packages $*
    By default, the system does not display program objects that are in a local, non-transportable package. If you want to examine programs that are in such a package, you can deactivate this option.
    Display Modified SAP Programs Also
    By default, SAP programs are not checked in customer systems. If you also want to check SAP programs that were modified in a customer system (see transaction SE95), you can activate this option.
    Maximum Number of Programs:
    To avoid timeouts or unexpectedly long waiting times, the maximum number of program objects is preset to 50. If you want to examine more objects, you must increase the maximum number or run a SAMT scan (general program set processing). The latter also has the advantage that the data is stored persistently. Proceed as follows:
    - Call transaction SAMT
    - Create task with program RSUNISCAN_FINAL, subroutine SAMT_SEARCH
    For further information refer to documentation for transaction SAMT.
    Displaying Points that Cannot Be Analyzed Statically
    If you choose this option, you get an overview of the program points, where a static check for Unicode syntax errors is not possible. This can be the case if, for example, parameters or field symbols are not typed or you are accessing a field or structure with variable length/offset. At these points the system only tests at runtime whether the code is sufficient for the stricter Unicode tests. If possible, you should assign types to the variables used, otherwise you must check runtime behavior after the Unicode attribute has been set.
    To be able to differentiate between your own and foreign code (for example when using standard includes or generated includes), there is a selection option for the includes to be displayed. By default, the system excludes the standard includes of the view maintenance LSVIM* from the display, because they cause a large number of messages that are not relevant for the Unicode conversion. It is recommended that you also exclude the generated function group-specific includes of the view maintenance (usually L<function group name>F00 and L<function group name>I00) from the display.
    Similarly to the process in the extended syntax check, you can hide the warning using the pseudo comment ("#EC *).
    Applikation-Specific Checks
    These checks indicate program points that represent a public interface but are not Unicode-compatible. Under Unicode, the corresponding interfaces change according to the referenced documentation and must be adapted appropriately.
    View Maintenance
    Parts of the view maintenance generated in older releases are not Unicode-compatible. The relevant parts can be regenerated with a service report.
    UPLOAD/DOWNLOAD
    The function modules UPLOAD, DOWNLOAD or WS_UPLOAD and WS_DOWNLOAD are obsolete and cannot run under Unicode. Refer to the documentation for these modules to find out which routines serve as replacements.
    Regards
    Anji

  • Alv output with pushbuttons

    Hi all ,
    how can i get alv out put with two push buttons?

    Hi,
    You can add push buttons in the application toolbar..
    Go to SE41...
    Press copy status..(Ctrl + F6)
    Frm                                      
      Program         SAPLKKBL               
      Status          STANDARD               
    to                                       
      Program         Y_TEST_PROGRAM  "GIve your program.
      Status            TEST2                     
    Press Copy..
    Then go to change mode..And give function codes in the application tool bar..
    Then check this program of how to display the new status..Marked in bold..
    TYPE-POOLS: slis.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    DATA: s_layout       TYPE slis_layout_alv.
    DATA: BEGIN OF itab OCCURS 0,
          icon  TYPE icon-id,
          vbeln TYPE vbeln,
          kunnr TYPE kunnr,
          erdat TYPE erdat,
          box TYPE c,
    END OF itab.
    DATA: v_repid        TYPE syrepid.
    START-OF-SELECTION.
    Get the data.
      SELECT vbeln kunnr erdat UP TO 100 ROWS
             FROM vbak
             INTO CORRESPONDING FIELDS OF TABLE itab.
      IF sy-subrc <> 0.
        MESSAGE s208(00) WITH 'No data found'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    Modify the record with red light.
      itab-icon = '@0A@'.
      MODIFY itab TRANSPORTING icon WHERE NOT vbeln IS initial.
      v_repid = sy-repid.
    Get the field catalog.
      CLEAR: s_fieldcatalog.
      s_fieldcatalog-col_pos = '1'.
      s_fieldcatalog-fieldname = 'ICON'.
      s_fieldcatalog-tabname   = 'ITAB'.
      s_fieldcatalog-seltext_l = 'Status'.
      s_fieldcatalog-icon      = 'X'.
      APPEND s_fieldcatalog TO t_fieldcatalog.
      CLEAR: s_fieldcatalog.
      s_fieldcatalog-col_pos = '2'.
      s_fieldcatalog-fieldname = 'VBELN'.
      s_fieldcatalog-tabname   = 'ITAB'.
      s_fieldcatalog-rollname  = 'VBELN'.
      APPEND s_fieldcatalog TO t_fieldcatalog.
      CLEAR: s_fieldcatalog.
      s_fieldcatalog-col_pos = '3'.
      s_fieldcatalog-fieldname = 'KUNNR'.
      s_fieldcatalog-tabname   = 'ITAB'.
      s_fieldcatalog-rollname  = 'KUNNR'.
      APPEND s_fieldcatalog TO t_fieldcatalog.
      CLEAR: s_fieldcatalog.
      s_fieldcatalog-col_pos = '4'.
      s_fieldcatalog-fieldname = 'ERDAT'.
      s_fieldcatalog-tabname   = 'ITAB'.
      s_fieldcatalog-rollname  = 'ERDAT'.
      APPEND s_fieldcatalog TO t_fieldcatalog.
    Set the layout.
      s_layout-box_fieldname = 'BOX'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program       = v_repid
                is_layout                = s_layout
    <b>            i_callback_pf_status_set = 'SET_PF_STATUS'</b>
                i_callback_user_command  = 'USER_COMMAND'
                it_fieldcat              = t_fieldcatalog[]
           TABLES
                t_outtab                 = itab.
          FORM SET_PF_STATUS                                            *
    -->  EXTAB                                                         *
    FORM set_pf_status USING  extab TYPE slis_t_extab.
    <b>  SET PF-STATUS 'TEST2'.</b>
    ENDFORM.
          FORM user_command                                             *
    -->  UCOMM                                                         *
    -->  SELFIELD                                                      *
    FORM user_command USING ucomm LIKE sy-ucomm
                            selfield TYPE slis_selfield.
    Check the ucomm.
      IF ucomm = 'DETAIL'.
        LOOP AT itab WHERE box = 'X'.
          itab-icon = '@08@'.
          MODIFY itab TRANSPORTING icon.
        ENDLOOP.
      ENDIF.
      selfield-refresh = 'X'.
    ENDFORM.
    Thanks,
    Naren

  • Eidting alv output with fieldcatlog

    hi abap guru's .
    i have a requirement that , i want only one editable field , i am using fieldcatlog-edit = 'x'.
    and not layout-edit b'coz i want only one editable field if i use layout-edit then all fieds are editable.
    by using fieldcatlog-edit = 'x' it is allowing me to edit but internal table is not updated like that in
    layout-edit and i want to updated internal table first & then database table.
    thanks in advance.

    My report is as follows ,
    suppose i want to edit the field netpr
    *& Report  ZTESTFUNCTION
    REPORT  ZTESTFUNCTION.
    tables:     ekko, ekpo.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    types: begin of t_ekko,
      sel,
      CHECK TYPE SYMBOL,                         "stores which row user has selected
      ebeln type ekpo-ebeln,
      ebelp type ekpo-ebelp,
      matnr type ekpo-matnr,
      menge type ekpo-menge,
      netpr type ekpo-netpr,
      NETWR TYPE EKPO-NETWR,
      end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
          wa_ekko type t_ekko.
    DATA : IT_EKKO1 TYPE STANDARD TABLE OF T_EKKO WITH HEADER LINE .
    DATA : IT_EKKO2 TYPE STANDARD TABLE OF T_EKKO WITH HEADER LINE .
    *ALV data declarations
    data:
          fieldcatalog 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.
         it_fieldcat TYPE  slis_t_fieldcat_alv,
          wa_fieldcat LIKE LINE OF it_fieldcat.
    DATA: ref_grid TYPE REF TO cl_gui_alv_grid,
          IT_EKKO3 TYPE T_EKKO .
    select-options: so_EBELN FOR ekpo-EBELN.
    *Start-of-selection.
    start-of-selection.
    *SET LOCALE LANGUAGE 'EN'
             country 'C'
              modifier 'M'.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 1.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
       fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
       fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'MATERIAL NO'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    fieldcatalog-fieldname   = 'TXZ01'.
      fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'MATERIAL DESC'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
       fieldcatalog-fieldname   = 'MENGE'.
        fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
       fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 6.
      fieldcatalog-outputlen   = 15.
    fieldcatalog-edit     = 'X'.
    fieldcatalog-input    = 'X'.
            "Display column total
    fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETWRR'.
       fieldcatalog-TABNAME    = 'IT_EKKO'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
    fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'. "Display column total
    fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-box_fieldname     = 'SEL'.
                                     "set field name to store row selection
    gd_layout-edit             = 'X'.
      gd_layout-zebra             = 'X'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_fieldcat             = it_fieldcat
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    SELECT * FROM EKPO INTO
             CORRESPONDING FIELDS OF TABLE IT_EKKO
             WHERE EBELN IN SO_EBELN.
      SORT IT_ekko DESCENDING BY MATNR .
    endform.                    " DATA_RETRIEVAL

  • Unable to download data in ALV output with local file option

    Hi,
    I am displaying ouput in ALV grid display.Its showing output fine.When i am trying to down load the data into Excel file from ALV ouput .when i am downloaded the data by using Local file option,its down loading the data but its not downloading all the fields.
    Could you plz provide me solution.Thanks!

    Just Check that one of your parameters is defined in lower case letters.
    Earlier it used to give dump on execution but now if you download then it will give ABAP dump.
    I have seen this problem many times.
    Regards,
    Gaurav Sood

  • How to download the ALV output with colors into the excel sheet

    Hi,
      I'm having an ALV Grid report output where each and every row has some colors in it. When i download it to an excel sheet whatever the colors that comes on the output of the report the same should come in the excel sheet. When i download the output to an excel sheet using List --> Export -->Local file . If i open the excel files no colors are coming in the excel sheet.
    can anyone tell how to get the colors in the excel sheet also. thanks...
    Regards,
    Rose.

    Hi Camila,
    Use the OLE concept.
    Check the below threads:
    Colors in Excel Sheet
    colors in alv
    Regards,
    Soumya.

  • Horizontal Output With Table

    Hi folks,
    - Let's say that the results of a query were 15 items
    - normally they would be listed vertically one at a time
    like:
    item1
    item2
    item3
    item4
    item5
    etc.
    Q: I'm curious if there is a technique to list them a few
    different ways like:
    - Horizontal with 3 columns like:
    item1 - item2 - item3
    item4 - item5 - item6
    item7 - item8 - item9
    etc...
    or a mixture:
    item1 - item6 - item11
    item2 - item7 - item12
    item3 - item8 - item13
    item4 - item9 - item14
    item5 - item10 - item15

    Well, you could use a mixture of CSS and some conditional
    logic in ColdFusion.
    Make a DIV 300px wide. Then, make each item inside 100px
    wide. Float these items all left and voila! You now have the 3
    items per row.
    E.g:
    <div style="width:300px; float: left; clear: both;
    background: yellow;">
    <div style="width: 100px; float:
    left;">Item</div>
    <div style="width: 100px; float:
    left;">Item</div>
    <div style="width: 100px; float:
    left;">Item</div>
    <div style="width: 100px; float:
    left;">Item</div>
    <div style="width: 100px; float:
    left;">Item</div>
    <div style="width: 100px; float:
    left;">Item</div>
    </div>
    For your next model...you could work out where to break the
    loop every fifth item e.g. after item 5, then, 10, then 15 etc
    using MOD in a CFIF tag. Google MOD for ColdFusion to find out
    more. You'd test this against the recordcount of the query or
    something...or perhaps even the index number if it's just a normal
    loop or list loop.
    Good luck,
    Mikey.

  • ALV output with different Titles

    Hi,
    I have one requirement,that we have set of radibuttons in selection screen.
    when we are selecting that radiobutton ALV out put will be displayed.
    but user wants the description of the selected radio button in Menu Title Bar of AlV out put.
    can any one help me to know ,what is approach to sort this...?
    Thanks...

    Hi Sekhar,
    go through this thread.
    Changing title bar of ALV  list
    also try this code patch.
    start-of-selection.
    SET PF-STATUS 'MAIN'.
    SET TITLEBAR 'TEST'.
    write 'hi'.
    at user-command.
    if sy-ucomm = 'TEST'.
    MESSAGE 'HI' TYPE 'I'.
    ENDIF.
    Regards,
    Vijay

  • Alv  output problem

    I have alv output with some values, now I need to put a push button  on application tool bar  if I change any values in the out put  and then press that push button  then the new values should be updated with out re execution  of the alv  program .   how to do it.

    Hi Kiran,
    <li> The below code is more than enough. It works for your requirement.
    <li>Define events
    DATA: it_events TYPE slis_t_event,
               wa_event like line of it_events.
    <li>Fill events like below.
    wa_events-name = 'PF_STATUS_SET'.
    wa_events-form = 'PF_STATUS_SET'.
    append wa_events to it_events.
    clear   wa_events.
    wa_events-name = 'USER_COMMAND'.
    wa_events-form =  'USER_COMMAND'.
    append wa_events to it_events.
    clear   wa_events.
    <li>Set pf status like below.
    FORM PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'STATUS' EXCLUDING rt_extab.
    "When you set pf-status using above statement, you dont see ALV toolbar. To get back all the tools copy status of the any "program status which is using ALV in SE41 transaction code to your program with status you mentioned here.
    "Program :SAPLKKBL
    "status    :STANDARD_FULLSCREEN
    ENDFORM.
    <li>Use USER_COMMAND event like below
    *&      Form  USER_COMMAND
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
      IF R_UCOMM = 'REFRESH'."Create one button on ALV toolbar with function code REFRESH
        RS_SELFIELD-REFRESH = 'X'. "Set this one. It refreshes internal table data with new values
      ENDIF.
    ENDFORM.                    "USER_COMMAND
    <li>Call function module like below
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
             EXPORTING
                  i_callback_program = program
                  it_fieldcat        = it_fieldcat
                  it_events          = it_events
             TABLES
                  t_outtab           = i_mard.
    Let me know if you have any problem.
    Thanks
    Venkat.O

Maybe you are looking for

  • UC on UCS

    Does anyone know the official word on Enterprise Contact Center on UCS. There was a bunch of information "prior to the official release of UC 8.0" listing Various UCCE applications as being supported on UCS/VMware. The latest information showing supp

  • How to export an InDesign newsletter to HTML code

    a prospective client is using InDesign and asked if she could get a newsletter into our software app...in HTML code. any thoughts if this is possible, as i do not use the program. if possible, can you provide info on what to click so i can describe t

  • Problems with war file,popups and forms

    Hi All, we are using adf faces and jdeveloper 11g for our project. Development work and all have happened fine, but we are facing few problems when we created the war file of the project and deployed it on tomcat 6.0 . The major problem we are facing

  • Installing jam packs from DVD on Lion

    When I got my new iMac last year it came with Snow Leopard. At the time, I attempted to install all my jam packs (I have all of them) and it gave me an error that Rosetta was not installed. After installing it, I was able to install my jam packs, whi

  • HT5395 "Could not sing in to iMessage: the server encounter an error processing registration.  Please try again later. any clue?

    Hi! Long story sort: I did a backup from my Iphone on my computer in iTunes. Since that, the iMessage on my computer is offline I try to sign in with my AppleID but I can't The message is: Could not sign in to Imessage.  The server encounter an error