cancel
Showing results for 
Search instead for 
Did you mean: 

Force an application acknowledgment for an FTP adapter

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Answers (7)

Answers (7)

Former Member
0 Kudos

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

henrique_pinto
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks!

Matt

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

its pretty tough

You may need to check with BPM as you need to use message ID in XI. Another way to take message ID is from SXMSMAST table in XI.

Best of luck Matt.......................

Thanks

Gaurav

Former Member
0 Kudos

Hi Matt,

in fact, I've implemented generic application acknowledgement across system and interface which is kind of similiar to yours, but ours is time-independent.

For your case, I would put all the ack related stuff in the PI box, e.g, creating the z-table in PI, define a RFC to lookup the z-table.

1) When an ACK comes in, in UDF call the RFC look-up to see if it's within one hour and if it contains error ACK, if yes, route the ACK back to your system to notify the error (by using inbound/server proxy).

2) If it's after one hour, create mapping error which triggers alert that sends out email (if required)

3) Create a job in PI to check the z-table to see if any message has not been acked for one hour, if yes, trigger alert.

if this is all you are required, I guess performance should not be an issue. I would avoid BPM as much as possible for sake of performance.

Jayson

Former Member
0 Kudos

I think better:

1) if ack contains error or it's more than one hour later, route the ACK to your system to notify the case.

2) Batch job in PI to scan the z-table, if message not acked withone one hour, post a ack file in your PI box. Define another scenario polling this ack file and sent to your system reusing the proxy of hte step 1.

Former Member
0 Kudos

Hey Jayson

Matt's requirement is really complex to built.............. i use to avoid developing such complex cases as its really difficult to manage the production system later on........... and then we have to face issues a lot.

I feel SAP should look for such requirements and need to work on these,......... more robust systems like Web sphere and TIBCO handle in better way i found.

Whats the opinion.

Thanks

Gaurav

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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