06-24-2016 10:27 AM
Hello sap experts,
we are about to use abap2xlsx and try to create an include with different output option.
One option should be that an alv (based on CL_SALV_TABLE) and its layout should be converted to xlsx. That xlsx can than be send to direct display, frontend, backend or via email.
For me it looks like the conversion of the alv is only possible in background mode. Otherwise I get a dump because method GET_METADATA of CL_SALV_TABLE is called in method ZCL_EXCEL_WORKSHEET=>BIND_ALV... where I create the xlsx worksheet based on the alv.
Therefore I have this code.
So is there a possibility to have the alv output somehow hidden in online mode? Or are there any alternative solutions? I think it would be possible (but not user friendly) that the user displays the alv and goes back. Afterwards the xlsx object is created and processed.
Thank you in advance.
Best Regards
Thomas
06-24-2016 12:42 PM
06-24-2016 12:42 PM
06-28-2016 10:49 AM
Thanks for your answer. I used CL_SALV_BS_RUNTIME_INFO=>SET and now the alv is not displayed after CR_ALV->DISPLAY( ) - yay
The alv is converted into XLSX with method BIND_ALV of class ZCL_EXCEL_WORKSHEET then, but the layout, that was set for this alv, is not applied in the XLSX file, allthough CLS_SALV_BS_RUNTIME=>GET_METADATA is showing the correct column order in the returning parameter.
Any ideas how to deal with this issue? Thanks.
06-28-2016 11:28 AM
I can not help with ABAP2XLSX 😞 Don't have experience with it. Maybe someone else will know...
You can try debug it.
In standard ALV XLSX output (cl_salv_table->to_xml method) they use function LT_VARIANT_LOAD to apply layout, where might be problem with I_USER_SPECIFIC parameter (it is by default empty)...