Hello community,
many information is stored in different files with different formats. This information is often important for the customer and there is the question, how to transport this to a customer.
BinFile2ABAP is a program which offers this possibility. With BinFile2ABAP you can store each file in an ABAP function module.
It converts the file to an ABAP source code as a function module. With the call of this function module the file is saved on the presentation server and executed.
With this kind of information you can extend your possibilities. You can integrate each type of file you want in your ABAP program, e.g. Adobe Flash and Portable Document Format (PDF), Compiled HTML Help (CHM), all image, sound and video formats etc.
BinFile2ABAP is free and you can download it from http://www.stschnell.com from the path Electrifying Light > Binary File to ABAP. It is available as Windows 32-bit and 64-bit application.
The process to generate a function module is very easy. Choose the binary file you want, press the button Create ABAP Function Module and save the file to disc. Transfer the FM in your ABAP editor via clipboard or upload - that's all.
You can choose the line width, 16, 32 or 64 bytes, this means, 32, 64 or 128 characters in a line. It is dependence from the file size, because the ABAP interpreter allows max. 65535 lines to concatenate. With 64 bytes and 65535 lines you get a file size limit from 4194240 bytes. It is possible to create an ABAP source with more lines, but you can not compile it.
2013/07/13: Update is available
- After the discussion here, I extended the program to allow the registrationof ActiveXlibraries at the runtime of an ABAPprogram.
Now you have the possibility to store an ActiveX library inside an ABAP function module, to copy and to register it on the presentation server at the runtime of an ABAP program.
Create Object l_ActiveX 'ActiveX'.
If sy-subrc <> 0.
Call Function 'zInstallActiveX'.
Create Object l_ActiveX 'ActiveX'.
EndIf.
The function module zInstallActiveX wascreated withBinFile2ABAP. - Minor bug fixing.
Enjoy it.
Cheers
Stefan