Author |
Message
|
whydieanut |
Posted: Thu Sep 29, 2011 1:46 am Post subject: SAP ALE Passthrough Adapter for Outbound |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
Hi all,
I am contemplating using the ALE Outbound Adapter in Passthrough mode to send messages to SAP.
The other option is to use a single ALE Outbound Adapter with all needed IDoc types configured. But then I'd have to recreate/update the Adapter in case I have to add support for a new IDoc type.
Is there any advantage in selecting one approach over the other?
If choosing the Passthrough approach, what are best practices for the same?
I can think of the below 2 design:
1. Common flow with a single MQInput queue that receives messages of type SapGenericIDocObject, that blindly passes it to SAP.
2. Common flow with multiple queues that each receive messages of specific Idoc types, that converts these IDocs into SapGenericIDocObject and then passes them to SAP. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Sep 29, 2011 2:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
whydieanut |
Posted: Thu Sep 29, 2011 3:32 am Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
The opposite direction I've got figured out.
Its the Outbound to SAP that I am still pondering on. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 29, 2011 5:27 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
How much control do you have over the apps that will be producing messages that need to go into SAP?
Unless you can guarantee that they always write out messages in a fully identified format and always write them to the correct queue, you should use your Option 1. And then you should use it anyway, because it's still more resilient to future change. |
|
Back to top |
|
 |
whydieanut |
Posted: Fri Sep 30, 2011 3:45 am Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
By Option 1 you mean:
1. Common flow with a single MQInput queue that receives messages of type SapGenericIDocObject, that blindly passes it to SAP.
Right?
Now my problem is how to convert the input message, whatever format it is in, SapGenericIDocObject...
 |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Fri Sep 30, 2011 4:17 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
I'm not sure, but I think you should do the opposite steps than in inbound case.
1) Produce iDoc -specific data object
2) Serialize it to bitstream
3) Generate SapGenericIDocObject dataobject (set IDocType and assign iDoc -specific bitstream to IDocStreamData)
4) Pass this dataobject to adapter.
--
Marko |
|
Back to top |
|
 |
whydieanut |
Posted: Mon Oct 10, 2011 3:35 am Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
I have a flow with an MQInput node, that takes in data like below:
Code: |
<NS1:SapZfiBtF02 xmlns:NS1="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sapzfibtf02">
<SapZfiBtF02IDocBO>
<SapIDocControlRecord>
<ReceiverPort>SAPR33</ReceiverPort>
<PartnerTypeOfSender>LS</PartnerTypeOfSender>
<PartnerFunctionOfSender/>
|
How to convert this to the "SAP ALE IDoc" format?
I've tried:
SET OutputRoot.Properties.MessageFormat = 'SAP ALE IDoc';
SET OutputRoot.DataObject = InputRoot.DataObject;
But doesn't seem to be enough.
I am missing something very simple... |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 10, 2011 10:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried applying a non business object format like TDS?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
whydieanut |
Posted: Mon Oct 10, 2011 11:01 pm Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
I didn't quite get you.
Are you suggesting that the input message be in a different domain like TDS?
What I'll eventually need is to read in an XML file, convert it to a DataObject and the IDoc Control Record, map fields to target (IDoc Data Record fields) and then convert it into the IDoc format like below:
Code: |
EDI_DC40 1300000000000201089701 3012 DEBMAS07 DEBMAEXT DEBMAS SAPR11 LS R11CLNT130 RCVPORTWMBLS LS_AIWMB .... |
(PS: This is from a different IDoc type)
This can then be converted into the SAPGenericIDocObject.
But for the time being, I am using a message which is already in the DataObject Domain wth all the SAP IDoc fields.
Just trying to get a bit stream like above from this input XML. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 10, 2011 11:12 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You have 2 different formats
- The Data object format = really an XML format with the parsed IDOC
- The generic IDOC format
You have to understand that to SAP it is all the same. What you have are just 2 different representations of the same data.
An IDOC is composed of one EDI_DC40 format record followed by a variable number of EDI_DD40 format records. The first 63 bytes of the EDI_DD40 link it to the corresponding EDI_DC40, give it its position in the list of DD40s and the hierarchy level in the DD40s. It contains as well the all important information on the SEGMENT NAME that will tell you how to parse the 1000 remaining bytes in the SDATA (Segment Data) part of the EDI_DD40.
Those structures as well as the Segment structures are well defined in SAP. It will be up to you, whether you chose to have WMB parse them or not.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
whydieanut |
Posted: Mon Oct 10, 2011 11:22 pm Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
Keeping aside the Generic SAP IDOC format AND the Adapter; now I am only trying to convert a message in XML format to the NORMAL IDOC format which is a CWF type of format (correct me if I am wrong here).
I'll be happy if I could just get a character variable to store the IDOC in its CWF-like format.
I was hoping that the below would do the trick:
Code: |
SET bitStream = ASBITSTREAM(InputRoot.DataObject, outEncoding, outCCSID, 'SPECIFIC_IDOC_MSGSET', '', 'SAP ALE IDoc', FolderBitStream);
SET iDocString = CAST(bitStream AS CHARACTER CCSID outCCSID);
|
But this still gives me an XML string, whereas I am expecting the IDOC format (CWF-like). |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 11, 2011 2:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
whydieanut wrote: |
Keeping aside the Generic SAP IDOC format AND the Adapter; now I am only trying to convert a message in XML format to the NORMAL IDOC format which is a CWF type of format (correct me if I am wrong here).
I'll be happy if I could just get a character variable to store the IDOC in its CWF-like format.
I was hoping that the below would do the trick:
Code: |
SET bitStream = ASBITSTREAM(InputRoot.DataObject, outEncoding, outCCSID, 'SPECIFIC_IDOC_MSGSET', '', 'SAP ALE IDoc', FolderBitStream);
SET iDocString = CAST(bitStream AS CHARACTER CCSID outCCSID);
|
But this still gives me an XML string, whereas I am expecting the IDOC format (CWF-like). |
And you are surprised? You're taking the bitstream of an XML document and disappointed when the content still is an XML document?
This transformation is really WMB 101. I suggest you get training.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
whydieanut |
Posted: Tue Oct 11, 2011 2:59 am Post subject: |
|
|
 Disciple
