[ABAP] LERF – Detaildaten des Erfassungsblatts anzeigen

PARAMETERS: p_sheet TYPE bapiessr-sheet_no.
PARAMETERS: p_long TYPE bapimmpara-selection DEFAULT space.

START-OF-SELECTION.

  DATA: lv_header TYPE bapiessr.
  DATA: it_account_assignment TYPE STANDARD TABLE OF bapieskn WITH DEFAULT KEY.

  DATA: it_services TYPE STANDARD TABLE OF bapiesll WITH DEFAULT KEY.
  DATA: it_srv_accass_values TYPE STANDARD TABLE OF bapieskl WITH DEFAULT KEY.
  DATA: it_return TYPE STANDARD TABLE OF bapireturn1 WITH DEFAULT KEY.
  DATA: it_header_text TYPE STANDARD TABLE OF bapiessrtx WITH DEFAULT KEY.
  DATA: it_services_texts TYPE STANDARD TABLE OF bapieslltx WITH DEFAULT KEY.

  CALL FUNCTION 'BAPI_ENTRYSHEET_GETDETAIL'
    EXPORTING
      entrysheet                    = p_sheet
      long_texts                    = p_long
    IMPORTING
      entrysheet_header             = lv_header
    TABLES
      entrysheet_account_assignment = it_account_assignment
      entrysheet_services           = it_services
      entrysheet_srv_accass_values  = it_srv_accass_values
      return                        = it_return
      entrysheet_header_text        = it_header_text
      entrysheet_services_texts     = it_services_texts.

  cl_demo_output=>write_data( lv_header ).
  cl_demo_output=>write_data( it_account_assignment ).
  cl_demo_output=>write_data( it_services ).
  cl_demo_output=>write_data( it_srv_accass_values ).
  cl_demo_output=>write_data( it_return ).
  cl_demo_output=>write_data( it_header_text ).
  cl_demo_output=>write_data( it_services_texts ).
  cl_demo_output=>display( ).