Generating HTML Files via RECEIVER File Adapter

Hi All,
I have the Following Scenario: 
R/3 ( ABAP Proxy ) -
>XI------>HTML Files ( File Adapter ).  
Basically I would like to generate, HTML files out the RECEIVER File Adapter.   How can this be achieved?
I  have invested some time in thinking about a adapter module, which can do this? Any Blogs would be Helpful here.
Is there any alternative way? 
Any Blogs or help Links would be appreciable.
Thanks in advance,
Best Regards,
Abhishek Vinayaka

Hi
Look these thread for Create HTML file format
if the reciever adapter is file i want in messages to be  in HTML format
Re: idoc-xi-file scenario.  how to display file in html format

Similar Messages

  • Having Some unknown characters in my file of Receiver Mail Adapter

    Hi All,
            I have a unique problem, I am having special characters(  #S@u201D E" E$ u201Däu201Där 4TåE$R   D0u201CC3 u0192    c@u201DÔôETÄPu201Du201Eu20220u201D 3@u201C  ó ró#  u20ACu201C  ó# ó#  u2019 ) in text file of Receiver Mail Adapter.I am providing you a part my input text file
    1747021     000070     0001     Production Baseline     ZTAN          100A     0039     2204229-1     50     PLANT3002     Honeywell Aerospace Bournemouth - R     3212774     NOZZLE     HIS     M22     12/31/2008     01/05/2009              1.000              1.000            1.000     01/05/2009     
    1745558     000100     0001     Production Baseline     ZTAN          100A     0039     801137-1     80     304030     LUFTHANSA TECHNIK AG     45111378001     WHEEL     HIS     M22     12/30/2008     01/12/2009              3.000              3.000            3.000     01/12/2009     COOP Legacy Notes - Note Type: 07N UPDATE AS OF 11/8 SH AVS Legacy Notes - Note Type: AB 1. A QTY OF 53 NEW PARTS WERE PURGED ON 3-5-99 PER KAREN MOSS' REQUEST. PARTS ARE SUSPECT OF BEING DAMAGED DUE TO BEING STORED IN ASRS IN A METAL TO METAL SITUATION.
    1740335     000100     0002     Production Baseline     ZTAN          100A     0039     3176647-4     80     341734     SAUDI ARABIAN AIRLINES CORP     8233950     VALVE, CONTROL     Jaroslav Kral     M18     12/24/2008     12/31/2008              1.000              1.000            1.000     01/23/2009     COOP Legacy Notes - Note Type: 07N D PARTS NEED TO CHEC WITH LUPE WIN ISSUIN COOP Legacy Notes - Note Type: POG REPLCS 3176647-3 AS A MANDATORY CHANGE. 3399100-11    V17138 (TAKES -4 TO -11) 3399100-11    V17139 (TAKES -9 TO -11) 3399100-10    V17140 (TAK
    1734808     000100     0002     Production Baseline     ZTAN          100A     0039     3883240-6     80     300168     IBERIA LAE     48017888601     CONTROL FUEL     HIS     M13     12/20/2008     01/10/2009              1.000
                  1.000            1.000     04/29/2009     AVS Legacy No
    Can any one help me out?

    Hi Stefan,
    I am Using Transport Protocol as IMAP4
                     Message Protocol as XIPayload
    Connection Parameters to Mail Server
    URL  -
    .mycompany.com
    Mail Attributes
    Use Mail Package
    content Encoding   base64
    Keep attachments
    I have Used the following Modules
    Processing Sequence
    Module Name                                                                Module Type                             Module Key
    localejbs/AF_Modules/PayloadSwapBean                        Local Enterprise Bean                Payload
    localejbs/AF_Modules/MessageTransformBean                Local Enterprise Bean                Transform
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean                mail
    Module Configuration
    Module                              Parametername                           Parameter Value
    Payload                             swap.KeyName                           content-type
    Payload                             swap.KeyValue                            text/xml
    Transform                          Transform.ContentDescription       MyReport.txt
    Transform                           Transform.ContentDisposition       attachment
    Transform                           Transform.Contenttype                 text/xml

  • Trying to access the java script files via jar file in WEB SERVER

    hi all,
    I am trying to access the java script files via jar file ,which is present in Apache webserver in order to minimise the number of hits to app server.some thing like cache ...
    in jsp the code goes like this...
         <script type="text/javascript"  archive="http://localhost:14000/dojo.jar!" src="dojo.jar/parser.js" " ></script>{code}
    But i am not able to access the js file which is put in jar file present in the  webserver.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    You can use DWR (Direct Web remoting) for that. It is easy AJAX for java. ou can directly call the java script function from java class and also java class from javaScripts..
    Regards,
    Hardik

  • Send attachment via Receiver FILE/JMS adapter without using any Mapping.

    Hi,
    R/3 program creates one (encoded) text file, which I want to send via Proxy to JMS adapter without any mapping or FCC.
    Note: I don't want to use File adapter to pick the file from R3 dir and then send it to JMS.
    Reference: I have gone through below mentioned blog which produces the attachment in the XI payload but I am not able to write the same attachment to my XI dir using Receiver File adapter (File adapter is just for testing actual adapter will be used as Receiver JMS adapter).
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    Regards,
    Sarvesh

    > note sure why you want to complicate things here
    Actually the idea was to explore the possibilities of "Proxy with attachment". And I also wanted to confirm with experts like you before going to other options. Anyway it seems it's only possible with mail adapter.
    Reason for exploring above possibility: Since ABAP team has to create one text file and encode it, so we thought to call the outbound proxy in the ABAP program to send the same file as an attachment and then simply send it to JMS. Which is quite obvious thinking when you don't want to manage a share directory between R3 & XI or don't want to manage FTP user and pwd.
    > i think the simplest thing is to go for a simple file to jms configuration unless you have any specific reasons for not doing so.
    This we already kept in our mind as a last option in case if above thing is not possible then we can easily do it by this way.
    Thanks a lot for suggestion.
    Regards,
    Sarvesh

  • Excel file(.xls) as attachment and Body(Signature) via Receiver Mail Adapter

    Hi PI Experts,
    I have a requirement File(.txt) - PI(7.4) - mail (.xls attachment and signature in the body). Can anyone pls help me with the best approach to send excel file as mail attachment and signature in the body.
    Thanks,
    Sri

    Hi
    You can try this approach
    1. use mail package and java mapping to populate the mail package.
    inside the java mapping do the following
    a. read the text file and convert it to excel and then set it as additional attachment.
    b. map the signature and body with the field 'content' of mail package.
    2. on the receiver mail adapter check both mail package and keep attachment options.
    Hopefully this will work.
    Reference links
    excel write : Excel and Java - Read and Write Excel with Java - Tutorial
    set attachment: How to save MainDocument as additonal attachment in sender channel?

  • 0 byte txt file using receiver File Adapter

    HI,
    My scenario is Flat File to Fixed Length File.
    Mapping : Based on the condition Reciever node need to generated , In some cases it wont generate any node ( No data )
    Receiver Communication channel :  I used FCC for Fixed length Format.
    Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
    Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:Message1' found in document', probably configuration error in file adapter (XML parser error)'
    I need the receiver file to generate with 0 bytes when there is empty data.
    can any one help on this.
    Thanks

    Hi,
    >>Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
    What happens in this case is, when you send a blank file to PI it processes but once it went to Receiver Adapter, it looks out for some fields because of the FCC settings. So it throws an error/exception because some fields are expected and it is not coming. Because of that you getting below exception.
    Secondly, Once you send data with few values or fields it will process in Receiver file adapter FCC and if there is some error it throws error. this is why you getting exception in moni, and other places.
    Regards
    Aashish Sinha

  • How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack

    Dear Friends,
    I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
    So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
    DynamicConfiguration conf = arg0.getDynamicConfiguration();
    StringBuffer sbFileData = new StringBuffer();
    for (int i =0; i < record.size(); i++ {
         . // Create XML for each row and Marshal the object into to the String Buffer
         String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
         conf.put(KEY_FILENAME, strFileName);
         arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
         arg1.getOutputPayload().getOutputStream().flush();
    So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
    Please let me know if I missing something or need to do some thing else.
    Regards,
    Shreyansh Shah

    Hi
    You can easily achieve this using graphical mapping.  Create your target message type like below
    MT_Target
      Details  0 to 1
          Data  0 to 1
    Source sample structure
    <resultset>
    <row>
    <column-name>column-value</ column-name>
    </row>
    Then do the message mapping like below
    map <row> with  MT_Target
    contant ----> Deatils
    column-name ------>Data
    In the signature tab of message mapping, choose the occurrence of your target message type as
    0 to unbounded.
    This will generate multiple files from multiple rows.
    Let me know if you have any doubt.

  • Archive processed files at receiver file adapter

    Hi Experts,
    I need to archive(copy) processed messages from the target folder to another folder.
    I tried using the Run OS Command after processing and not sure with the exact command.
    Can anyone please provide the exact command (syntax) for copying file from the target file folder to another folder.
    Do we need any authorization from BASIS team to perform this command in run OS Commandline please.
    Note: the original file should not be deleted.
    Thanks in advance!
    Regards,
    Mahakrishnan T.

    hi Mahakrishnan Thangam,
                    I used the OS command feature  where FTP is not used and it worked in the way I already posted. When it comes to FTP in receiver file adapter you need a batch file and a script both on PI server. The script will function as follows
    1. Login to FTP server.
    2. change to target folder you specified in target directory in cc.
      command: cd foldername
    3.Read the file created by receiver file adapter in remote FTP location. File will be copied to local directory of PI server.
        command:  get filename
    4. Now again change remote directory to archive directory.
    5. Copy the file back to FTP server again from local directory to archive directory you want to copy to.
    Now from batch file call this script.
    Would suggest to read these links carefully
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
    http://www.cs.colostate.edu/helpdocs/ftp.html
    Alter algorithms to meet your requirement.
    Hope this solves your problem.
    Regards
    Anupam

  • File conversion and append file in receiver file adapter

    Hi
    I have a batch IDoc -> XI(3.0) -> file scenario with file conversion to create a flat CSV-like file. The problem is that because of the amount of data sent from R/3 (~20000 employees), the idoc is split into several idocs. In my receiver file adapter I want to append all the idocs contained in this data transfer to one flat file, before transmitting to FTP server.
    For the next batch transfer (the next day) XI should start all over and create a new file and append all idocs contained in that transfer before transmitting the flat file to FTP server.
    Can this be done using the 'Use Temporary File' and 'Append' options in the FTP connection Parameters in the comm-channel?
    It is not an option to append the file in the FTP-server, because the files in the destination folder are moved immediately after arrival, so the file will be moved before file adapter can append all the files.
    Does anyone have any suggestions to how to solve this?
    Br
    Kenneth

    Hi Kenneth
    Did you ever get a solution to this problem?
    Regards
    Russel Irvine
    [email protected]

  • When to use "Use Temporary File" in receiver FTP adapter

    Hi Experts,
    I have nerver used "Use Temprary File" as the "Write Mode" in receiver ftp adapter.
    I want to knwo under what kind of requirment we should use this option?
    Thanks in advance.
    Best Regards,

    Hi Aditya
    Usually it's advisable to use "use temporary file" as write mode when you want to avoid your file to be picked up by receiver while PI channel is still writing it.
    Obviously larger the file, more chances you have that this issue could occur.
    If you select the "use temporary file", XI will write the content to a temporary file with another name of your choice and only once writing has finished it will rename it to the actual name setup in the "file name scheme".
    Regards,
    Giuseppe

  • Problem in Overwriting the file in Receiver File adapter

    Hi  all,
    I configured my scenario Proxy to File. Every day the back ground job runs in SAP and send all Employee Details to XI, XI then write it into File in XI server, in Receiver File adapter i enable overwrite existing file.
    But some times its over writing the file some times came up with error like "Access Denied".
    Can any one tell me what could be the problem.
    Kind Regards,
    Kiran

    > But some times its over writing the file some times
    > came up with error like "Access Denied".
    This can be a Authorization problem...may be at that time you are unable to write any file in that directory..or some other application is using it and it make a lock at that time.
    Thanks
    Farooq.

  • Dynamically generate terget directory in receiver FTP adapter

    Hi guys,
    I'm trying to set up a scenario where the file will be placed into a terget directiry based on values from the incoming message. I can't use variable substitution as my target message does not contain the needed value, so I'm trying to set up a dynamic configuration in an UDF. Unfortunately, this is not working.. Any ideas, what could be wrong? The receiver FTP adapter always just takes values from it's configuration. It doesn't help when I try to change it in mapping.
    This is the java map code in the UDF:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, a);
    conf.put(key2, "tfilename.txt");
    return "";
    Thanks a lot for any help,
    Olian

    Hi,
    use below code it will work fine
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");
    String a=conf.get(key);
    String b=conf.get(key1);
    var1 = a+b; ;
    return var1;
    map this udf to root element of your receiver structure.
    Regards,
    Raj

  • Mutiple sender files and receiver files with different file names

    Hi All,
    Following is my scenario: File (FTP) --> XI --> File (NFS actually SAP system)
    I have 5 source files like ABC<b>1</b>_DateTimeStamp, ABC<b>2</b>_DateTimeStamp, ABC<b>3</b>_DateTimeStamp, ABC<b>3</b>_DateTimeStamp and ABC<b>3</b>_DateTimeStamp.
    I can use single sender file FTP adapter with file name ABC* which picks up all 5 files, but can I use single receiver adapter to create 5 different files with the following file names: ABC1, ABC2, ABC3, ABC3 and ABC3 ?? And last 2 files (ABC3 and ABC3....same name) should be created after 30min and 60min of first ABC3 file. We have to do this because we have jobs scedule on SAP side with variants having file names.
    Is it possible to achieve using single sender/receiver file adapter??
    If not any suggestions how to do this scenario?? 
    Thx
    Navin

    Navin,
    I doesn't know whether its feasible for you or not. Please see the below option
    Create 3 Sender  comm.channels and 1 Receiver comm.channel. In Sender /Receiver file adapter check the Adapter Specific Message attributes.
    I'm suggesting the soln using BPM.
    In IR, Create 3 Outbound Interface (Abstract) and create 1 Inbound Interface(Abstract).
    First 2 comm.channel and 2 Oubtound interface refers to file 1 & file2 respectively.
    The 3rd comm.channel and 3 Outbound interfaces refers to file3 & file4& file 5 .
    Please see the BPM design.
    http://www.flickr.com/photo_zoom.gne?id=698877499&size=o
    Note : Navin the above suggestion is my thought, I think it will work. U can juz give a try.
    Best regards,
    raj.

  • Generate HTML code via JSP

    hi!
    I want to 'run' a JSP and then retrieve the generated HTML code.all without any browser/tomcat...
    is there a way to run JSP's in the virtual machine..?
    greetz
    chris

    we have some templates (generated with dreamweaver), there we want to fill in the dynamic content by java (JSP tags...)
    but in the end we don't have to show the html code on in the browser, we need a fix HTML file which we can print (the dynamic content filled in..)!
    any ideas
    chris

  • 'Use Temporary File' in Receiver File channel

    hi all,
    I am facing a strange issue with receiver file channel which I am not sure if somene had already faced. I couldnt find any help from blogs..!
    I have configured the Receiver File channel with Write mode as  'Use Temporary File'  with a temporary file name(say tmp.xml)  scheme and Empty-Message Handling set to 'Write Empty File'
    When the scenario is executed, its so happening that the temporary file of 0 bytes(empty file) is being created as tmp<msgID>.xml before the actual file is being completely written. It is expected that once the Actual file is completely written, the tmp file should be deleted, but here is not the case.Thus causing both the files being present in the target location. This is not happening often though.
    As the receiving application is processing all files from the target direcotry, the file is getting errored out in the target application.
    I think the 'Write Empty File' has nothing to do with this as the option 'Write Empty File' is for empty payloads resulting from the message mapping.
    Please correct me if am wrong and also provide me the inputs on my issue. Am on PI7.0
    thanks in advance,

    Hi Tilak,
    this is real time interface
    real time by using a file... that's a non-sens according to me. You should use a non physical solution (web service, JMS, JDBC, etc...) but a not a file. well... Anyway, you can image that the receiver application schedule the folder every 30s or every 1min, that's almost a real time. Real time is mainly a conceptual view (only synchronous exchange needs really real time). Morevoer, if you really wanted a real time, you should not add a tool like PI (or other) between your source and your target system, the more we have systems, the less it's efficient (in term of delay and response time!).
    Even if we propose that the receiver application should have a condition to its script to avoid picking the tmp*.xml files, after a period of time there would be a chance that the *tmp files may increase in number..
    No ! coz if my theory is good, if your receiver application does not pick-up tmp.xml, that means this file is not currently treated and so PI is authorized to delete it. So no increase of tmp.xml files in this folder.
    Another solution: to create the target file without option "temporary", but to create it in another folder than this one scheduled by your receiver application, and use an OS command AFTER processing, in your receiver CC, which move the created file from the "temp" folder to the target folder.
    [http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature]
    regards.
    Mickael

Maybe you are looking for