quitar botones predeterminados a ALV grid

Colapsar
X
 
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes
  • Diogo
    Junior Member
    • sep
    • 22

    #1

    quitar botones predeterminados a ALV grid

    hola,quisiera saber si existe la forma de quitar los botones que vienen por defecto cuando creas un ALV grid,si alguien me pudiera ayudar se lo agradecería.
    Muchas gracias!!!
  • Aron
    Member
    • feb
    • 49

    #2
    Hola, para poder quitar esos botones es:

    en la funcion 'REUSE_ALV_GRID_DISPLAY' en el parametro exporting it_excluding debes pasarle en una tabla todas las teclas de funcion que desees excluir de tu alv, como el el form abajo.

    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = g_repid
    i_structure_name = 'T_REP'
    is_layout = gs_layout
    it_fieldcat = gt_fieldcat[]
    it_sort = gt_sort[]
    it_excluding = gt_exclude[]
    i_save = ' ' "Grabar Variante
    is_variant = ls_vari
    it_events = gt_events[]
    tables
    t_outtab = t_rep
    exceptions
    program_error = 1
    others = 2.

    *&---------------------------------------------------------------------*
    *& Form EXCLUDE
    *&---------------------------------------------------------------------*
    * text
    *----------------------------------------------------------------------*
    form exclude.
    refresh gt_exclude.
    gt_exclude-fcode = '&INFO'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&GRAPH'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&VEXCEL'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&AQW'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '%SL'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&ABC'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '%PC'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&RNT_PREV'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&ALL'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&SAL'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&OL0'.
    append gt_exclude. clear gt_exclude.
    gt_exclude-fcode = '&OAD'.
    append gt_exclude. clear gt_exclude.

    endform. " EXCLUDE

    Espero poderte ayudado.

    Saludos

    Comentario

    • Diogo
      Junior Member
      • sep
      • 22

      #3
      hola

      hola gracias por la ayuda pero te comentare que soy nuevo es esto y me salen varios errores de sintaxis supongo me faltaran declarar mas cosas si tienes tiempo podrias ser mas especifico.
      Gracias!!

      Originalmente publicado por Aron
      Hola, para poder quitar esos botones es:

      en la funcion 'REUSE_ALV_GRID_DISPLAY' en el parametro exporting it_excluding debes pasarle en una tabla todas las teclas de funcion que desees excluir de tu alv, como el el form abajo.

      call function 'REUSE_ALV_GRID_DISPLAY'
      exporting
      i_callback_program = g_repid
      i_structure_name = 'T_REP'
      is_layout = gs_layout
      it_fieldcat = gt_fieldcat[]
      it_sort = gt_sort[]
      it_excluding = gt_exclude[]
      i_save = ' ' "Grabar Variante
      is_variant = ls_vari
      it_events = gt_events[]
      tables
      t_outtab = t_rep
      exceptions
      program_error = 1
      others = 2.

      *&---------------------------------------------------------------------*
      *& Form EXCLUDE
      *&---------------------------------------------------------------------*
      * text
      *----------------------------------------------------------------------*
      form exclude.
      refresh gt_exclude.
      gt_exclude-fcode = '&INFO'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&GRAPH'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&VEXCEL'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&AQW'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '%SL'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&ABC'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '%PC'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&RNT_PREV'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&ALL'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&SAL'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&OL0'.
      append gt_exclude. clear gt_exclude.
      gt_exclude-fcode = '&OAD'.
      append gt_exclude. clear gt_exclude.

      endform. " EXCLUDE

      Espero poderte ayudado.

      Comentario

      Trabajando...