Concatinating multiline by using UDF

Hi all,
In my scenario , I am having the condition , If that condition is true then we have to concatenate the multiple note into one value. Here I written UDFby selecting the option as Context value, In this case it is returing void. How can I add the concating values to resultList and how can I map to target field.
Regards,
Sri

Esha,
I do not have specific documentation about its implementation, but :
1 - import SALERT_CREATE RFC structure definition (I did this in a CORE swcv that is referenced across all needing swcvs)
2 - I built my own RFC lookup wrapper to provide easy to use lookup methods (input as String or DOM object)
3 - I built SALERT_CREATE input structures and values in a dedicated static class called in my mappings
4 - this class calls RFC lookup wrapper method that serialize those input values and calls the suitable RFC receiver channel with the whole msg containing alert details (providing category and containers are defined in ALRTCATDEF)
I'll try to get some source code snippets if you need'em
Rgds
Chris

Similar Messages

  • Error while using UDF in 2007b

    Hi,
    i recently upgraded from 2005b to 2007b
    when i am using manager login to enter some UDF values
    in excise invoice there is no problem
    but when i am using any other login and clicking on
    view>> user defined fields
    it is giving an internal error and SAP window is closing
    i have to login again.
    i have checked the authorisations etc. no problem there
    as it was working fine in 2005b
    can you all help me with this
    problem
    thanks
    with regards
    Pradipta

    If all super users can use UDF without problem, chances are your authorization setting may have problem.  Use one non super user to test by giving the user most of full right to see.
    Thanks,
    Gordon

  • Error in mappingwith dynamic configuration using udf

    Hi All,
    Good Morning,
    i am working with ABAP proxy to file scenarion but here according my client requirement i am using udf for file dynamic configuration.
    In mapping, i mapped the field from "Filename" to message type tag(receiver file header)  "/ns0:MTxxxxxxDataFile". between there two fields i am using the following udf for dynamic configuration. but i got error after testing with test data in mapping that is also mentioned below.
    plz help me to solve the error. i will be wait for ur immediate response this sis very urgent.
    very thankfull to immediate response.
    UDF:
    i am not puting any packages here.
    public String putFileNameInHeader1(String a,Container container){
    //write your code here
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, a);
    return "";
    ERROR:
    12:21:30 Start of test
    Compilation of MMSAPLegacySalesDataToCOGNOS successful Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:350) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:83) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:59) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:252) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:75) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:59) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:37) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:252) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:401) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:105) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:313) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:199) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:215) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.NullPointerException at com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_.putFileNameInHeader1$(_MMSAPLegacySalesDataToCOGNOS_.java:853) ... 26 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MTCOGNOSLegacySalesDataFile. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._MMSAPLegacySalesDataToCOGNOS_ method putFileNameInHeader1$[cd00000038, com.sap.aii.mappingtool.tf3.rt.Context@f300f30]
    12:21:35 End of test

    Hi Sai,
    First of all, this UDF is pretty well knaown so there is no error in this UDF or your configuration for this UDF. I can suggest you something that at the time of configuration in IR, give a context object for that particular field of that file and then use the contect object name everywhere to refer that field. and also check the message type config for correction for my sake.
    There is also a possibility that of the input data. i guess you are sending the input file from Cognos and you making the file and putting some where in XI directory and want these to process something and generate with some new desired filename. Check the input because i guess its finding NOTHINg as an Input. check once again.
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : Reward points if helpful.

  • Performance problem in Mapping Designer using UDF with external imports

    Hello,
    we do have a big performance problem in developing (not in execution) graphical Mappings as far as we use "user defined functions" (UDF) with include-entries referencing to jar files which are imported as "imported archives".
    For example the execution of invice mapping with a little bit bigger test file in the Mapping designer:
    - after opening, not in change mod: 6 seconds
    - after switching to change mod: 37 seconds (that's clear, now everything is compiled first)
    - after adding "com.seeburger.functions.permstore.CounterFactory;" into the "import" field of one UDF, no other change: 227 seconds
    - after saving and submiting the changlist (no longer in change mode): 6 seconds
    - after switching to change mode: 227 seconds
    So execution speed of testing (and also when watching queues) only increases in changemod more then three minutes when using UDF with imports, referencing to external JAR files. It doesn't depend on Seeburger functions (we are using XI also for EDIFACT, so we also use some Seeburger functions), I can reproduce it with any other JAR file which is used from a UDF.
    Using java included functions like "java.text.NumberFormat;" in "Import" doesn't slow down the testing.
    Can anybody reproduce this? We are using XI 3.0 SP19 on a AIX machine, so we also have to use the Java version from IBM.
    cu
    Manfred

    Problem was fixed by a upgrad of the JDK.

  • Same file name from sender to receiver file adapter with out using UDF

    Hi All,
    I am working on FILE TO FILE. My requirement is same file name from sender to receiver file adapter. Is it possible to do using only Adapter Specific message properties?  i mean with out using UDF.
    Thanks
    Karthik

    Hi,
    >>>Is it possible to do using only Adapter Specific message properties?
    yes
    just enable Adapter Specific message properties in sender and receiver channel for file name
    and you're done
    Regards,
    Michal Krawczyk

  • File to file transfer using UDF

    Hi
      i am doing one scenario,file tofile transfer using UDF.
    I will write one UDF which will read the whole content from text file and write to the target path.Ok.so i am mentioning both sender and reciver URL in UDF.is this the correct way.
    then if am writing URL in UDF then is it again need to create  communication channel for both.
    and how i will do mapping  using UDF..plz let me know  weather my concept is correct or not

    Hi,
    You can do this with out UDF and through File--File Simple Scenario
    What is your Typical requirement to use the UDF here.
    If there is no Specific UDF Requirement means , we can follow Normal Scenario to pick the file from One place and to place it at another folder
    File to File scenario:
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1) - File to File Part 1
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2) - File to File Part 2
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&
    REgards
    Seshagiri

  • Existance of decimal point in String using UDF

    hi,
    How would i know the existance of decimal point in String using UDF in SAP XI message mapping?
    Regards,
    Sanghamitra

    public String calculate(String var1, Container container) throws StreamTransformationException
    Boolean b=var1.contains(".");
    if(b)
    return "true";
    else
    return "false";
    Also using standard function IndexOf you can achive this.

  • File to ile using udfs

    hi
    can any one provide me
    sample file  to file scenarios using
    udfs
    regards
    ram

    Hi Ramu,
    Check out this links for simple fie-to-file scenario
    File-XI-File scenario and complete walk through for starters (Part1)
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to (File-XI-File) scenario and complete walk through for starters (Part2)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    File Receiver with Content Conversion

  • How to read XI Data type in Java code and populate as array list, using UDF

    Hi,
    How to read XI Data type in Java code and populate as array list, using UDF?
    Is there any API using which  the XI data types can be read?
    Kindly reply.
    Richa

    Input Structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:CustomerCreateResp xmlns:ns0="urn:bp:xi:up:re:cust_mdm:cmdm:pr5:100">
       <CUSTOMER>
          <item>
             <CUSTOMERNO/>
             <MDMCUSTOMER/>
             <CREATE_DATE/>
             <RETURN>
                <TYPE/>
                <MESSAGE/>
             </RETURN>
             <PT_CONTPART_RETURN>
                <item>
                   <MDM_CONTACT/>
                   <CONTACT/>
                </item>
             </PT_CONTPART_RETURN>
             <PARTNERS>
                <item>
                   <CUSTOMERNO/>
                   <PARTNER_FUNCTION/>
                   <PARTNER_NUMBER/>
                   <DEFAULT_PARTNER/>
                </item>
             </PARTNERS>
          </item>
       </CUSTOMER>
    </ns0:CustomerCreateResp>
    Output structure
    (Sample output structure.This actually needs to be mapped and generated using UDF)
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:updateCustomer xmlns:ns1="urn:xiSericeVi"><ns1:customer><ns2:ArrayList xmlns:ns2="java:sap/standard">[]</ns2:ArrayList></ns1:customer><ns1:name>2344566</ns1:name></ns1:updateCustomer>

  • Capture context change without using UDF

    Hi,
    I need to find context change of a field without using UDF.
    I know we can do it in an UDF by comparing with ResultList.CC.
    But do we have any graphical constant that notifies a context change?
    regards,
    Piyush

    Hi,
        There is no graphical constant by which you can identify a context change without using UDF. However, if you leave the context of the field at the level of the immediate parent and map accordingly, you can handle the contexts directly in your GUI mapping. This however would also depend on your mapping requirements.
    Regards,
    Shiladitya

  • Generate Sender Service using UDF

    Hi Experts,
    We use a RFC lookup in one of our message mapping. We use a UDF to attain this. There is no problem in the RFC lookup.
    There is specific lines code which generates the Sender service during runtime in this UDF.
    Code:
    String strSenderService = new String("");
    strSenderService = XIVMService.executeMapping("XIDesignTime","http://xi-design-time","R3System","XIRunTime","http://xi-run-time");
    trace.addInfo("strSenderService is "+strSenderService);
    This specific lines of code is generating the Sender Service which is already deleted and activated in XI.
    Note: If we hard code the Sender Service to the required Service name the scenario is working fine.
               The same code is working in Quality system.
    Hence there is some minor change needed in this lines of code, so could anyone help us on the same.
    Regards
    Suganya.

    Hi,
    if the same code working in quality means then i dont think chnages required in existing code.
    my suggestion is.. better to hard code  bussiness service name, in quality / production  if service name chaging then alter your code like check for which enviornment dev / qual/prod , retrive system id based on that pass your service name(hard code it).
    Regards,
    Raj

  • Create Attachment within Graphical Mapping using UDF

    Hi!
    We want to create an attachment witihn a graphical mapping using an UDF function.
    I use that function:
    public String addAttachment(String filename, String mimeType, String content, Container container) throws StreamTransformationException{
         BASE64Decoder decoder=new BASE64Decoder();
         try {
              GlobalContainer globalContainer = container.getGlobalContainer();
              OutputAttachments outputAttachments = globalContainer.getOutputAttachments();
              Attachment attachments = outputAttachments.create(filename, mimeType,decoder.decodeBuffer(content));
              outputAttachments.setAttachment(attachments);
              return "Adde1: "+filename;
         } catch (Exception e) {
              return e.toString();
    (SDN helped me much in creating that
    This function has no compiling errors, anything workes fine:
    It takes 3 input-parameters, see also: http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/OutputAttachments.html
    filename (ok, more or less contentID)
    mimeType (more or less contentType)
    content: Base64-encoded String which should be set as content
    In my sample I use the following constants for that function:
    filename = "fn1.txt"
    mimeType="application/xml"
    content = "UG9seWZvbiB6d2l0c2NoZXJuZCBhw59lbiBNw6R4Y2hlbnMgVsO2Z2VsIFLDvGJlbiwgSm9naHVydCB1bmQgUXVhcms=" --> cames directly from http://de.wikipedia.org/wiki/Base64
    When using the message, I got this error within SXMB_MONI:
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive for
    message 0022642d-b106-02df-8e8c-f41c243bd112(INBOUND). Reason: java.lang.NullPointerException: while trying to
    invoke the method com.sap.aii.af.sdk.xi.lang.Binary.getBytes() of an object returned from
    com.sap.aii.af.sdk.xi.mo.xmb.XMBPayload.getContent()</SAP:AdditionalText>
    This looks pretty much the same as Add Attachment from ABAP Mapping but this tread is also not answered.
    Adding attachment from PI level looks also in that direction, again, no answer.
    So, I was wondering if someone has solved such problem?

    Hi Divyesh!
    We did it that way:
    1. Choosing the XML-Mailstructure as Destination as described in Configuring the Receiver Mail Adapter - Advanced Adapter Engine - SAP Library -  Example (XI payload with mail package)
    2. now we have created a UDF for creating the "content"
    public void getContent(String[] text, String[] attFname, String[] attType, String[] attContent, ResultList result, Container container) throws StreamTransformationException{
    // vergleich ob alle att-Arrays selbe anzahl haben
    if (attFname.length!=attType.length || attFname.length!=attContent.length) {
        result.addValue(Integer.parseInt("Fehler: alle Attachment-Eingänge müssen die selbe Anzahl an Elementen haben!"));
        String CRLF = "\r\n";
        String output="This is a multi-part message in MIME format."+CRLF+CRLF+
        "--"+getBoundary(container)+CRLF+
        "Content-Type: text/plain; charset=UTF-8"+CRLF+
        "Content-Disposition: inline" + CRLF + CRLF +
        text[0]+CRLF;
    for (int i=0;i<attFname.length;i++) {
        output+="--"+getBoundary(container)+CRLF+
        "Content-Type: "+attType[i]+"; name="+((char)34)+attFname[i]+((char)34)+CRLF+
        "Content-Disposition: attachment; filename="+((char)34)+attFname[i]+((char)34)+CRLF+
        "Content-Transfer-Encoding: Base64"+CRLF+CRLF+attContent[i]+CRLF;
    output+="--"+getBoundary(container)+CRLF;
    result.addValue(output);
    This UDF is configured as "QUEUE"
    We have configured this input-structure
    The Content itself is allready base64.
    So we can call this mapping and it creates a Multipart-Mail for us.

  • Emails not being generated using UDF

    Hi,
    We had setup a functionality to send email via UDF using the following blog.
    Mail without email adapter? Part - I - Process Integration - SCN Wiki
    This worked fine for some time. However, it does not generate emails anymore. There were no changes done on the objects. We checked the java mail service settings as suggested in some of the SCN posts and everything looks configured fine.
    We are not able to determine what is preventing the emails from being generated. Any pointers would be really helpful.
    We are using SAP PI 7.31 java only installation.
    Thanks,
    Ravi

    Hi Ravi,
    Did you check SMTP services availability?
    SMTP Configuration in SAP XI - Process Integration - SCN Wiki
    Regards,
    Krupa

  • Triggering an HTTP to file scenario using UDF

    Hi,
    Is it possible to trigger an http to file scenario from  UDF? If it is possible can anyone tell me how it can be acheived.
    regards,
    Meenakshi

    hi,
    can u tell me how this could be possible?
    my requirements are such that we are collecting some data in UDF and creating an xml. this xml is sent to another scenario using HTTP adapter.  this adapter need to be triggered from the UDF.
    please let me know how this can be done.
    regards,
    meenakshi

  • Calling RFC using UDF

    Hi,
    I have a small doubt.
    In file to IDOC mapping, I am mapping two fields using a UDF.
    That UDF in turn calls a RFC.
    But that RFC is not moved to quality server.
    If now I try to test that in quality environment, the mapping works fine and IDOC is posted because the error handling is done in ABAP.
    My doubt is why did the messge did not failed in XI, saying the RFC not available??
    I tried to search in sdn, by did not get anything related to this.
    Please try to clarify my doubt.
    Regards,
    Sachi

    Ravi,
    Below is the UDF code:
    MappingTrace importantTrace = container.getTrace();
    String query = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:Z_RFC_UOM xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">";
    String restQuery = "</ns0:Z_RFC_UOM>";
    String Lookup_Key_Tag = "I_MATNR";
    String Lookup_Key_Tag1 = "I_VKORG";
    String Lookup_Key_Tag2="I_VTWEG";
    String Lookup_Value_Tag = "E_MENEE";
    String Lookup_key_StartTag = "<" + Lookup_Key_Tag + ">";
    String Lookup_key_EndTag =  "</" +Lookup_Key_Tag + ">";
    String Lookup_key_StartTag1 = "<" + Lookup_Key_Tag1 + ">";
    String Lookup_key_EndTag1 =  "</" +Lookup_Key_Tag1 + ">";
    String Lookup_key_StartTag2 = "<" + Lookup_Key_Tag2 + ">";
    String Lookup_key_EndTag2 =  "</" +Lookup_Key_Tag2 + ">";
    String Lookup_Value_StartTag = "<" + Lookup_Value_Tag + ">";
    String Lookup_Value_EndTag = "</" +Lookup_Value_Tag + ">";
    String comm_channel = "";
    String content = "";
    String items = "";
    String item1 = "";
    String item2 = "";
    String item3 = "";
    String ItemsTag = "";
    String Lookup_Value = "";
    int j =0;
    String Rec = Service[0];
    for(int i= 0;i< material.length;i++)
                ItemsTag =  Lookup_key_StartTag material<i> Lookup_key_EndTag;
                item1 = item1 + ItemsTag;
    for(int i= 0;i< sales_org.length;i++)
                ItemsTag =  Lookup_key_StartTag1 sales_org<i> Lookup_key_EndTag1;
                item2 = item2 + ItemsTag;
    for(int i= 0;i< dist_channel.length;i++)
                ItemsTag =  Lookup_key_StartTag2 dist_channel<i> Lookup_key_EndTag2;
                item3 = item3+ ItemsTag;
    items=item1item2item3;
    items = items + restQuery;
    query = query + items;
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    comm_channel = "CC_Recv_RFC";
    try
                Channel channel = LookupService.getChannel(Rec,comm_channel);
                accessor = LookupService.getRfcAccessor(channel);
                InputStream inputStream = new ByteArrayInputStream(query.getBytes());
                importantTrace.addWarning(query);
                XmlPayload payload = LookupService.getXmlPayload(inputStream);
                Payload result1 = accessor.call(payload);
                InputStream in = result1.getContent();
                out = new ByteArrayOutputStream(1024);
                byte[] buffer = new byte[1024];
                for(int read = in.read(buffer);read>0;read = in.read(buffer))
                            out.write(buffer,0,read);
                content = out.toString();
                importantTrace.addWarning("RFC Response::" + content);
                //Parsing RFC output
                j= 0;
                while ( content.indexOf(Lookup_Value_StartTag) != -1 )
                                                                Lookup_Value = content.substring( content.indexOf(Lookup_Value_StartTag) + Lookup_Value_StartTag.length()  , content.indexOf(Lookup_Value_EndTag) ) ;
                                                                importantTrace.addWarning("LookupValue::" + Lookup_Value);
                                                                j++;
                                                                content = content.substring(content.indexOf(Lookup_Value_EndTag) + Lookup_Value_EndTag.length() );
                                                                result.addValue( Lookup_Value);
    }//end of try
    catch(Exception ex)
                importantTrace.addWarning("Error while lookup"+ ex.getMessage());
    //catch(LookupException e){  importantTrace.addWarning("Error while lookup"+ e.getMessage()); }
    //catch(IOException e) { importantTrace.addWarning("Error while IOException"+ e.getMessage()); }
    finally
                if(out!=null)
                            try
                                        out.close();
                            catch(IOException e)
                                        importantTrace.addWarning("Error while IOException"+ e.getMessage());
                if(accessor!=null)
                            try
                                        accessor.close();
                            catch(LookupException e)
                                        importantTrace.addWarning("Error while lookup"+ e.getMessage());
    result.addValue("");

Maybe you are looking for

  • Unknown error. I can't copy music to my new ipod.

    Every time I try to hook my ipod up and press update, it will give me this message........ Attempting to copy to the disk "ipod" failed. An unknown error occured (-69)....................How do I fix this? I've tried reinstalling itunes and the ipod

  • Nokia e65 memory card problem

    Is there any possibility that an 8gb micro sdhc card to work on a Nokia E65?

  • Cmr field and ejbgen

    How do i define a cmr-field through ejbgen annotations in weblogic? I have defined the relation as * @ejbgen:relation * multiplicity = one * name = EntityCanHaveMultipleJournals      * role-name = EntityHasJournals * target-ejb = FTEntityEJB * @ejbge

  • Workflow Activation Status is Runtime exist

    Hi All, I have transported a WF in ECC5.0 system from Development to Quality . In Quality System, When  i checked in SWDD that Workflow is not activated. Its Showing as 'Runtime Exists', Saved Please let me know what i have to do now. Do i have to re

  • Forte and windows98???

    Hi Forte Experts Can we use forte with windows98, and if so: which versions? limitations? problems? The reason for asking such a dumb question is, that we just installed a brand new 'super-specifications' pc with windows98 and now we have userwindows