Skip to Content

BSP and Microsoft Excel – learning to live together Part 2

*Introduction* Last week I wrote a weblog on how to use Excel in a BSP application via Microsoft Office Web Access (BSP and Microsoft Excel – learning to live together). At the time I didn’t go into great detail about how we were storing the XML that feeds the Excel Spreadsheet, because I didn’t think it was a particularly interesting aspect of the solution. I did describe that we passed the XML as a simple string that was stored in the database. INTO l_string. ENDLOOP. ****Convert String to Binary String CALL FUNCTION ‘SCMS_STRING_TO_XSTRING’ EXPORTING text = l_string IMPORTING buffer = e_xstring * EXCEPTIONS * FAILED = 1 * OTHERS = 2 . IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ****Compress the Binary String * TRY. CALL METHOD cl_abap_gzip=>compress_binary EXPORTING raw_in = e_xstring IMPORTING gzip_out = e_xstring. * CATCH CX_PARAMETER_INVALID_RANGE . * CATCH CX_SY_BUFFER_OVERFLOW . * CATCH CX_SY_COMPRESSION_ERROR . * ENDTRY. ENDMETHOD. *Binary Table Type* image
Be the first to leave a comment
You must be Logged on to comment or reply to a post.