cancel
Showing results for 
Search instead for 
Did you mean: 

If message failed at communication channel, then need to send idoc to R/3

Former Member
0 Kudos

Hi folks,

i got a requirment like .....If message failed at communication channel, then need to send idoc to R/3.

can anybody suggest the possible solution.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks

Former Member
0 Kudos

HI

If you use a catching a MAIL - PI ALERT and based on that alert if u creating an IDOC then it is good if u really supress the alert immediately once the ALERT comes but if u really check and supress the ALERT fine Otherwise a CONTINOUS IDOCs will get created at SAP system.

Also there might be some natural generic reasons for communication channel fails

a) somtimes if the target FTP is down

b) if there is some issue with FILE ENOUGH

c) If File adpater is placing same file already exists or with already Opened by some target application

d) Dynamica file naming issue. (technical issue)

WHy cant u do scenario in the below steps without keeping BPM, CATCHING ALERTS which doesnt give exact QUARANTEE

Do one thing make a technical design in such a way into 1 flow or 2 flows in worst case

In INTERFACE MAPPING-->

a) Insert your current Normal Graphical mapping

b) Javamapping:- This code will take the first mapping output as Input through Stream Transformation and create a same FILE through JAVA FTP Comments at specified Cleint Location. I recommend in order to avoid direct interraction of writing a file at client FTP better always write at your Local PI NFS Application outbound directory which doesnt require host name and user and pwd. Even if it requires you can do a RFC lookup and maintain a host, Port, User ID, pwd, Directory, FIle naming pattern in that table or else simply DO VALUE MAPPIING and pass it through XML INPUT from FIrst mapping as additional fields

c) WITH IN THE SAME JAVAMAPPING: -

If it successfully writes a file - wRite a TRACE log ("FILE NAME+ Sucecssfully written+ File Bytes")

Then create an simple small XML OUTPUT and PASS that JAVA MAPPING OUTPUT To 3rd Grahical Mapping as Input it might be less than 5KB.

Note: - Remember that this output XML should be ina Multmapping SPLIT MERGET FORMAT with 1 FIELD or required INFO

as KEY FIELD INFO using DOM FACTORY

d) GRAPHICAL MAPPING: -

SOURCE IS JAVAMAPPING OUTPUT and TARGET HAS 2 messages

Message 1) SAME INPUT SMALL XML OUTPUT COMING FROM JAVA MAPPING OUTPUT

Message 2) IDOC TY{E STRUCTURE

Keep a Condition based on KEY VALUE Coming from source field execute either 1 Message1 or Message 2

In this way you can complete in a single Flow.

Later you can deifnee a simple flow to PICK and DROP from SOURCE file Writing through javamapping to client location Or else

WRITE A small OS SCRIPT and CALL in Receiver FILE COMMUNICATION at OS Command so that while writing a LOG file it will move the file from Source FTP to CLient FTP location.

Regards

Amar Srinivas Eli

anupam_ghosh2
Active Contributor
0 Kudos

Hi ,

do you know the reasons for which a message might fail at communication channel ? What I mean to say is that we generally do not assume that messages might fail at channels when we design a scenario. If you have some ideas on the possible reasons which depend on incomming data then This might be utilized in mapping to trigger idocs.

Could you please kindly elaborate the scenario a little bit more, so that the forum members can suggest some solutions to your problem.

Shiladitya has already provided a solution.

I saw this later. Please ignore this post of mine.

regards

Anupam

Edited by: anupamsap on Jun 13, 2011 11:49 AM

Former Member
0 Kudos

Hi,

You can go for a BPM in this case. In the send step, use transport acknowledgement. In case the acknowledgement is negative, send the Idoc to ECC.

Regards

Former Member
0 Kudos

Hi Shiladhitya,

Thanks for your prompt answer, but here my received wont send any ack back to BPM so, transport ack option will work for this..? because any way if ack wont come then by default it will fail, if we use transport ack .

Shabarish_Nair
Active Contributor
0 Kudos

is the communication a synchronous one?

if so in the BPM in a sync Send step, capture the exception and in the exception branch create the IDoc and send it out.

Former Member
0 Kudos

Hi,

If the receiver can't send back acknowledgement to PI, then the transport acknowledgement will not work.

Maybe you can try out something like this :

Set up an alert config to monitor the comm channel and send email if the channel fails. You will need some mail server where you can send the mails for comm channel failure.

Then in PI, set up a mail to Idoc scenario. So PI monitors this particular mail Id and if it finds any mail there, it triggers an Idoc to ECC with the error.

Haven't tried it myself but if you do give it a try, let us know what happens.

Regards