on 10-11-2007 10:01 AM
Hi,
I actually use B2B scenario based on RosettaNet/RNIF with SAP PI 7.0 SP12.
I need to use the attachment capability, but, according to discussion with SAP support there is no current documentation about how to perform this action.
Has anybody already do this setup ?
Is it like attachment with mail adapter ? Do I develop a custom adapter module to use this standard capability ?
Best Regards,
Laurent
The attachments in RNIF are mapped to an XI message attachment.
You can create this attachment in an adapter module or you can send or receive the attachment with an ABAP proxy.
What is the senders or receivers of the message in your scenario?
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No Stefan,
data are send by that way :
ECC |----
> Webmethods
+Java Proxy |
Data source | RNIF with attachment
From documentations that I read I suppose that I have to create XI message with 2 payload, and use PayloadSwapBean for the first payload.
And set the second payload as main message payload.
I don't know if this is possible.
Another alternative is to use custom MessageTransformBean to all requierd things.
Regards,
Laurent
When you use Java Proxy as sender, then create the main payload as always and add the attachment with help of the messageSpecifier class:
http://help.sap.com/saphelp_nw04/helpdata/en/9a/945e3026760745a751a85499139c7c/frameset.htm
Regards
Stefan
Laurent - Were you successful?
We seem to have the same scenario. We need to send PO's and attachments to the B2B Hub. As we understand, it is the extraction from SAP (i.e. no problem from XI to the B2B Hub) that is the problem.
The PO will be sent using IDOC ORDERS5 but we have been advised that it would be a complex bespoke development (i.e. there is no standard solution) to send the attachments along with the PO.
Thanks in advance!
I currently use custom Java Module to manage the attachement.
These module provide theses features :
- XML SAX parsing of the RosettaNet PIP3A4 message for extracting identifier
- Read file
- Base64 encoding
- Attach the file to the PIP3A4 message as attachment.
I couldn't find faster solution (standard ?) to do that.
Regards,
Laurent
Hi Laurent,
Can you share the Java Module Code to manage the attachment? I currently have a solution need for an XML with attachment to be sent to TIBCO via an RNIF Adapter. The data will come from an IDOC extension and I need to send in one message ID both the XML and the attachment. Thanks.
Regards,
Madz
In that case since R/3 is sending both the main payload and attachment together, create a UDF - Single Values , "Value" as String input Argument and use the code below.
AbstractTrace trace = container.getTrace();
if (!Value.equals("")) {
try{
GlobalContainer globalContainer = container.getGlobalContainer();
OutputAttachments outputAttachments = globalContainer.getOutputAttachments();
Attachment attachments = outputAttachments.create("", "application/pdf",Value.getBytes());
outputAttachments.setAttachment(attachments);
} catch(Exception e) {
trace.addWarning("Attachment failed: " + e);
}
}
return "";
This udf will take the input String and create it as attachment, use it while doing message mapping of the main payload. My PI version is 7.1 EHP1 and it worked during testing. Let me know if this solved your issue.
Thanks
Asif
Hi Asif,
Thanks for the help below. I will also try to propose this as part of the low-level design. I'm just thinking that the overall architecture makes it complicated. SAP will send IDOC with the fields to be converted to both XML and MIME attachment in PI. And these data should be both sent by PI to TIBCO. During the message mapping, will PI be able to convert this to the desired format?
The desired format is like the one below:
mime-version:1.0
content-id:"6acecec45db14b70bfad32298bc4134c"
x-rn-version:RosettaNet/V02.00
x-rn-response-type:async
content-type:multipart/related; type="multipart/related"; boundary="c95198da0eb5408ba23f0caee018a88b"
host: ...
content-length:35518
expect:100-continue
connection:Keep-Alive
--c95198da0eb5408ba23f0caee018a88b
-
=_Part_1418_1240817770.1288816246590
Content-Type: multipart/related;
boundary="----=_Part_1417_171409072.1288816246574";
type="application/xml"
-
=_Part_1417_171409072.1288816246574
Content-Type: application/xml
Content-Transfer-Encoding: binary
Content-Location: RN-Preamble
Content-ID: RN-Preamble.3d1534e0e78911dfbeda001b78be27c2
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Preamble SYSTEM "Preamble_MS_V02_00.dtd"><Preamble><standardName><GlobalAdministeringAuthorityCode>RosettaNet</GlobalAdministeringAuthorityCode></standardName><standardVersion><VersionIdentifier>V02.00</VersionIdentifier></standardVersion></Preamble>
-
=_Part_1417_171409072.1288816246574
Content-Type: application/xml
Content-Transfer-Encoding: binary
Content-Location: RN-Delivery-Header
Content-ID: RN-Delivery-Header.3d1534e1e78911df8070001b78be27c2
<XMLTag>insert XML here</XMLTag>
Thanks.
Regards,
Madz
PI will only do xml automatically. The main payload is in xml format and the RNIF adapter will take care of it. You can send any MIME type as an attachment as long as its acceptable to TIBCO and RNIF adapter. You will have to convert XML or text to other MIME types before attaching it. The above code accepts a string input and attach's it to the main payload. If you want to convert to pdf you have to do it in other udf then use the above udf to create attachment.You need to change "application/pdf" to your required MIME type in the above code.
In my scenario I was getting the IDOC as the main payload and a binary string in another proxy and BPM multi-mapping was used to put both of them together.
Below is the scenario
IDOC -> BPM -
main payload PIDX Invoice
PROXY- BPM -
attachment in base64 binary string
BPM -> (RNIF) Receiver
If you create attachment then
You should get another RNIF after
Content-ID: RN-Delivery-Header.3d1534e1e78911df8070001b78be27c2
<XMLTag>insert XML here</XMLTag>
for attachment:
Content-Type: application/(Your MIME)
Content-Transfer-Encoding: binary
Content-ID: Attachment.xxxxxxxATsap.com
Thanks
Asif
Thanks, Asif for the help. Currently we are exploring the ABAP proxy solution with the customized module to send the attachment as well from SAP to PI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madina,
I am facing the same issue ,I am also trying to get some ABAP Proxy solution.My senario is
Mainpayload willbe Invoic IDOC and attachements are also in SAP.
Is there any way i can send both main payload and attachments is XML message to XI?
Please help me if you have any answers for this type of senario.
Thanks,
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.