cancel
Showing results for 
Search instead for 
Did you mean: 

edoc_cockpit Basic Solution: E-invoice eDocument cannot be displayed;

Former Member
0 Kudos

Hi All,

has any of you solved this error in EDOC_COCKPIT transaction?

"E-invoice eDocument cannot be displayed; Check implementation of BAdI EDOC_INTERFACE_CONNECTOR method DISPLAY_EDOCUMENT"

I'm working for Italian customer on S / 4 hana and I can not find guides for this system.

if you have any suggestions I would be grateful

Sylvie

dolmos
Explorer
0 Kudos

Hi Sylvie,

How did you do? I am facing the same and, as I am implementing the basics enablement, I have not been able to find a source code example or something like that that help me out.

Best regards

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Try to implement the interface in your Z-Class like this (example from ECC):

-----------------------------------------------------------------------------------

METHOD if_edoc_interface_connector~display_edocument.
DATA: lo_edocument_db TYPE REF TO cl_edocument_db,
ls_edocfile TYPE edocumentfile.

* Get eDoc GUID
TRY.
me->load_from_db( iv_edoc_guid = iv_edoc_guid ).
CATCH cx_edocument .
ENDTRY.

IF ms_edocument-file_guid IS NOT INITIAL.
* Get the XMl data from the eDocumentfile table
CREATE OBJECT lo_edocument_db.
ls_edocfile = lo_edocument_db->if_edocument_db~select_edocumentfile( ms_edocument-file_guid ).

* Show XML in popup
cl_abap_browser=>show_xml( xml_xstring = ls_edocfile-file_raw ).

ENDIF.

cv_display_done = abap_true.

ENDMETHOD.

dolmos
Explorer
0 Kudos

Hi Simon,

My Z Class does not have any method called load_from_db, so, the following line gives me error:

me->load_from_db( iv_edoc_guid = iv_edoc_guid ).

Would you, please, give me lights where is the instance of me coming from?

I am looking more information about this method but so far I don't see anything clear.

Best regards,