Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_JE_CC
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_JE_CC.
DATA: ModFunctionName TYPE rs38l_fnam.
types: begin of t_bsis,
recno type i,
zuonr like bsis-zuonr,
belnr like bsis-belnr,
end of t_bsis.
data: it_bsis type table of t_bsis, wa_bsis like line of it_bsis.
select * up to 10 rows from bsis into corresponding fields of table it_bsis where zuonr ne ''.
BREAK-POINT.
wa_bsis-recno = 100.
wa_bsis-zuonr = 'AAAAA'.
wa_bsis-belnr = '2010.07.07'.
append wa_bsis to it_bsis.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMART_JE_CC'
IMPORTING
fm_name = ModFunctionName
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Enviar datos al formulario e imprimirlo.
CALL FUNCTION ModFunctionName
TABLES
gs_mkpf = it_bsis
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
* Si se produce un error, reportarlo.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.