Skip to Content
avatar image
Former Member

Dynamic Directory in a File to File pass through scenario

Hi experts.

I have an scenario where I have to move a pdf file from one ftp to another so I wouldnt need repository objects because this can be get it with just a ICO object. The thing is that the target directory must be set dinamically from file name.

¿Can this be got it?

Thanks a lot.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Best Answer
    May 14, 2013 at 05:36 PM

    Hi christian,

    Message mapping is mandatory to meet this requirement.

    or

    We can use multiple receivers as said by Ambrish. but the interface will get complicated and the performance goes down if the no of records to be process are more.

    or

    enhanced receiver determination

    http://saptechnical.com/Tutorials/XI/RecvDetermination/Enhancement.htm

    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=272171407

    i think we can also use context objects or XPATH to achieve this.

    so better to create ESR components is the best way to achieve your requirement and make your interface simple.

    refer below links

    http://scn.sap.com/thread/1869531

    http://wiki.sdn.sap.com/wiki/display/XI/CODE+-+Create+a+PDF+File+via+the+iText+Library

    http://scn.sap.com/community/pi-and-soa-middleware/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Bhargava,

      <the interface will get complicated and the performance goes down if the no of records to be process are more.>

      I already mentioned that it is not a clean solution; just a clumsy design, not complicated at all. I am wondering how will number of records impact performance.

      Ambrish

  • May 14, 2013 at 12:15 PM

    Hi,

    The thing is that the target directory must be set dinamically from file name.

    Usually be done by setting the corresponding "adapter specific message attributes" in mapping time. But mapping requires Repository objects.

    /Udo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 14, 2013 at 12:16 PM

    Hi Christian,

    Please go through the below discussion -

    http://scn.sap.com/thread/1875952

    Thanks,

    Kalyan

    Add comment
    10|10000 characters needed characters exceeded

  • May 14, 2013 at 02:03 PM

    Hi Christian,

    If you want to use Dynamic Directory which would be decided run time, you need to have mapping.

    Find the below document:

    http://155.56.92.22/wiki/pages/viewpage.action?pageId=272171407

    Add comment
    10|10000 characters needed characters exceeded

  • May 14, 2013 at 03:31 PM

    Hi Christian,

    If you do not want to use message mapping at all, then there is a 'dirty' solution.

    You can have multiple receivers based on different possible directories. Use context object for File name to determine the receiver (condition in receiver determination) and then use a different adapters to write the file to different directories.

    Hope it helps!

    Ambrish

    NB: For this solution, you must know at design time what file name will correspond to which directory for input to the respective adapter.

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2013 at 02:07 AM

    Hi All,

    can't we achieve this using java mapping?

    just creating dummy data and message types and in the java mapping just copy input payload to output payload. then use the dynamic configuration in java mapping code.

    after that we can use the condition in receiver determination.

    Regards,

    Muniyappan.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 24, 2013 at 07:30 AM

    Thanks everybody for your helpul opionions.

    Finally the pdf that must be sent is an adobe form implemented in the backend so we decided to implement this scenario as Proxy to File with the pdf attached in the proxy. With the payload data we can determine with ASMA the final directory and in file channel we just need to use the swap module.

    Thanks everybody!

    Best regards.

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2013 at 08:54 AM

    Hi Chico,

    If you have AttribMapper Adapter Module (It will come up with AS2 Seeburger Adapter), then it is very very simple.

    Please let me know whether you have installed AS2 on your PI Machine?

    Regards,

    Sreeni.

    Add comment
    10|10000 characters needed characters exceeded