Got a question? Ask in the forums

First of all, we wish to thank each one of you for your interest in riyaz.net. Over the last one year, there has been an overwhelming response to the blog articles on riyaz.net, especially from the SAP XI/PI community. Many users wrote in to let us know that they found the content very useful. A number of readers have subscribed to email newsletters, RSS Feeds and even via SMS in order to keep up with the latest updates on the website.

We would also like to thank the users who have published their articles on riyaz.net. The response from the readers has been excellent.

A number of users wrote in and suggested having an open discussion forum wherein users can work together to find solutions to technical queries. Above all, this would help create a collaborative environment where everyone can share their ideas, learn new stuff and ultimately grow together.

We are extremely pleased to announce the launch of discussion forums on riyaz.net! Please feel free to use the forums for any queries you may have. To begin with, we have created a few forum categories wherein you can post your topics. If your queries don’t fit in to any of the categories, you may suggest us new forum categories through the contact form or through the General category in the forum.

We hope that the readers are benefited from this new feature on riyaz.net! Your feedback helps us to serve you better. We would love to hear from you.

Thanks.

Regards,
Riyaz

This entry was posted in Blogging, SAP, Showcase, Technology. Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.
Around the Web »»

9 Comments

  1. Raghunath Kakarla
    Posted June 26, 2009 at 3:22 pm | Permalink

    Hi Riyaz,
    first of all thank you for your wonderful blogs and articles.
    We have an interface being developed on PI 7.1.The Scenario is JMS to File.
    Our Requirement is:
    One or more messages will be picked from MQ by PI and sent to a file directory using file adapter.The actual requirement here is, each message in MQ corresponds to a single file in the target directory,with the same file name(File name will not contain timestamp,Ex:SalesOrder.xml).Actually the third party tool picks the file from the target dir(That is,the file will be removed from the target directory once the Third party tool is successfull in picking up the file).
    Till the earlier file is removed from the target dir the file adapter should not replace the already existing one with the next message.If the file adapter is unsuccessfull in placing the file in the target directory,then,an email should be sent.

    For Example: If There are two messages in MQ,then two files will be generated in PI and then PI should place them in target dir with the same file name (File name will not contain timestamp,Ex:SalesOrder.xml)one by one.

    Please give us your valuable suggestions or inputs for this requirement.

  2. Posted June 26, 2009 at 5:39 pm | Permalink

    Hi,

    You may want to try out something like below:

    Change the File Construction Mode in File Adapter to Append. So if a new file arrives before existing file is picked up, the content of the new file gets appended at the end of existing file.

    Or you may want to explore on how the adapter behaves with Write Mode parameter. Instead of writing directly, you can use a Temporary File with a appropriate file name scheme and see if it helps in any way. I havent tried this however.

    File adapter does not support any acknowledgements. So you may want to add an alert category in Alert Configuration to trigger alert emails to appropriate recipients.

    Other option would be set the File Construction mode to Create with Overwrite Existing File checkbox unchecked. You can trigger alerts via alert configuration for any errors in file processing.

  3. Raghunath Kakarla
    Posted June 26, 2009 at 7:06 pm | Permalink

    Hi Riyaz,
    Thank you for your inputs.
    1)The file content should not be appended.It should be sent in an order 1 after the other.
    2)I havent tried the option of adapter with Write Mode parameter.I will try it.

    3)The other options which you highlighted above, we explored but does not suit our requirement.

    I thought of the following solution:
    Actually I thought of writing to a temporary directory with timestamp appended to a filename and from there copy to a original directory using shell scripts.What do you say? or
    Is it possible to handle this using BPM?

  4. Posted June 27, 2009 at 12:19 am | Permalink

    Do try it. Let me know if it is useful. Dont have an idea how command line params or shell scripts work with file adapter. I havent tried it either.

    Using BPM, you may want to try something like this. I dont know how feasible this is, but just an idea you may want to build upon further.

    Before placing the file to the target directory, poll the directory using a sender file adapter and use ASMAs to read the filename using DynamicConfigurationBean in the message mapping. If you receive appropriate filename, it means the file exists. If so, continue to poll the directory using sender file adapter. When you dont receive a filename, it means its safe to place the new MQ file in the target directory.

    Other approach could be use a separate file receiver adapter to write a new file say “flag.txt”. Whenever, you place MQ file in the directory, update the flag.txt with a “true” value. Whenver, the MQ file is picked up by third party tool, some mechanism can either set the flag to false or delete the flag.txt file. Possibly the third party tool can delete all the content of the directory whenever it picks up the MQ file. You can check the flag.txt from BPM to check if its safe to place the MQ file.

    Just few thought for you to ponder. Let me know how it goes. Good luck.

  5. Raghunath Kakarla
    Posted June 29, 2009 at 3:08 pm | Permalink

    Riyaz,
    Your idea of using BPM is fine.But i have a query for the same.

    You said to create a Sender file adapter and poll the target directory.But our flow is JMS to File,where the file adapter will be at the receiving side.

    If you say,i need to create an another extra sender adapter(apart from the actual flow adapter’s),then please let me know how can i link up this extra sender adapter with the actual flow to get the filename via ASMAs.

  6. Posted June 29, 2009 at 5:35 pm | Permalink

    You can create a separate file sender adapter to poll the directory. You will have to use a BPM to set this up. You can use a loop step within which you can put a receive step to poll the file directory using a sender file adapter. You can then use transformation and flow control steps to check the filename using ASMAs.

  7. Posted September 22, 2009 at 12:46 pm | Permalink

    Hi ,
    I do have scenerio where we need to parse one xml file according to the provided XSD and loop in BPM , and for each loop the data will be send to an application through Web Service and get the response back.
    Is this possible in BPM of SAP PI 7.1 or there is other work around..

    Please Help ..

  8. Posted September 22, 2009 at 8:00 pm | Permalink

    Yes..its very much possible to parse XML and process it in a loop via BPM.

  9. Posted September 22, 2009 at 8:08 pm | Permalink

    Please make use of forums section for any SAP-related questions.

GetSocial