Skip to Content
0
Former Member
May 18, 2016 at 10:08 AM

Additional tabs in .xlsx file created through SAP Gateway

775 Views

Hello Experts,

I am facing an issue while creating a .xlsx file through Gateway Service using Media entity.

We are getting additional tabs 'Input help', 'Column details', 'Column Alias Mapping' apart from 'Sheet 1' which contains the relevant data as per the attached screenshot. Also the name of excel file getting created is coming as $value even though the name is being passed in the class.

Below code is being used in DPC_EXT class.


"create excel file

GET REFERENCE OF lt_excel_ex INTO lr_data_ref.

TRY.

cl_fdt_xl_spreadsheet=>if_fdt_doc_spreadsheet~create_document(

EXPORTING

itab = lr_data_ref

iv_call_type = 2

name = lv_file_name

iv_sheet_name = lv_file_name

RECEIVING

xdocument = cv_xstring ).

CATCH cx_fdt_excel_core .

ENDTRY.


This code is being executed via the URL /sap/opu/odata/sap/..MEDIA_ENTITY_SET/$value. The name of file is being taken from the URL. Is there any way of passing the file name and removing additional tabs in .xlsx file.


Regards,

Nishant Arora

Attachments

tabs.jpg (10.2 kB)