SAP ABAP REPORT
From SapWiki
Revision as of 20:47, 11 April 2020 by WikiSysop (talk | contribs) (→Datos de selección (select-options, parameters) en dynpro)
Contents
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 * INTO TABLE @DATA(lt_pernr2) FROM pa0002 UP TO 100 ROWS WHERE vorna IN @s_vorna . TRY. cl_salv_table=>factory( IMPORTING r_salv_table = DATA(gr_table) CHANGING t_table = lt_pernr2 ). CATCH cx_salv_msg. ENDTRY. *... Enable Generic ALV functions DATA(gr_functions) = gr_table->get_functions( ). gr_functions->set_all( ). *... Display table gr_table->display( ). ENDMETHOD. ENDCLASS. START-OF-SELECTION. start=>main( ).