‎2005 Dec 21 5:18 PM
Hi,
When I execute program OAHEX in 5.0 I don't get any output while the same program in 4.5B works correctly. Has anybody come across this problem?
Thanks,
Anuranjan
‎2005 Dec 21 5:23 PM
Is your Unicode checks active or not in the attributes for that program?
‎2005 Dec 21 5:20 PM
HI Anuranjan Sharma,
I'm on 5.0 and its working for me.Can you see that program in se38??
Regards,
Ravi
‎2005 Dec 21 5:22 PM
Hi Ravi,
This is the coding I have:
REPORT OAHEX .
PARAMETER: INPUT(2) DEFAULT 'A' LOWER CASE.
DATA: MAX_X TYPE X VALUE '80',
OUTPUT(2),
BEGIN OF X,
X TYPE X,
END OF X,
P TYPE P,
HEX TYPE X.
*MOVE INPUT TO X. MOVE INPUT TO HEX.
MOVE X-X TO OUTPUT.
MOVE X-X TO P.
WRITE: 'Eingabewert'(001), AT 20 'Hexadezimal'(002),
AT 40 'Dezimal'(003), AT 60 'Zuweisung'(004).
ULINE.
WRITE: INPUT, AT 20 OUTPUT, AT 40 P LEFT-JUSTIFIED, AT 60 HEX.
What is it there in urs?
Thanks a lot for quick reply
‎2005 Dec 21 5:25 PM
Hi,
It is exactly the same here too.
What did you mean when you say it is not working correctly?
Regards,
Ravi
‎2005 Dec 21 5:27 PM
When I enter A as input out I get is:
Output of hexadecimal values
Input Value Hexadecimal Decimal Assgmt
A 00 0 00
While in 4.5 it works like this
Input value Hexadecimal Decimal Assgmt
A 41 65 A0
Only difference in coding is line
move input to x. move input to hex.
is not commented in 4.5
‎2005 Dec 21 5:23 PM
Is your Unicode checks active or not in the attributes for that program?
‎2005 Dec 21 5:25 PM
‎2005 Dec 21 5:28 PM
Hi it is working for me...
but giving no values..
vijay
Message was edited by: Vijay Babu Dudla
‎2005 Dec 21 5:29 PM
Vijay, R u on 5.0 and do u have the output same as I have shown above for 4.5.
‎2005 Dec 21 5:31 PM
‎2005 Dec 21 5:32 PM
Hi Sharma,
When I do a EPC for that program, it says,
The namespace of the program OAHEX has the setting "C" and cannot be tested
A possible cause for this is that an SAP program is being checked in a customer
system
Note, the following rule applies after a change in the source code:
For testing the namespace setting is ignored for one week
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Probably it is a reason.
Regards,
ravi
‎2005 Dec 21 5:35 PM
Hi Sharma,
The line in bold is the reason.
REPORT OAHEX .
PARAMETER: INPUT(2) DEFAULT 'A' LOWER CASE.
DATA: MAX_X TYPE X VALUE '80',
OUTPUT(2),
BEGIN OF X,
X TYPE X,
END OF X,
P TYPE P,
HEX TYPE X.
<b>*MOVE INPUT TO X. MOVE INPUT TO HEX.</b>
MOVE X-X TO OUTPUT.
MOVE X-X TO P.
WRITE: 'Eingabewert'(001), AT 20 'Hexadezimal'(002),
AT 40 'Dezimal'(003), AT 60 'Zuweisung'(004).
ULINE.
WRITE: INPUT, AT 20 OUTPUT, AT 40 P LEFT-JUSTIFIED, AT 60 HEX.
Probably it is commented for some reason by SAP.
See if it uncommented in 4.5.
‎2005 Dec 21 5:37 PM
Hi Ravi,
U mean to say SAP is still working on this and we should wait till they fix it.
Thanks,
Anuranjan
‎2005 Dec 21 5:38 PM
Hi Sharma,
I ran the program in 46C and got the result you got in 45 and I ran it in 47 and got the result you got for 5. The difference between the two is as Ravi pointed out. The line "MOVE INPUT TO X. MOVE INPUT TO HEX." is commented out in the higher version and it is not in the lower version.
Srinivas
‎2005 Dec 21 5:38 PM
‎2005 Dec 21 5:40 PM
Hi Srinivas,
So I should open a message with SAP right?
Thanks,
Anuranjan
‎2005 Dec 21 5:40 PM
What are you using this for? It is a simple program, which probably you can also copy and uncomment those lines. I don't know if SAP is going to work on this or fix. May be it is intended to work this way.
Srinivas
‎2005 Dec 21 5:42 PM
i tried uncommenting, it is throwing some errors..
and if you really want that then you can copy it from 4.7
and use it..
vijay
‎2005 Dec 21 5:43 PM
I did a where-used on the program and it is not used anywhere.
‎2005 Dec 21 5:44 PM
Hi Srinivas,
I tried that first but the commneted line causes syntax error.
thanks
Anuranjan
‎2005 Dec 21 5:45 PM
Ok, SAP commented the code because it is not unicode compliant and here is the error message.
<b>"X" and "INPUT" are not mutually convertible in Unicode systems, since you are trying to convert a structure to a field or vice versa. You can only convert these objects in the following cases:
If the structure is completely character-type, the single field can have any type.
Otherwise, the field must have the data type C and the structure must begin with a character-type field that is at least as long as the single field.</b>
‎2005 Dec 21 5:47 PM
Change the statement
<i>MOVE input TO x. MOVE input TO hex.</i>
to
<b>MOVE input TO x-x. MOVE input TO hex.</b>
But this is giving a different result.
Srinivas
‎2005 Dec 21 5:52 PM
Actually since the unicode checks came into picture, hex and char are no longer compatible. If I have a statement like
"concatenate hex input into junk separated by '?'." in a unicode system, it gives me an error that they are not compatible.
Whereas if I use the same command in 46c, it is not giving me the error.
Srinivas