SnippetVamp

Because spending time searching snippets sucks.



ALV 3 XPath 1 abap 9 ahk 1 autohotkey 6 bash 2 cli 2 clipboard 3 excel 1 file 1 file_path 1 greasemonkey 1 javascript 1 python 4 sap 1 screen 1 sql 1 ssh 1 tool 2 tunnel 1

.

Display any itab in ALV

Display any itab in ALV

*&---------------------------------------------------------------------*
*&      Form  write_out
*&---------------------------------------------------------------------*
*       List output
*----------------------------------------------------------------------*
FORM write_out USING p_table. "With inline declaration abap 740
  DATA: alv     TYPE REF TO cl_salv_table.
  TRY.
      cl_salv_table=>factory(
        IMPORTING r_salv_table = alv
        CHANGING  t_table = p_table ).

      DATA(lo_functions) = alv->get_functions( ).
      lo_functions->set_all( abap_true ).

      alv->display( ).
    CATCH cx_salv_msg.
      MESSAGE 'ALV display not possible' TYPE 'I'
              DISPLAY LIKE 'E'.
  ENDTRY.
ENDFORM.                    "write_out
*&---------------------------------------------------------------------*
*&      Form  write_out
*&---------------------------------------------------------------------*
*       List output
*----------------------------------------------------------------------*
FORM write_out USING p_table. "Without inline declaration
  DATA: alv TYPE REF TO cl_salv_table,
        lo_functions TYPE REF TO cl_salv_functions_list.

  TRY.
      cl_salv_table=>factory(
        IMPORTING r_salv_table = alv
        CHANGING  t_table = p_table ).

      lo_functions = alv->get_functions( ).
      lo_functions->set_all( abap_true ).

      alv->display( ).
    CATCH cx_salv_msg.
      MESSAGE 'ALV display not possible' TYPE 'I'
              DISPLAY LIKE 'E'.
  ENDTRY.
ENDFORM.                    "write_out

ALV abap

<iframe width="100%" height="974" src="http://ginkobox.fr/vamp/index.php?embed=555b6c66366cf" type="text/html"></iframe>

Text only - Permalink - Snippet public post date 10/09/2015

This page's Feed


SnippetVamp 1.84 by Bronco - generated in 0.015 s