Java udf

Hello Sdn
File to IDOC
In my file : i have a text field which will have a value : purchase order nuber is purchord;customer number is cust1;invoice number is inv1;account number is acct1
In my target i have an idoc and there is a segment E1EDK01. I have to create this segment only if text value in the file contains : "customer number is "
In other words ,if the text in the file contains : purchase order nuber is purchord;ivoice number is inv1;account number is acct1
Then in this case E1EDK01 should not be formed.
Thanks

Hi
If you have
purchase order nuber is purchord;customer number is cust1;invoice number is inv1;account number is acct1
always coming in this format.
then you can try with standard mapping functions
source -> Substring(33, 48) -> equalS(customer number) -> createif -> target node
if you are not sure of the position of customer number in the string then use this code
source -> UDF ParseLine -> = (function) "null" (constant) -> not -> createif -> Target
source code for ParseLine
String compare ="customer number";
int x = a.indexOf(compare);
if (x>0){
return a;}
else{
return "null";}
Thanks
Gaurav

Similar Messages

  • In PI 7.1 - Java UDF's Compiled Class files - Jar File location

    Hi All,
    In PI 7.1 Does anybody know where the compiled Java UDF's (which are used in Graphical mapping) class files stored in jar are located in integration server? I want to use this jar file in my XSLT mapping.

    Hi,
    I guess it would be under
    \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\temp\classpath_resolver
    or
    \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\.\temp\classpath_resolver
    Where SID is your XI instance name.
    Thanks,
    Gujjeti
    Edited by: Praveen Gujjeti on Jun 23, 2008 5:12 PM

  • Web Service call from java UDF in message mapping

    Hi,
           Is it possible to call a web service from inside a java UDF in message mapping? The webservice can be any standard one. If this is possible please let me know how this can be done.
    Regards,
    Shiladitya

    Hi Shila,
                 Hope u remember me
    Here is the standard code used to call webservice from Java UDF
    public String setSoapAction(String SOAPAction,Container container){
    try{
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey soapurl = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/SOAP" , "THeaderSOAPACTION");
    conf.put(soapurl, SOAPAction);
    return "";
    }catch(Exception e){
    e.getMessage();
    return "";
    Regards,
    Arijit

  • Tricky Java UDF

    Hello Sdn
    I have bit tricky problem to achieve through java udf in XI. We have to parse a tricky text in java.
    Source has a text field : ST - 102RP34;RP - 234ST89;VT - 90789ST;
    So the souce text field has a qualifier - value;
    In target , I have 3 repeating segments
    1) First segment to be created if qualifier is ST ,second segment for qualifier RP,third segment for qualifier VT.
    2) There exists 1 field in each segment.
    Target Field value for first segment : 10234RP34
    Target Field for second sement :  234ST89
    Target field for third segment :90789ST
    So the problem and trick ,as i understand is  : we have 3 qualifiers but in values for these qualifier also we have qualifier values ST,RP etc. So we cant just directly take index of qualifiers as values also have qualifier values.Eg : we have a value : 10234RP34 and RP is also the qualifier.
    There will be 2 udfs : one for segment creation and other for the Target field value.
    Basically with help of some do while or some loop we need to extract value after "-" and before " ;" and this shld be in some loop to get all the values.
    Please help. I am not a  java person.
    Thanks

    Hi
    Assuming that your target is having nodes like
    qualifier
    value
    qualifier
    value
    qualifier
    value
    You need 2 UDF's one to generate qualifier and another to generate value from the input String of parameter cache context
    For generating qualifier
    public void qualifier(String[] input,ResultList result,Container container)
                               String element, qualifier ="";
    StringTokenizer token1 = new StringTokenizer( input, ";");
                     while (token1.hasMoreTokens())
                         element = token1.nextToken();
                         StringTokenizer token2 = new StringTokenizer( element, "-" );
                         qualifier = token2.nextToken();
                         result.addValue(qualifier);                    
    output returned will be
    ST
    RP
    VT
    Another UDF just and extension of the above can give values(type context)
    public void values(String[] input,ResultList result,Container container)
    String element, qualifier,value ="";
    StringTokenizer token1 = new StringTokenizer( input, ";");
                     while (token1.hasMoreTokens())
                         element = token1.nextToken();
                         StringTokenizer token2 = new StringTokenizer( element, "-" );
                         qualifier = token2.nextToken();
                                     value = token2.nextToken();
                         result.addValue(value);                    
    output returned will be
    102RP34
    234ST89
    90789ST
    Thanks
    Gaurav

  • Resources for developing java UDFs used in XI

    I am with some Java background working in XI
    for developing Java UDFs used in XI are there any online resources or books other than from the SAP help and SAP certification material.

    Hi Kalyan
    You can get a lot of UDF already discussed in Forum and Blogs, Wiki
    As you said you are familiar with Java then you wont find any difficulty
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_weblog&query=xi+udf&adv=false&sortby=cm_rnd_rankvalue
    Thanks
    Gaurav

  • Sending a table to remote RFC in Java UDF

    Hello,
    <br><br>
    We use the API "com.sap.aii.mapping.lookup" often to make RFC calls from a UDF and return data. We typically create an import parameter in the Function Module and pass the value into the RFC. We now need to send in an unlimited number of values so we understand that instead of the import paramter we need to use a table. The problem is we get an error when we build the XML in our UDF and try to call the RFC. We tried wrapping the values in item nodes and several other approaches but we are not sure if we can populate a table via XML and make the RFC call.
    <br><br>
    Example of what we tried:
    <br><br>
    String sRfcxml = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;ns0:ZCAE_MX_CONTRACT_ROUTING xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"&gt;&lt;E_ZCAE_COCODE&gt;&lt;item&gt;0445&lt;/item&gt;&lt;/E_ZCAE_COCODE&gt;&lt;/ns0:ZCAE_MX_CONTRACT_ROUTING&gt;";
    <br><br>
    Regardless of what we try we get the following error during the call:
    <br><br>
    error of "RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'."
    <br><br>
    Now if we do not pass any data or use an import versus table parameter in the function module it works just fine.
    <br><br>
    We know we can work around this by using an import parameter and stringing the values together with a delimiter and then breaking this apart in ABAP but we are looking for a cleaner solution.
    <br><br>
    Any thoughts?
    <br><br>
    Joe
    Edited by: Joe Wright on Nov 16, 2009 10:45 PM

    Not sure what's wrong, but are you sure your "stringed" XML document matches the expected RFC structure ? Btw, I'd replace (though it could be considered as a cosmetic change) to replace "ns0" with "rfc" in your namespaces declaration, it's what you'll see in all imported RFC objects in XI/PI
    Rgds
    Chris

  • Quick java udf question

    Hi sorry for this completely stupid question but the below piece of code I am trying to dissect and understand.
    I understand the first line I am creating a new global container but the second line I am not so sure what the (integer) would be for. Is this meant to be a variable or a return type? What could that possibly be for I mean a type in parenthesis after the equals sign.
    GlobalContainer gc = container.getContainer();
    Integer counter = (Integer) gc.getParameter("counter");
    Thank you for your help.

    GlobalContainer is a container object stores values and can be retrieved by UDF during runtime. This GlobalContainer stores values and can be accessed by any UDF in the same namespace. This is similar to class variable or static variable of java class.
    In your case, It has a parameter which is set as ("counter", Integer) . Basically it is a key value pair and very similar to Hashtable in java.
    Example
    setParameter(String  str , Object  Integer);
    >What could that possibly be for I mean a type in parenthesis after the equals sign.
    typecast to integer in paranthesis, because we store the value here as Integer object.
    Integer counter = (Integer) gc.getParameter("counter");
    expecting  return type is Integer.
    Also refer this [link |global container;for further refereence

  • Write out file from java UDF?

    I have a synchronous RFC->XI->HTTP (no BPM) process and need to write out a log of the call details each time it runs.  At first, I tried having multiple receivers (one for HTTP and one for log file) in IB:Config, but received an error that I "cannot have multiple receivers when synchronous call".
    Should I be able to write out a file using java code in a UDF?  Should I do something with a BPM (and if so, any hints)?
    Thanks in advance!

    It deppends on which kind of log you want and how much time you're willing to spend on this.
    If you want to learn BPM and has available time to learn and implement, go for it. It will provide you more flexibility (since you can use any adapter protocol) and is way better for maintenance purposes.
    Your BPM will basically have 4 steps:
    1. A Receiver step in "Open S/A Bridge" mode;
    2. A Sender step in Asynchronous mode (to send the log message to your target system);
    3. A Sender step in Synchronous mode (to send the request to HTTP and receive the response);
    4. A Sender step in "Close S/A Bridge" mode.
    The mapping can be made in three ways:
    1. mapping between RFC and BPM (so your BPM will have abstract interfaces based on HTTP interface); or
    2. mapping between BPM and HTTP (so your BPM will have abstract interfaces based on RFC interface); or
    3. create 2 transformation steps in the BPM, one to map from RFC.request to HTTP.request and the other to map from HTTP.response to RFC.response (I'd not recomend this).
    Regards,
    Henrique.

  • Problem with queue and context change JAVA udf

    Hi all,
    MY scenorio is from source i get multiple instances and each instance i need to pass to different fields od target
    in one source instance i may get multiple values which i have to create multple nodes under one target instance.
    my source xml looka like below:
    - <CustomFieldsSegment>
    - <CustomFields Name="ForeignLanguageonPackaging">
      <Value Qualifier="en">English</Value>
      <Value Qualifier="fr">French</Value>
      </CustomFields>
    - <CustomFields Name="LayerHeight">
      <Value>5.0</Value>
      </CustomFields>
    - <CustomFields Name="LayerHeightUOM">
      <Value Qualifier="IN">Inches</Value>
      </CustomFields>
      </CustomFieldsSegment>
      </TargetMarketData>
      </ItemRegistration>
      </Payload>
      </ns:MT_TradeItemsExport>
    in the above xml the first custom field has qualifier "en' and "fr"
    i need to create 2 nodes under one target field.
    example:
    <AttrMany Name="ForeignLanguageonPackaging">
      <Value ="en">en</Value>
      <Value ="fr">fr</Value>
      </AttrMany>
    int eh source node <CustomFields Name="ForeignLanguageonPackaging"> may come in any matter .doesnt come always first
    and i wrote udf like below:
    public void queue(String[] a,String[] b,String[] c,ResultList result,Container container){
        // write your code here
    AbstractTrace traceObj = container.getTrace();
        int baseArrayIndex = 99;
        int ccCount = 0;
        boolean isfound = false;
        for (int i = 0; i < a.length; i++) {
               isfound = false;
            if (a<i>.equals(c[0])) {
            baseArrayIndex = i;
      traceObj.addInfo("initial  "+ i);
            for (int j = 0; j < b.length; j++) {
                if (b[j].equals(ResultList.CC)) {
                ccCount++;
                } else {
                if ( baseArrayIndex == ccCount ) {
                   result.addValue(b[j]);
      traceObj.addInfo("result  "+ b[j]);
                    isfound = true;
            break;
    if (!isfound)
    result.addSuppress();
      traceObj.addInfo("final result  "+ result);
    Please can anyone help me.
    Regards,
    jyothi

    Hi all,
    MY scenorio is from source i get multiple instances and each instance i need to pass to different fields od target
    in one source instance i may get multiple values which i have to create multple nodes under one target instance.
    my source xml looks like below:each ItemRegistration is one item at target
    -<ItemRegistration>
    - <CustomFieldsSegment>
    - <CustomFields Name="ForeignLanguageonPackaging">
    <Value Qualifier="en">English</Value>
    <Value Qualifier="fr">French</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeight">
    <Value>5.0</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeightUOM">
    <Value Qualifier="IN">Inches</Value>
    </CustomFields>
    </CustomFieldsSegment>
    </TargetMarketData>
    </ItemRegistration>
    -<ItemRegistration>
    - <CustomFieldsSegment>
    - <CustomFields Name="ForeignLanguageonPackaging">
    <Value Qualifier="en">English</Value>
    <Value Qualifier="fr">French</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeight">
    <Value>5.0</Value>
    </CustomFields>
    - <CustomFields Name="LayerHeightUOM">
    <Value Qualifier="IN">Inches</Value>
    </CustomFields>
    </CustomFieldsSegment>
    </TargetMarketData>
    </ItemRegistration>
    </Payload>
    </ns:MT_TradeItemsExport>
    in the above xml the first custom field has qualifier "en' and "fr"
    i need to create 2 nodes under one target field.
    example:
    <AttrMany Name="ForeignLanguageonPackaging">
    <Value ="en">en</Value>
    <Value ="fr">fr</Value>
    </AttrMany>
    int eh source node <CustomFields Name="ForeignLanguageonPackaging"> may come in any matter .doesnt come always first
    and i wrote udf like below:
    public void queue(String] a,String[ b,String[] c,ResultList result,Container container){
    // write your code here
    AbstractTrace traceObj = container.getTrace();
    int baseArrayIndex = 99;
    int ccCount = 0;
    boolean isfound = false;
    for (int i = 0; i < a.length; i++) {
    isfound = false;
    if (a.equals(c[0])) {
    baseArrayIndex = i;
    traceObj.addInfo("initial "+ i);
    for (int j = 0; j < b.length; j++) {
    if (b[j].equals(ResultList.CC)) {
    ccCount++;
    } else {
    if ( baseArrayIndex == ccCount ) {
    result.addValue(b[j]);
    traceObj.addInfo("result "+ b[j]);
    isfound = true;
    if (!isfound)
    result.addSuppress();
    traceObj.addInfo("final result "+ result);
    if i have only one item at the source it is working but when 2items are comming from the source my udf is not working.
    can anyone help me if you have faced the similar problem or who is fimilar like this kind.
    Regards,
    jyothi
    Edited by: jyothi vonteddu on Oct 21, 2009 9:14 PM
    Edited by: jyothi vonteddu on Oct 21, 2009 9:22 PM

  • Java UDF help

    hello
    I have a string that I recieve from a WS. the string is flat XML. I would like to take only sum of the string.
    I would the out put string to be from the begining tag <NS8:EzlifeInsuranceFile and to end </NS8:EzlifeInsuranceFile>.
    I would like to transfer the substring of the string the start with the tag above and ends with the string above. does any body has a UDF that does it?
    and example XML:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace">
         <SOAP-ENV:Header>
              <NS1:MessageID xmlns:NS1="http://schemas.xmlsoap.org/ws/2004/03/addressing">82851a66-374c-4847-bf53-437755c45654</NS1:MessageID>
              <NS2:From xmlns:NS2="http://schemas.xmlsoap.org/ws/2004/03/addressing">General</NS2:From>
              <NS3:StartTime xmlns:NS3="http://migdal.com/soap/header/">2008-12-23 10:32:29.077</NS3:StartTime>
              <NS4:ServiceName xmlns:NS4="http://migdal.com/soap/header/">MortgageProposalDetailService</NS4:ServiceName>
              <NS5:ServiceVersion xmlns:NS5="http://migdal.com/soap/header/">1.0</NS5:ServiceVersion>
              <NS6:CallIdentifier xmlns:NS6="http://migdal.com/soap/header/">176226f3-8c67-4dda-a069-ce8495e44236</NS6:CallIdentifier>
              <NS7:CurrentCallMetaData xmlns:NS7="http://migdal.com/soap/header/">
                   <NS7:ServiceName>MortgageProposalDetailService</NS7:ServiceName>
                   <NS7:ServiceVersion>1.0</NS7:ServiceVersion>
                   <NS7:StartTime>TIMESTAMP &apos;2008-12-23 10:32:29.171&apos;</NS7:StartTime>
                   <NS7:Provider>SAPCRM</NS7:Provider>
                   <NS7:Protocol>HTTP</NS7:Protocol>
                   <NS7:Server>mgnt371</NS7:Server>
                   <NS7:Destination>https://mgnt371:50001/XISOAPAdapter/MessageServlet?channel=:SOAP_Services:ProposalDetailsService_SOAP_Sender</NS7:Destination>
                   <NS7:Mode>Sync </NS7:Mode>
                   <NS7:User>xisuper</NS7:User>
                   <NS7:Password>mgdsap</NS7:Password>
              </NS7:CurrentCallMetaData>
         </SOAP-ENV:Header>
         <SOAP-ENV:Body>
              <NS8:EzlifeInsuranceFile xmlns:NS8="http://Migdal.co.il/ProposalDetailsRequest/Input">
                   <userName>CRM_SYS_USER</userName>
                   <password>Qaz9Pl@5</password>
                   <TransferType>2</TransferType>
                   <Agent>
                        <ID>237cb1f3-19e6-48b5-9e92-bdc1592f145b</ID>
                        <FirstName>סוכן</FirstName>
                        <LastName/>
                        <FullName>סוכן </FullName>
                        <AgentNumber>1254</AgentNumber>
                        <SupervisorName/>
                   </Agent>
                   <InsuranceFile>
                        <ID>222069cd-cf2c-45dd-a72d-e52e2c0e1c8a</ID>
                        <Family>
                             <ID>222069cd-cf2c-45dd-a72d-e52e2c0e1c8a</ID>
                        </Family>
                        <AdditionalQuestionsSelection>
                             <CapitalPensionPrimeDivisionSelection>5</CapitalPensionPrimeDivisionSelection>
                             <SalaryInNIS>0</SalaryInNIS>
                             <SalaryInPercents>0</SalaryInPercents>
                             <InvestmentTypeSelection>1</InvestmentTypeSelection>
                             <RewardRouteSelection>1</RewardRouteSelection>
                             <CompensationRouteSelection>1</CompensationRouteSelection>
                             <DangerousHobbySelected>False</DangerousHobbySelected>
                             <DangerousHobbyDescription/>
                             <IsCourseNoEmployerAproved>False</IsCourseNoEmployerAproved>
                             <IsCourseWithEmployerAproved>False</IsCourseWithEmployerAproved>
                             <StartWorkingDate/>
                             <SpouseSmokingStatusDetails>
                                  <SmokingStatus>0</SmokingStatus>
                                  <CigarettesPerDay>0</CigarettesPerDay>
                                  <YearsOfSmoking>0</YearsOfSmoking>
                                  <YearsOfNotSmoking>0</YearsOfNotSmoking>
                             </SpouseSmokingStatusDetails>
                             <ProposalReceivingDate>23/12/2008 10:32:27</ProposalReceivingDate>
                        </AdditionalQuestionsSelection>
                        <Note/>
                        <Title/>
                   </InsuranceFile>
              </NS8:EzlifeInsuranceFile>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Hi Grzegorz Glowacki,
    I am sorry this is not working :(.
    Sample input: 4E2D56FD     -->basically this hexavalues are chinese character representation.
    Output for it: ?????????
    +for verification:open Wordpad-->copy the hexcode >select 4chars at a time> hit <altx> and you will get corresponding conversion value.++
    String result = new String();
    try {
      byte[] bytes = new byte[input.length()/4];
        for (int i = 0; i < input.length()/4; i++) {
          byte value = Integer.valueOf(input.substring(i*4,i*4+4), 16).byteValue();
          bytes<i> = new Byte( value );    *//Byte cannot be stored in byte*
        result = new String(bytes, "UTF-16");
    catch (UnsupportedEncodingException e){}
    return result;
    Also this is PI7.0 system. please do help.
    thanks in advance.
    Regards,
    Prakash.
    Edited by: senthilprakash selvaraj on Feb 2, 2012 9:38 AM

  • Validating a sender file using a JAVA UDF in PI message mapping

    Hi,
    I have a sender file with one header and multiple detail lines. I have been asked to read a tag on the header which contains the total number of detail lines.
    I then loop round the detail lines counting the total number. If the total number of detail lines matches the total value in the header tag then XI can process the files otherwise the mapping should raise an exception.
    Has anyone encountered this before and if so do you have an example of the Java code you used ?
    Many thanks
    Mark

    Hi,
    You can refer to this link for a similar kind of requirement but it is of inserting newline at the end of each line.
    But you can customize the code for ur use.
    Please refer https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/howtoappendCarriageReturnintheendofeachtagofxml+file.
    Now in this code you can use the logic something like this.
    1. You must be knowing the header tag where your actual Total Count number resides. Put it in some variable, while looping over xmlString. Don't put anything in resultset until u come to actual line items.
    2. Now start adding your counter. At the end of this loop you will have 2 variable. 1 contains the actual given total counts from header and other will contain calculated count.
    3. Match it in if condition , if not matched do nothing no resultset append or may b you can send some exception or if matched send the actual XML.
    Hope this will help you a bit.
    Regards
    Aashish Sinha

  • Imported Archives (Java) - UDF - package not found

    Hi,
    I have created a simple Java program using NWDS and imported the jar file into the Namespace.  When I try to instantiate my class, it says Package does not exist.
    Can any one let me know why am I getting this error?
    Thanks
    Venkat Viswanathan

    Hi Venkat,
    Check this thread..
    User defined function- how to import the jars
    cheers
    Prashanth
    P.S Please mark helpful answers

  • Java UDF help: Hexadecimal to Chinese Unicode converison

    Hi Experts,
    can someone help me in a design solution to convert Hexadecimal Values to Chinese Characters while sending the data to receiver system.
    I am not able to get any methods in Java to do the conversion.
    Help is appreciated.
    Regards,
    Prakash.

    Hi Grzegorz Glowacki,
    I am sorry this is not working :(.
    Sample input: 4E2D56FD     -->basically this hexavalues are chinese character representation.
    Output for it: ?????????
    +for verification:open Wordpad-->copy the hexcode >select 4chars at a time> hit <altx> and you will get corresponding conversion value.++
    String result = new String();
    try {
      byte[] bytes = new byte[input.length()/4];
        for (int i = 0; i < input.length()/4; i++) {
          byte value = Integer.valueOf(input.substring(i*4,i*4+4), 16).byteValue();
          bytes<i> = new Byte( value );    *//Byte cannot be stored in byte*
        result = new String(bytes, "UTF-16");
    catch (UnsupportedEncodingException e){}
    return result;
    Also this is PI7.0 system. please do help.
    thanks in advance.
    Regards,
    Prakash.
    Edited by: senthilprakash selvaraj on Feb 2, 2012 9:38 AM

  • Replace Fixvalue function with a JAVA UDF

    Hi,
    I need to replace the fixvalue standard function by an UDF, is there anyway to fulfil this requirement?
    thanks in advance.

    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5?quicklink=index&overridelayout=true|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5?quicklink=index&overridelayout=true]
    This blog may help.

  • Mapping Help Needed - Message or Java UDF

    Hello Gurus,
       I have a source structure as below.
    Idoc
    -group_a (0 to 99999)
    --  sub_groupa_1 (0 to 99999)
          sga1_field_1
           sga1_field_2
    --  sub_groupa_2
         sga2_field_1
         sga2_field_2
    --  sub_groupa_n
         sgan_field_1
         sgan_field_2
    -group_n
    --  sub_groupn_1
         sgn1_field_1
         sgn1_field_2
    --  sub_groupn_2
         sgn2_field_1
         sgn2_field_2
    --  sub_groupn_n
         sgnn_field_1
         sgnn_field_2
    every group creates an output group (lineitem), that works fine 
    now my requirement is as below
    a particular output field (per output group) = sum (sub_field_2s) wherever sub_field_1s = first occurence of sub_fld_1 of the corresponding group
    I tried different things, but could not get the required results.
    pls let me know if my explanation is not clear..
    Please help..
    thanks
    KnowledgeQuest.

    Hi,
    Please provide your source and target structure...Also, if possible, please provide sample inputs/outputs so that we can visualize your problem correctly.
    hope this helps,

Maybe you are looking for

  • My Skype Number is busy continuously

    I am trying to call up the skype number from my mobile number however it is coming busy continously. Please help. Thanks, [Removed for privacy] Team Post transferred to create its own new thread (topic); Subject/title edited accordingly.

  • Problems with flash in VMware

    Hi all, I am currently having trouble with flash player in VMware.  Some flash content works fine while others do not.  For example, when navigating to youtube the banner will not load correctly but I can watch a video with no issues.  Have gone thro

  • Import Folder by Current Date Rather Than Date Shot?

    Does anyone know if it is possible to request on Import for LR to put images into folder created on the day you download as opposed to the date the photos were taken? Aperture and Photo Mechanic allow this but I can't seem to find this specific abili

  • Lost a full days worth of work even though I save?

    I've been working on a project all day and suddenly without warning logic just disappeared. I save routinely every five or ten minutes, but the backup files show that the last time it was saved was early this morning. I've lost a lot of time and mone

  • Determining decimal places in Amount field

    Dear All, I want to upload a file on app. Server. It has an Amount field. Requirement is to upload Amount field with right number of decimal places. How can I do this? Is there any Function Module or any other way for this? Please let me know. Thanks