SAP ABAP REPORT

From SapWiki
Revision as of 20:43, 11 April 2020 by WikiSysop (talk | contribs)

Obtener vía F4 archivo y directorio en un reporte

F4 en reporte

Agregar botones en la pantalla de selección de un Reporte

Datos de selección (select-options, parameters) en dynpro

REPORT ydemo_sel.
DATA wa_pa0002 TYPE pa0002.

SELECTION-SCREEN BEGIN OF SCREEN 100.
PARAMETERS p_pernr TYPE p0001-pernr.
SELECT-OPTIONS s_vorna FOR wa_pa0002-vorna.

SELECTION-SCREEN END OF SCREEN 100.

AT SELECTION-SCREEN OUTPUT.
  SET PARAMETER ID 'RID' FIELD 'TEST_PROGRAM'.

CLASS start DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS main.
ENDCLASS.

CLASS start IMPLEMENTATION.
  METHOD main.
    CALL SELECTION-SCREEN 100. " STARTING AT 10 10.
    IF sy-subrc <> 0.
      RETURN.
    ENDIF.

    SELECT pernr INTO TABLE @DATA(lt_pernr) FROM pa0001 UP TO 100 ROWS
                                           WHERE pernr = @p_pernr .

    SELECT pernr INTO TABLE @DATA(lt_pernr2) FROM pa0002 UP TO 100 ROWS
                                          WHERE vorna IN @s_vorna .
    LOOP AT lt_pernr2 INTO DATA(ls_pernr).
      WRITE:/ ls_pernr.
    ENDLOOP.

  ENDMETHOD.
ENDCLASS.

START-OF-SELECTION.
  start=>main( ).