Hi Enrico,
we have created this code:
METHOD if_edoc_interface_connector~trigger.
DATA: lv_source TYPE REF TO cl_edoc_source.
DATA: ls_header TYPE edoc_src_header.
DATA: ls_datasd TYPE edoc_src_data_sd_invoice.
DATA: ls_datafi TYPE edoc_src_data_fi_invoice.
CALL METHOD io_edocument->get_source
RECEIVING
ro_source = lv_source.
CALL METHOD lv_source->get_header
RECEIVING
rs_header = ls_header.
CASE ls_header-source_type.
WHEN 'SD_INVOICE'.
CALL METHOD lv_source->get_data
IMPORTING
es_data = ls_datasd.
WHEN 'FI_INVOICE'.
CALL METHOD lv_source->get_data
IMPORTING
es_data = ls_datafi.
ENDCASE.
BREAK-POINT.
At break-point in the two structure (ls_datasd or ls_datafi) we have the data of the invoice.
For now we don't know if we need other information before transformation, but we think we have to trasconding some data, useful for "tracciato ministeriale" (refer to CustTabBasic_Italy.pdf in note 2002415).
Bye
Gabriele