on 05-28-2012 6:19 AM
Hi
I have a binary file from mainframe(sender) system...How can i convert it into XML/string in PI...
If I use abap mapping ....when the data reaches abap class ...will it be in UTF-8 encoding?
Hi T Shah,
If you are using a binary file and you want to convert it into XML then you either need an adpater module or java mapping. I am not sure if this is possible with ABAP mapping since sometimes to interpret binary files you need to access the bit level information. Java has low level features to help you, ABAP might lack those features. This answers your first question. When data reaches ABAP class it will not be in UTF-8 encoding. As you are not using FCC the entire binary file data will flow into ABAP class. If you need more information on how to tackle this kind of situation please refer to my article on the same http://wiki.sdn.sap.com/wiki/x/SQxeDw .
Please also let the forum know more details of the file type you are trying to work with, and if possible upload an sample so that experts can have a look into it too.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi T Shah,
I have gone through the file you have uploaded. Definitely you need java to tackle this kind of file. Please upload as much information you have got about the structure of this file, without structural information its very difficult to decode this file types. If you have reference to any program/editor to read such kind of files please upload that too.
Regards
Anupam
Hi Anupam ,
I am refering to your wiki as my req is similat to yours
however i tried downloading the XSD of the DT that you created and uploaded it in my system...but when i drag it in say Service interface it shows up as blank....what may be the reason??
highly appreciate your reply
Hi T Shah,
The file you are trying to decode might have a lot diffrent structure than the file I have writen about. Thus trying to apply the downloaded XSD might not help in your case. You can refer to my wiki only if you want to know how we can read a binary file type. Thus its important to know the detailed structural information about the file and the scenario u are trying to achieve. Please explain the details. Agian if you still insist to copy the XSD you can create one XSD. Then there is a tab in data type where you can view the source. Open this tab and try pasting the XSD you have downloaded. save it and I hope u will be able to work with it.
All the best.
Regards
Anupam
Hi T Shah,
The binary files come with variety of structures. Thus the XSD and the java mapping codes will differ with each type. the general process to read such file has been explained in my article. If you need my email id , it should be visible if you place mouse cursor on my name over each post. I have made my email details public.
Regards
Anupam
Hi,
The sender file adapter has an option to read the file contents in binary mode:
Whether after conversion it will be XML depends on what is the binary content of the file. And yes, while reading the file PI will treat it as UTF8-encoded, so if your file is written with a different encoding, use e.g. MessageTransformBean to convert the encodings.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.