Map base64 attachment to single field

Hello,
in a proxy --> http scenario I receive a message with SOAP attachment (base64 encoded). The requirement on http receiver side is now, that the attachment is put in a single element, just like:
<attachment> base64code </attachment>
Is there a simple way to do this? I guess I have to use Java mapping, but I am still not sure how to handle this requirement.
Thank you for your help.

Hi,
good blog thank you very much. Obviously there is an SAP API available that would do most of the work for me:
com.sap.aii.utilxi.base64.api.Base64.encode(bs);
However so far it is still not sure whether SAP Proxy sends the attachment as SOAP attachment or within a single field (depends on the technical restrictions, no final decision is taken yet).
However if they are able to send the bytecode in a single field it might even be possible to convert the content using an UDF using the above mentioned API ?.
However I am still not sure how to extract an attachment in case SAP cannot deliver the content in a single field.

Similar Messages

  • Mapping issue: from unbound node to two single fields

    Hello,
    I have a source message with a node that is 0... unbounded.
    The node contains a field named "component_name" with occurence  1..1.
    The target message contains only two single fields (component1, component2) and the task is to provide the first two occurences to these fields.
    node occ.1
       component <modul beta>      ->    component1
    node occ.2
       component <modul omega>      ->    component2
    We can expect to have any case like these:
    node is 0   -> no components provided
    node is 1  -> one component provided  (usual case) , so second field will be empty
    node is 2 -> two components provided
    node is > 2 -> need to pick the first two components to provide them to the target fields.
    Does anybody here have an idea how to solve this mapping issue?
    Your ideas are really welcome!
    Best regards
    Dirk

    Stefan's solution is very good, alternatively, if you are sure that you will always have at least two items you can do
    source -> copyValue[0]-> target
    source -> copyValue[1]-> target
    please note: if you don't have at least two items in your source the copyValue function will throw an exception

  • FCC-Mapping all content in a single field

    Hi all,
    I have a requirement to map all the content in the textfiles to the single tag of xml .Do any one know how to configure this in Communication channel.  I referred SAP help docs but all for mapping it with by separter or by fixed length etc.. I want to map all the contents in a single field.
    Laks

    try to add trace to messages and see what is happening.
    try to put
    trace.addInfo(outputPayload);
    after
    outputPayload =
                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                   + StartXMLTag
                   + strXML
                   + EndXMLTag;
    See in the trace if your file content is visible.
    The only way to troubleshoot java mapping is by adding traces at various places and checking the flow.

  • F4 help for a single field in interactive form

    Hi Experts,
    I am working in HRAS process.I created a Form Scenario and an Adobe Form.  I linked my interactive form in portal using standard Start Processes iView . Now I have to create a value help(F4 help) for 'STATE' field based on 'COUNTRY' field value in adobe form.  I filled the Input value Help in the corresponding Form Scenario field. But in portal the adobe form shows the field as a single field only.
    How I can I attach the manual F4 help to 'COUNTRY' field?
    The how to  vary the F4 help values in 'STATE'  fied based on 'COUNTRY'  field?
    Do I need to code  in Java script for this?
    Please provide some inputs with code sample
    Thanks in advance,

    Lek,
    Check Nikhil's reply in this [thread|Re: Reg: value help from BADI is not displayed in the HCm form;. It should probably help you.
    Chintan

  • Xml payload in a single field

    Hi All,
    I hve a scenario like this ERP->XI->Monitoring system
    In the mapping, I need to assign the outbound payload (whole xml) to a field in the target
    message field since the (Target) Monitoring system wants to receive the whole xml message in single field.
    How can i achieve this?
    Thanks
    Deno

    try this.. some of the imports are not required.. however I just copied from my code..
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.service.trace.Trace;
    import java.util.Hashtable;
    //XML Parsing and Transformation classes
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.io.InputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.StringWriter;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import javax.xml.transform.*;
    import javax.xml.transform.Source;
    import javax.xml.transform.Result;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;     
    Object obj = null; //Handler to get principal data
              Message msg = null;// Handler to get message object
              String getXMLtoField = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message)obj;
                   XMLPayload xmlpayload = msg.getDocument();
                        DocumentBuilderFactory factory;
                        factory =DocumentBuilderFactory.newInstance();
                        DocumentBuilder builder = factory.newDocumentBuilder();
                        // parse the XML Payload
                        Document document = builder.parse((InputStream)
                        xmlpayload.getInputStream());
                        OutputFormat format = new OutputFormat(document);    // Serialize DOM
                        StringWriter stringOut = new StringWriter();    // Writer will be a String
                        XMLSerializer serial = new XMLSerializer(stringOut, format);
                        serial.asDOMSerializer();                       // As a DOM Serializer
                        serial.serialize(document.getDocumentElement());
                        String FileContent = stringOut.toString();
              return getXMLtoField;

  • How to map an array to fixed fields using Biztalk mapper

    I need to remap an array of objects like this:
        <Root>
          <ListOfObjs>
            <Obj>
              <Attr1>0000</Attr1>
              <Attr2>Hello!</Attr2>
            </Obj>
            <Obj>
              <Attr1>1111</Attr1>
              <Attr2>Hello1!</Attr2>
            </Obj>
          </ListOfObjs>
        </Root>
    in an output like this:
            <Root>
                <Obj1_Attr1>0000</Obj1_Attr1>
                <Obj1_Attr2>Hello!</Obj1_Attr2>
                <Obj2_Attr1>1111</Obj2_Attr1>
                <Obj2_Attr2>Hello1!</Obj2_Attr2>
            </Root>
    So in my XSD schema I have something like this:
    Schema Input
                               <xs:element name="Root">
                                <xs:complexType>
                                 <xs:sequence>
                                  <xs:element name="ListOfObjs">
                                   <xs:complexType>
                                    <xs:sequence>
                                     <xs:element name="Obj">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
                                    </xs:sequence>
                                   </xs:complexType>
                                  </xs:element>
    Schema output
                                     <xs:element name="Root">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Obj1_Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Obj1_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr1">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
    In addiction I have to evaluate every single value because when I found some conditions (like if value=0000 output should be NULL).
    What would be the best way to do it? I'm thinking to develop a custom functoid but I'm not sure it would be the best way, probably it could be done even using XSLT inline transforms, can you point me in the best direction?
    Thank you

    Hi,
    You cannot directly map an array output to any single field in BizTalk mapper.
    Couple of options :
    1) create
    the Xslt or inline C# code
    Refer: 
    http://seroter.wordpress.com/2008/10/07/splitting-delimited-values-in-biztalk-maps/
    2) Shankycheil has
    provided a solution to similar requirement in the below link, u can also refer that.
    https://social.msdn.microsoft.com/Forums/en-US/55ec472d-4f34-4057-b1c6-0e50740f0f6e/how-to-itterate-string-array-values-in-biztalk-mapper?forum=biztalkgeneral
    Rachit
    Thank you, I already seen both posts, but I'm not sure they are what I need or I can't understand well how to use them.
    Speaking about the first solution, as I told before, in the example I should have an array already formed and delimited by a char (something like "obj1attr1-obj1attr2-ob2attr1-obj2attr2". In this situation probably this example could be a good
    point to start from, but how to transform my complex input object in a similar formatted string?
    About the second I don't understand well what is the working solution that they have adopted. Is the 4 steps solution suggested by  Shankycheil? If yes, how can I loop between all array elements and extract all their values?

  • Payload as a single Field

    how we can treat full file (Full payload ) as in single field.
    While file picking from sender end and keep the  full content as a payload in single field at source side?

    Hi,
    A bit confused with your question, but here are the two things which might help
    1) sending whole source payload into single field in target structure, you can do this by mapping the headersegment to the target field and select RETURN AS XML on right click. there is one blog on this with screen shots if you want to take a look.
    2) Taking whole payload from a single source field, You can do this by writing an UDF to extract the XML payload file and placing it before the MM in OP.
    Thanks...
    Karna....

  • Multivalue checkbox in single field of datascheme of XML form

    Hello everyone,
    is there a way to provide the user a chance to select multiple values via checkboxes in an XML-form and write the values in a single field of the datascheme?
    Currently only the first of the selected values ends up in the proper field, although several checkboxex are attached/connected.
    Any ideas?
    THX-Henning

    I found another alternative solution.
    Regarding to how to display the multivalue properties with the multi-valu check box in "Details":
    1) Go to CM -> Global Services -> Property Metadata -> Properties
    2) Go to the property that you want to display multivalue, for my case- "NewsType", set the "Property Renderer" parameter to "allowedvale_multivalued" (for sure you have to define the allowed values)
    3) Go and check in "Details", it should show the multi-value property in check box group. Then you can "tick" and "untick" to change the values.
    Kent

  • Concat 4 source fields in new line to a single field in IDoc segment-field?

    HI,
    My requirement is below: Need to concar 4 sources fields in a file and map them to a single target field (In IDoc) with each source field in new line.
    Lets say if I have a source file with
    f1, f2, f3, f4
    I need to send to single target field as follow:
    f1
    f2
    f3
    f4
    It is basically concat in newline. Can I use any delimiter string in std concat funtion or help me to provide sample code for UDF.
    Regards,
    N@vIn

    Sample UDF for your case.
    public String concatStrings(String var1, String var2, String var3, String var4, Container container) throws StreamTransformationException{
              String newLine = System.getProperty("line.separator");
              //String newLine="\r\n";
              String concatString =var1 + newLine + var2 + newLine + var3 + newLine +var4;
              return concatString;
    Note: Use System.getProperty that would take care for all Operating systems when deploy this code.
    you might not able to test in test mapping tool
    If you run in eclipse or nwds you will see output as follows
    var1 value
    var2 value
    var3 value
    var3 value
    Hope this helps. Let me know further.

  • Conversion of Zip file in to a Single Field

    Dear All,
    Scenario:File to File
    How can I convert the input zip file in to the single field in Mapping in PI 7.0.
    Regards,
    Manikandan

    Hi All,
    I have to process the two(ZIP and TXT) files which are having the same name but with different extension. PI should transfer if both the file exist else should not transer the file. I have planned to use BPM but both the files are only pass through so we cant create the DT and Abstract Interface.
    ZIP files are contains multiple files and client dont want us to analyse the both files.
    My company only allows us to use BPM and rarely java Modul so i am thinking to use BPM.
    need help to use the BPM for this requirement.
    Regards,
    manikandan

  • Passing multiple values for a single field in URL to call sap Transaction

    Hi All,
    I need to pass multiple values for a single field to SAP transaction .
    means if i have say a field "Date" which can contain more than one value, <b>but its not a range which has two fields</b> . How is it possible.
    Let me know pls.
    Regards,
    Sirisha.R.S.

    Hi Satyajit,
    I need to call a transaction with multiple values which gives me the report based on those values.
    So I need to pass multiple values for a single parameter.
    I hope u got it.
    Regards,
    Sirisha.R.S.

  • Deleting a single field from existing Layout - Update

    Hi,
    We need to amend our custom integrator's layout by removing a field from the layout.
    However, in Desktop Integration - "Define Layout" - we do not have any option to delete a field (options are - Move Up/down, Read only, width,Frozen pane)
    (Making width - 0 is not solving the purpose since only the field is not visible in layout but mappings remain as is)
    Is there any option to remove a single field from integrator layout?
    Thanks much in advance,
    Rgds,
    Sumanth

    Duplicate post - Deleting a single field from existing Layout - Update
    Srini

  • Deleting a single field from existing WebADI Layout (Update)

    Hi,
    We need to amend our custom WebADI integrator's layout by removing a field from the layout.
    However, in Desktop Integration - "Define Layout" - we do not have any option to delete a field (options are - Move Up/down, Read only, width,Frozen pane)
    (Making width - 0 is not solving the purpose since only the field is not visible in layout but mappings remain as is)
    Is there any option to remove a single field from integrator layout?
    Thanks much in advance,
    Rgds,
    Sumanth

    Duplicate post - Deleting a single field from existing Layout - Update
    Srini

  • Display values of a single field in a multiple rows in a table region

    Hi Tech-Gurus,
    I want to display values of a single field ( which is in a table region) in multiple rows and also need to restrict the values from decimal number. If i click save, then it will throw exception "Decimal not allowed".
    xxxxxx
    yyyyyy
    Reg.No
    1234
    5678
    7654
    I need to display the values of REG.NO in different rows like,
    1234
    5678
    7654
    and also need to validate as well against Decimal values.
    Please help me with the code how i will iterate ?

    Hi,
    I am assuming you are talking about displaying substrings from the Reg No in different rows. For this you would need to write a query which identifies the substrings and creates a separate row for each (ensure you choose values for all other columns in the table row). Kindly let me know if the understanding is incorrect.
    To validate against decimal value you can use the java code by checking the difference of the number and the number on which modulus has been applied. Hope that helps.
    Regards
    Sumit

  • How to update a single field in Word macro

    Hello,
    I am trying to create an AutoOpen() macro that will update the file name and path when user opens in a Word document, but I can't seem to find anything explaining how to update a single field, specifically the {FILENAME \p} field.  There
    are other fields in the document, so I do not want to update all the fields.  Most of the links I found only explain how to update ALL fields. Can somebody please tell me how I can update only the filename and path field using an autoopen macro?
    Thank you

    Stefan's response is correct.
    Here is a macro that should update only filename fields.
    Sub FileNameFieldUpdateAllStory()
    ' Written by Charles Kyle Kenyon 15 November 2001 - modified for filename 10 Sept 2014
    ' repaired by Jezebel
    ' All Story Field Updater - Filename fields
    Dim oField As Field
    Dim oStory As Range
    ' On Error Resume Next
    For Each oStory In ActiveDocument.StoryRanges
    ' This goes into headers and footers as well as the regular document
    Do
    For Each oField In oStory.Fields
    If oField.Type = wdFieldFileName Then
    oField.Update
    End If
    Next oField
    Set oStory = oStory.NextStoryRange
    Loop Until oStory Is Nothing
    Next oStory
    End Sub
    See Installing Macros for help in using this.
    Charles Kenyon Madison, WI

Maybe you are looking for

  • Digital AV Adapter not working after updating to ios6?  iPad 3.

    Hello, I own an iPad 3rd gen, and since I updated it to ios6 my Digital AV Adapter has stopped working (no image and no sound on TV). It worked just fine before I upgraded to ios6. Is this a known ios6 problem? I also found this message at apple boar

  • How would you upgrade this factory PC

    sufggest internal hD for HP p6813w?? http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02870583&lang=en&cc=us&taskI... Product number QN641AA Introduction date 2-Jun-2011 Country/region sold in: United States Canada Motherboard

  • Question about Audiobook file format

    Can Audiobooks be in .mp3 format or are they in other file format? I am using iTunes 6.01.4.2 I have the Bible on 6 CDs, in .mp3 format. I'd like to be able to add them to the iTunes Library as Audiobooks if this is possible or do I have to add them

  • Upgraded to CS3 - Script not woriking now

    Hello. Small ActionScript issue here. I've got a flash animation embeded in a html file. If at any point you want to skip the animation and proceed to the next page in the html course you can by clicking a button. This button contains the following A

  • Why does Flash install Google Toolbar?

    Why does Flash install Google Toolbar? Honestly, do you have ANY idea how annoying that behaviour is? I had no option at all to not download it, I could not stop downloading it. I was taking from a "you need to install flash" button on Facebook to th