on 07-23-2008 5:36 AM
Hi
Can anyone suggest me how to convert a charater to hexadecimal.
I want to send some sort of character to empty fields some default value but target system is epoecteing hexadecimal
Can anyone suggest how to convert a ~ or + to hexadecimal in XI.
Regards
Hi
Can anyone help me with following code for syntax error.
char c = '+';
String s = Integer.toHexString( c );
Error is
Source code has syntax error: /usr/sap/DAX/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1facfd90587d11dd83d6001a645059de/source/com/sap/xi/tf/_I805_CustOutlet_MM_.java:3: '.' expected import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.*;import s;
Please don't send me links
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ria,
Create a User Defined function and pass Input String to the Function.
String ToHex(String input,Container container)
String s = Integer.toHexString( input.charAt(0) );
return s;
Map the Output of the User Defined Function to the Target Field.Without any import statements this works fine.
Regards
Prasad
Hi,
If the conversion has to be done only for 3 of these values you can go for FixValues Conversions function.
Specify the following
Key Value
a 61
~ 7E
+ 2B
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ria,
Try this in the mapping creating a user defined function :
char c = '+';
String s = Integer.toHexString( c );
Regards
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prsad,
I don't know Java, if you can plz test this code...I tried it it is giving following error in mapping
Source code has syntax error: /usr/sap/DAX/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map0da56360587a11ddba02001a645059de/source/com/sap/xi/tf/_I805_CustOutlet_MM_.java:3: '.' expected import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.*;import s; ^
hi riya,
You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon
also
check the blogs for clear understanding
http://java.sun.com/j2se/1.5.0/docs/api/
http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
UDF -
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
regards
kummari
Hi Ria,
As it seems to me u can do it by the help of value mapping.U can maintain the value of 'a' or '' may be it seems to me the ansii code in the value mapping table.So if the data comes as '' in the i/p then the corresponding o/p get mapped into the target field by value mapping.
Thnks
Arijit
<removed by moderator>
Edited by: Mike Pokraka on Jul 24, 2008 1:04 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
which encoding scheme you are using.
regards
kummari
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 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.