Skip to Content
avatar image
Former Member

Force an application acknowledgment for an FTP adapter

Hello,

I am using XI 3.0 and I need to find a way to create an application acknowledgment from an FTP adapter.

Here is what I need to happen:

When a PO is created in R/3 we need to send a transportation order request (TOR) to a trucking companying offsite. They will receive an XML file via FTP. Then they will process the TOR in their system and create an application acknowledgment to inform us of a success or failure. The acknowledgment will be in their "out" folder and our XI system will pull from the "out" folder every 10 minutes. When we receive the acknowledgment we need to send an alert if the acknowledgment informs us of an error or if the acknowledgment tied to a TOR does not arrive within an hour.

Right now I have:

R/3 to XI as a proxy

XI to FTP folder as a FTP adapter

The problem I'm having is trying to come up with the best way to receive an acknowledgment.

Any ideas?

Thanks,

Matt

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 23, 2008 at 08:06 PM

    Ok, so # 3 does not work for me in this case 😊

    So, what if I send the TOR XML to the FTP inbox and then also send it back to R/3 as an inbound proxy? Then I can update a Z table in R/3 with the message id and when an ack is picked up from the FTP outbox I can bring it to R/3 as well and use it to determine the status of the TOR. I'd need to create a batch job that would scan the Z table every 30 minutes or so looking for any TORs that do not have an ack and have been open for 1 hour or longer.

    Would I need to use a BPM to split the message between two receivers (FTP Adapter and R/3)?

    It seems like a lot of work but that should work, right?

    Thanks,

    Matt

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Matt

      BPM is not required for message splitting. but do test this as proxy is on ABAP stack which doesn't support multi mapping. In that case you need BPM.

      So now what i understand is you are going to send message to XI and then back to R/3 as well from inbound proxy and inbound proxy is responsible for updating the Z table.

      I think doing this much you should be able to achieve this 😊 but i doubt on performance in this as well.

      Requirement itself is like this.

      What exactly is receiver system going to do to send ACK to you. Is ACK instantaneous or depends on processing times at receiver end.

      Thanks

      Gaurav

  • avatar image
    Former Member
    Dec 30, 2008 at 02:13 PM

    Jayson,

    I like the idea of using XI to capture the data but how can I send data from an XML message to a Z-table in XI?

    So a proxy is sent via R/3 to XI. XI maps the message id and creation date/time. Once the mapping is done the XML file is sent via FTP adapter to an offsite location. Then finally (and the part I need help with) a Z-table in XI is updated with the message id and creation date/time.

    Then I should be able to handle the acknowledgment back as you suggest with an RFC lookup/UDF.

    Thanks,

    Matt

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Matt

      to update z-table, define RFC which update the z-table. in the message mapping, use UDF to map one field, the UDF calls RFC look-up to send msg-ID, creation time to the RFC to update the z-table.

      Jayson

  • avatar image
    Former Member
    Dec 23, 2008 at 07:31 PM

    Hi Matt

    FILE adapter doesnt support sync cases so you are left out with using another channel to poll to the out folder for the ACK. Now you can read this using a mapping and can send email using Mail adapter based on condition (if true or not).

    Other than this BPM is one of the option to achieve this but it's not required when you are implementing ACK seperately.

    Thanks

    Gauarv

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 23, 2008 at 07:41 PM

    Thanks Gaurav Bhargava.

    The problem is that I need to tie the original message to the ack. I have placed the message id within both documents but what I really need is a table in XI that stores outgoing message ids so I can compare the message id within the ack to all the message id for the original XML files.

    I can look at the "open" TORs and match up the message ids and possibly update that table with a "closed" status.

    Can I create a Z table in XI to store the message id and the status?

    Thanks,

    Matt

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Matt

      Now looking at your requirement to create a Z table in XI.

      You can create a Z table. but challenge i see in implementing this is your soruce send message and wait for a response and file need to be picked in the timeout configured. Else the message itself will fail.

      Here three possibilities

      1. Using ABAP mapping you load the message ID in table. But holding source message for response is a challenge as well as Sync and Async bridginig is another

      2. Doing an ABAP mapping and request response bean with file adapter but you need to raise alert when it fails and need to generate response in either case.

      3. use of BPM. - creating a Sync - Async bridge for this and mapping/RFC to capture message ID and collect response.

      Use of BPM is a proffered choice in my understanding.

      Thanks

      Gaurav

      Edited by: Gaurav Bhargava on Dec 24, 2008 1:18 AM

  • avatar image
    Former Member
    Dec 23, 2008 at 07:56 PM

    Thanks.

    Option # 3 certainly looks the best.

    But...If I create a sync bridge does that mean I would only be able to send one TOR at a time. It would stay "open" until the ack came back before sending the next TOR? I have to send hundreds of messages an hour so this process would be too slow.

    Am I understanding it correctly?

    Thanks,

    Matt

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Matt

      You understanding is right. Performance will be hit here but the requirement is like that. To fulfill this it has to be like this.

      You need to take care of time out, System failure, response + Alert when the ACK is not there. receiver system response is not in scope of your development.

      I think we are not left with choice here 😊

      Thanks

      Gaurav

  • avatar image
    Former Member
    Dec 23, 2008 at 08:24 PM

    The receiver will take the XML file and run it through their system. Once it has been processed they will place an ack XML in the outbox. The ack XML file will contain: original message id, status, creation date/time and any notes. Once the ack message is back in R/3 I can update the record that matches the message id with the status (Pass or Fail).

    The batch job would need to scan the Z table for "Fail" messages as well as messages that have had a long time with no ack response.

    Will that work?

    This seems like a large amount of work and it also seems that someone must have run into this in the past. I am told I MUST allow an application acknowledgment and I MUST use the FTP adapter.

    Thanks,

    Matt

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Gaurav,

      yeah, it's not a trivial requirement. For this case, what's lacking is:

      1) File correlation --> how to correlate received file with sent file. As there is no standard way link two files, I guess, thus SAP has no way to implement this kind of file correlation.

      2) It would be nice if PI can create instance of CC. In this case, once file is sent out from PI, PI can instantiated the CC, and let it polling the ACK file every 10 minutes, after 6 time polling, trigger event.

      Jayson

  • avatar image
    Former Member
    Jan 05, 2009 at 06:47 PM

    Thanks!

    Matt

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 23, 2009 at 03:55 PM

    Hi guys, I'm finally getting the opportunity to start on this acknowledgement.

    I am having a hard time finding information on how to create this UDF. I have created a FM that will create a record in my ZTOR table in XI. Now, I just need to know how to call that FM within a UDF.

    Any ideas or good links?

    Thanks,

    Matt

    Add comment
    10|10000 characters needed characters exceeded

    • This is another alternative for sync/async bridges without BPM: /people/henrique.pinto/blog/2007/08/02/syncasync-scenarios-without-bpm

      Other than that, you can always develop your own custom adapter that'd be basically standard FTP adapter + check ack message.

      Regards,

      Henrique.