Skip to end of metadata
Go to start of metadata

*---for creating pf status go to se41 and give the program name SAPLSALV and pf-status as STANDARD and choose copy pf-status to this program .

Error rendering macro 'code': Invalid value specified for parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'
REPORT zalv_refresh.
TABLES: pa0002.
TYPES: BEGIN OF ty_pa0002,
  pernr LIKE pa0002-pernr,
  begda LIKE pa0002-begda,
  endda LIKE pa0002-endda,
  vorna LIKE pa0002-vorna,
  nachn LIKE pa0002-nachn,
END OF ty_pa0002.

CONSTANTS: gc_true TYPE sap_bool VALUE 'X'.

DATA: gt_outtab TYPE STANDARD TABLE OF ty_pa0002 .
DATA: gr_table TYPE REF TO cl_salv_table.
*----------------------------------------------------------------------*
* SELECTION-SCREEN - for demonstration purposes only *
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK gen WITH FRAME.
SELECT-OPTIONS:s_pernr FOR pa0002-pernr.
SELECTION-SCREEN END OF BLOCK gen.
*----------------------------------------------------------------------*
* START-OF-SELECTION *
*----------------------------------------------------------------------*
START-OF-SELECTION.
  SELECT pernr
  begda
  endda
  vorna
  nachn
  FROM pa0002
  INTO TABLE gt_outtab
  WHERE pernr IN s_pernr.
*----------------------------------------------------------------------*
* END-OF-SELECTION *
*----------------------------------------------------------------------*
END-OF-SELECTION.
  PERFORM display_screen.
*&---------------------------------------------------------------------*
*& Form display_screen
*----------------------------------------------------------------------*
FORM display_screen .
  cl_salv_table=>factory(
    IMPORTING
      r_salv_table = gr_table
    CHANGING
      t_table = gt_outtab ).
  DATA: repid TYPE sy-repid.

  repid = sy-repid.

  CALL METHOD gr_table->set_screen_status(
    EXPORTING
      report        = repid
      pfstatus      = 'SALV_STANDARD'
      set_functions = gr_table->c_functions_all ).

  gr_table->display( ).

ENDFORM. " display_screen
  • No labels