Skip to content

Instantly share code, notes, and snippets.

@furlan
Created May 31, 2012
Embed
What would you like to do?
ZABAP101_REPORT_CONNECTIONS
*&---------------------------------------------------------------------*
*& Report ZABAP101_REPORT_CONNECTIONS
*&
*&---------------------------------------------------------------------*
*& This code was published originally on ABAP101.com
*& http://abap101.com/2012/05/30/ >
*& importanto-exportanto-uma-tabela-interna-modulo-funcao
*& Author: Flávio Furlan
*& E-mail: furlan@abap101.com
*&---------------------------------------------------------------------*
REPORT zabap101_report_connections.
DATA: it_spfli TYPE ztt_spfli.
FIELD-SYMBOLS: <fs_spfli> TYPE LINE OF ztt_spfli.
PARAMETERS: p_car TYPE spfli-carrid.
START-OF-SELECTION.
CALL FUNCTION 'Z_FM_GET_CONNECTIONS'
EXPORTING
im_carrid = p_car
IMPORTING
ex_spfli_t = it_spfli
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE 'No records found.' TYPE 'E'.
ENDIF.
LOOP AT it_spfli ASSIGNING <fs_spfli>.
WRITE: / <fs_spfli>-carrid,
<fs_spfli>-connid,
<fs_spfli>-countryfr,
<fs_spfli>-cityfrom,
<fs_spfli>-airpfrom,
<fs_spfli>-countryto,
<fs_spfli>-cityto,
<fs_spfli>-airpto.
ENDLOOP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment