Difference between revisions of "SAP ABAP REPORT"
From SapWiki
Line 2: | Line 2: | ||
==[[SAP_ABAP_VARIOS#En_reporte|F4 en reporte]]== | ==[[SAP_ABAP_VARIOS#En_reporte|F4 en reporte]]== | ||
==[[SAP_ABAP_VARIOS#Agregar_botones_en_la_pantalla_de_selección_de_un_Reporte|Agregar botones en la pantalla de selección de un Reporte]]== | ==[[SAP_ABAP_VARIOS#Agregar_botones_en_la_pantalla_de_selección_de_un_Reporte|Agregar botones en la pantalla de selección de un Reporte]]== | ||
+ | ==Datos de selección (select-options, parameters) en dynpro== | ||
+ | <nowiki>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( ).</nowiki> |
Revision as of 20:43, 11 April 2020
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 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( ).