How to get ALV Display with First column alone in sort

How to get ALV Display with First column alone in sort

HI,
You can build Internal Table and send this to the parameter "IT_SORT".
eg:
"the sorting Internal Table structure is as whown below.
DATA:  t_sort_info type slis_t_sortinfo_alv.
"Build the Sort Internal Table
  t_sort_info-fieldname = 'CARRID'.
  t_sort_info-subtot = 'X'.
  append t_sort_info.
  t_sort_info-fieldname = 'FLDATE'.
  t_sort_info-subtot = 'X'.
  append t_sort_info.
Then pass this "IT_SORT_INFO" table to the Function module "Reuse_alv_*". (Note send the body of the Internal table only like "<b>IT_SORT = IT_SORT_INFO[]</b>".
Here i am making ALV output sorted on CARRID & FLDATE.
You can specify only the First Column name for sorting.
Regards,
Manju
Message was edited by:
        MANJUNATHA KS

Similar Messages

  • How to get fourthly row (row4) first column value (col1) in matrix

    Hi to all,
    In FMS, how to get fourthly row (row4) first column value (col1) in matrix in document.
    select $[$38.1.4]
    But it display the first row
    Please give me hint.
    Thank you

    Hi Eric,
    FMS may only apply to current row.  There is no way to get any other fixed row.
    Thanks,
    Gordon

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

  • How to design ALV GRID with a column in NON-editable Mode and has F4 Help?

    Hello Friends,
      How to code for ALV GRID, which has a column that takes value only from F4 Help and does not accept any other user input?
    Can I have that column non-editable and yet has F4 Help?
    Please help ASAP.

    Hi,
      The examples in the mentioned programs do not suffice my problem.In these programs. They have made the cell non-editable but you cant even input value through F4 Help.
    I want to make a cell non-editable (which can be changed only through F4 Help), which do not accept user input.

  • How to get length of data on column with long datatype

    How to get length of data on column with long datatype without using pl/sql block

    ...another reason not to use LONG datatype for columns.
    Oracle advises to switch to LOB columns instead
    SQL> create table t
      2  (x long)
      3  /
    Table created.
    SQL> insert into t values (rpad ('x', 10000, 'x'))
      2  /
    1 row created.
    SQL> alter table t
      2  modify x clob
      3  /
    Table altered.
    SQL> desc t
    Name                                      Null?    Type
    X                                                  CLOB

  • All the data getting exported in the first column of csv while exporting

    Hi All,
    In 11.5.10.2, I have a page with advanced table region. Am using OA Framework's export button to export the results.
    But, problem is, All the results are getting exported in the first column of the output .csv file. Why such a behavior?
    Profile Option of 'Export MIME Type' value is text/text-separted-values.
    Any ideas would be of timely help. Thanks.
    Regards, Soorya

    From OAF standpoint, it just exports the data. Data interpretation is completely dependent on client machine and excel setups.
    Please check the Data-->Text to Columns wizard where we can specify the delimiter(s) on excel.
    Not sure if this can be set up in Apps, so that we need not change on every end-user machine.
    Hope this helps.
    -- Thanks

  • How to get command history with timestamp ?

    how to get command history with timestamp ?

    If you are using bash:
    HISTTIMEFORMAT If this variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each history entry displayed by the history builtin. If this variable is set, time stamps are written to the history file so they may be preserved across shell sessions.
    [SunOS 5.10/bash] [email protected]:/etc/ftpd
    # HISTTIMEFORMAT="%h/%m - %H:%M:%S ";export HISTTIMEFORMAT;history
        1  Aug/08 - 19:07:52 chmod a+rwx /root
        2  Aug/08 - 19:07:52 ll /
        3  Aug/08 - 19:07:52 tail -f /root/mylog.log
        4  Aug/08 - 19:07:52 vi /usr/dt/bin/Xsession
        5  Aug/08 - 19:07:52 cat /root/mylog.log
        6  Aug/08 - 19:07:52 ls /export/home/p661210/.dt
        7  Aug/08 - 19:07:52 ls -la  /export/home/p661210/.dt
        8  Aug/08 - 19:07:52 cat  /export/home/p661210/.dt/errorlog
        9  Aug/08 - 19:07:52 vi /usr/dt/config/C/sys.dtwmrc
       10  Aug/08 - 19:07:52 ls
       11  Aug/08 - 19:07:52 cat Xresources.jds
       12  Aug/08 - 19:07:52 vi /usr/dt
    [SunOS 5.10/bash] [email protected]:/etc/ftpd
    [SunOS 5.8/bash] root@wgls03:/root
    # HISTTIMEFORMAT="%h/%m - %H:%M:%S ";export HISTTIMEFORMAT;history
        1  Jul/07 - 09:02:21 vi /etc/vfstab
        2  Jul/07 - 09:02:21 mount /store
        3  Jul/07 - 09:02:21 cd /store/bnz
        4  Jul/07 - 09:02:21 ls
        5  Jul/07 - 09:02:21 ./BNZ_installBaseSoftware
        6  Jul/07 - 09:02:21 find /usr -name gunzipCheers,
    Andreas

  • How to get spool along with e-mail or FAX

    Hi,
    I have a requirement where i have to produce a spool even i go for e-mail or FAX option when the script is triggered.
    I am using a standard program where it is coded to have either of the option. i.e. either we have to go for a printer or e-mail or FAX.
    Could any one suggest me how to get spool along with e-mail or FAX option.
    Thanks in advance.

    Hi,
    check this:-[http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm]
    hope u'll get some idea.
    Regards,
    Sneha.

  • How to get the date of first day of a week for a given date

    Hi gurus
    can any one say me how to get the date of first day(date of Sunday) of a week for a given date in a BW transformations. For example for 02/23/2012 in source i need to get 02/19/2012(Sunday`s date) date in the result. I can get that start date of a week using  BWSO_DATE_GET_FIRST_WEEKDAY function module. But this function module retrieves me the  start date as weeks monday(02/20/2012) date. But i need sundays(02/19/2012) date as the start date. So it would be really great if anyone sends me the solution.
    Thanks
    Rav

    Hi,
    The simplest way would be to subtract 1 from the date date which you are already getting in transformation routine, but instead of doing that subtraction manually which might need bit of errort, you can simply use another FM to subtract 1 from given date.
    RP_CALC_DATE_IN_INTERVAL
    Regards,
    Durgesh.

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • How to get the itunes with those 3 colored buttons on top left corner ????ner ???

    Please help [humble request] ----
    I have 3 problems can u please help me out --
    1) How to get the itunes with the 3 colored buttons (i'm new to apple ,just 8 days so i dont know much stuff) on top left corner ,i've downloaded thrice from apple's site directly i everytime got the same sort of itunes with 'File' ,'Edit' ,'View' ,'Controls' ,'Store' ,'Adanced' ,'Help' on the top ,and also whenever i open the itunes store (in this itunes) only the app store opens ,now music albums ,movies ,tv shows nothing !!
    2) I dont know how to import video files from the computer to itunes
    3)i bought an app [fifa 11] ,n downloaded another 1 [contract killer] {ive deleted them and downloaded them thrice ,and they dont sync to my itouch it shows error (0xE800004C)
    Please please please help me im getting worried and frustrated
    please help me out with this

    but illaass
    i asked 2 of my frnds both of them have windows n not mac ,both of them are sayin dat they have the coloured buttons one , and i asked them dat how to access the itunes music store they said that when they kliked d itunes store option in the left side a screen appears where 6 -7 categories are there which are music store ,app store ,podcasts ,movies ,tv shows etc . bt when i open it it only shows d app store ,and on the bar only 4 options are ther the home icon , app store , podcasts and itunes u ,and when i klik movies ,tv shows on the left side ,there is an option "browse for movies in the itunes store" i klik it and only the app store opens and nothing else .
    and thanks now i know how to import videos
    and sigma 1337 ,
    ive downloaded the apps 4 -5 times now , still d same error mssg it comes like dis :-
    " Some of the apps in your iTunes library were not installed on the ipod "Shomik's ipod" because one or more errors occurred "
    please help me  im gettin frustrated

  • How to get and display current year

    hi,
    how to get and display current year
    and need it to convert numeric format if it is orginally
    in character format.

    Hi,
    chk this FM.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = '1000'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm    " Current Fiscal Month
        CURRY         = w_curry    " Current Fiscal Year
        PREVM         = w_prevm    " Previous Fiscal Month
        PREVY         = w_prevy.   " Previous Fiscal Year
    rgds
    anver
    if hlped pls mark points

  • How to get the table with no. of records after filter in webdynpro

    Dear Gurus,
    How to get the table with no. of records after filter in webdynpro?
    Thanks in advance.
    Sankar

    Hello Sankar,
    Please explain your requirement clearly so that we can help you easily.
    To get the table records from your context node use method get_static_attributes_table()
    data lo_nd_mynode       type ref to if_wd_context_node. 
    data lt_atrributes_table  type wd_this->elements_mynode. 
    lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ). 
    lo_nd_mynode->get_static_attributes_table( importing table = lt_atrributes_table ). 
    Note: You should have already defined your context node as a Dictionary Structure.
    BR,
    RAM

  • I am just starting out in graphic design and I wanted to know how to get more involved with either adobe and or graphic design? I am really very interested in working with adobe and graphic design more and becoming more involved with both!!

    I am just starting out in graphic design and I wanted to know how to get more involved with either adobe and or graphic design? I am really very interested in working with adobe and graphic design more and becoming more involved with both!!

    I have now recently downloaded 10.0.2 which is confusing in itself, as, as far as I can ascertain that is actually version 11, but I'm not even sure about that.
    Version 10.0.2 is the newest version and the successor to GarageBand '11 (version 6.0.5).
    The '11 is referring to the iLife '11 suit of multimedia application - the older GarageBand was a part of this bundle.
    Have a look at Edgar's graphical enhanced manuals, the explain very detailed how things work and why. You can buy them as iBooks from the iBook store or directly from the page:
    http://DingDingMusic.com/Manuals/

  • How to get  Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES

    Hi ,
    how to get Unapplied Amount with SQL or API in AR/ORACLE RECEIVABLES.
    who can help me ? Thank you very much !

    i get it from private API.
    SELECT SUM(decode(ra.status, 'UNAPP', nvl(ra.amount_applied, 0), 0)) unapplied_amount
    FROM ar_receivable_applications ra
    WHERE ra.cash_receipt_id = 1820
    AND ra.status IN ('UNAPP', 'ACTIVITY')

Maybe you are looking for

  • Need suggestion for large objects

    Hi I have to work out a solution for best result from a permutation of 13 elements, so the number of permutations is 1X2X3X4X5X6X7X8X9X10X11X12X13 = 6227020800 So how do i go through all these permutations to find the solution. Loading this into an a

  • Preserving prefixed zeros  in down load to excel file

    In My application lot of character field have character zero as the starting characters. Like Company code= 0600, Property= 00390898 .   When I do a download from Internal table to excel sheet, this character fields are showing with the zeros in fron

  • How to increase Transaction Code History

    Hi, I am using 720 Release GUi.In transaction code history, I can get history of maximum 15 TCodes.Is there any way to increase this value to more than 15.I tried to edit regisrty at HKEY_CURRENT_USERSoftwareSAPSAP GUI FrontSAP frontend server--Code.

  • Z10 won't display text message

    Hi, I upgraded the Z10 to the latest realse  10.2.1.2179  .   After the upgrade i am not receiving the TEXT meaage under "Text Messages"  . When i select the TEXT Mesages it always says "No entries in this view" , but the TEST messages are available

  • Loading Package - j2sdk 1.4.0

    Hi, If import java.util.*; is mentioned, at run time does JVM (j2sdk 1.4.0) loads entire util package or only requried classes? Thanks, Clark