Joined: 02 Apr 2010 Posts: 186
|
I was foolish to think that specifying the Message Format as 'SAP ALE IDoc' in the ASBITSTREAM function was sufficient to conver the format of the message.
Code: |
ASBITSTREAM(InputRoot.DataObject, outEncoding, outCCSID, 'SPECIFIC_IDOC_MSGSET', '', 'SAP ALE IDoc', FolderBitStream); |
So if not, then what is the way to CONVERT the input message from XML to 'SAP ALE IDoc' format?
I am looking at a flow like:
MQInput -> Compute -> MQOutput
The input node gets a message of type ZFIBT in XML format. I need this message to be serialized (not sure if this is the right term here) into 'SAP ALE IDoc' format.
When I use the 'SAP ALE IDoc' format in the input node, the flow does accept the following type of input:
Code: |
EDI_DC40 1300000000000201089701 3012 ZFIBT DEBMAEXT DEBMAS SAPR11 LS R11CLNT130 RCVPORTWMBLS LS_AIWMB
|
But instead of this being the input format, I need it as the Output format.
Tried the following without success:
Code: |
SET OutputRoot.Properties.MessageFormat = 'SAP ALE IDoc';
SET OutputRoot.DataObject = InputRoot.XMLNSC.ns:SapZfiBt;
|
Any pointers towards how to get this done will be greatly appreciated...  |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Tue Oct 11, 2011 4:03 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
Have you tried with RCD node?
Have you tried with esql first setting OutputRoot.Properties message content description fields to match you message set and then creating DataObject domain branch to OutputRoot and tree copying your iDoc from our xml to DataObject and then serializing that with esql?
--
Marko |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 11, 2011 5:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You will never get Broker to output a tree that is created under the XMLNSC domain to match a physical format defined under the DataObject domain.
Likewise you will never get Broker to output a tree that is created under the XMLNSC domain to match a physical format defined under the MRM domain or any other domain.
You need to TRANSFORM the LOGICAL MESSAGE TREE.
This is Broker 101, as has been mentioned. |
|
Back to top |
|
 |
|