2008 Jul 11 9:11 PM
Hi All,
I have a peculiar problem.
I have to prepare 6 files in SAP to be sent to the Mainframe server(legacy system) which sends the FAX to the clients.Now,these files should contain the hexadecimal characters like '1A', along with a lot of normal data.
For the rest of the data,I have defined the Standard texts and defined the Text symbols and it is done.
But at the end of each line,I have to insert the hex 1A.
This is because the mainframe will understand this hexadecimal and it is mandatory to insert it.
I have checked the character value of hexadecimal 1A which is 'Substitute'.
I have no clue as to how to insert this control character along with the rest of the data.
A quick response will be highly appreciated.
Regards,
Puneet Jhari.
2008 Jul 11 9:17 PM
data: begin of hex_eof,
eof type x value '1A',
end of hex_eof.
Just concatenate the structure (not the variable) to the end of the line
2008 Jul 11 9:40 PM
Hi Ramiro,
Thanks for the quick response.
But I am working on ECC 6.0 and the moment you try to concatenate the char with a hexadecimal,it throws an error message "EOF must be a character type data object".
I have already tried this.
It was possible in 4.7 and below.
Regards,
Puneet Jhari.
2008 Jul 11 11:18 PM
hi ,
delcaring 1A type X is ok but concatenating this value dosent make sense as it can be done with a character only.
declare 1A type x
there is a function modue in ecc6 hrconverthextostring make a search of this in se37 and this will allow u to
convert the hexa value into char format
im not in front of this system so cannot give u the correct name .
for this fm
i/p ---> xstring
o/p--->string
now the output contains the string value of your hexa value
now concatenate ur value with this string and transfer it to the mf server .
just check if this works for u .
br,
<vijay
2008 Jul 11 11:40 PM
Hi Vijay,
I agree that the hexadecimal and char can not be concatenated in ECC.
But my requirement is, that before this file is sent to the mainframe,it would be formatted using the DCF(Data Composition Facility) format.Once it is opened with DCF,the hex characters should be shown as it is as I have tried to develop them in SAP.
Say,for ex,
If I have tried to write a hex value for '1A' in SAP,once it is opened in DCF,it should be represented as the same hex value or the symbol for it and should not be displayed in the char format.
I doubt that if I convert the hex to char and then transfer,once it is opened at the target system,it would not be represented as a hex but something else,lets say #.
I hope you are getting what I am trying to explain.
I know the requirement is peculiar,but this is how it is(Client's demands).....
If not,then let me know.
Regards,
Puneet Jhari.
2008 Jul 12 12:16 AM
Hi,
Declare as follows:
DATA: ws_nline TYPE c VALUE cl_abap_char_utilities=>cr_lf.
Use this character symbol i your text.
Regards,
Subramanian
2008 Jul 12 12:20 AM
Hi,
you can define your internal table as follows:
data: begin of ws_itab ,
f1 type string,
ws_nline TYPE c VALUE cl_abap_char_utilities=>cr_lf,
end of ws_itab.
data: itab like standard table of ws_itab.
Just fill only the field f1. ws_nline is always set as the EOL char.
Regards,
Subramanian