Pass-through support for IDocs, and MQSeries link for R/3 link migration
Both the inbound and outbound SAP adapters support a pass-through mode for IDocs.
In this mode, the bit stream for the IDoc is provided without any form of parsing. The bit stream can then be used directly in a message flow, and parsed by other parsers, or sent unchanged over transports.
Use the Adapter Connection wizard to select pass-through support: on the Configure settings for adapter pane, select ALE pass-through IDoc as the interface type.
A business object is created that contains one field, which is
the bit stream of the IDoc. You can transform this business object
in a Compute node to an MQSeries® link for R/3 format
message, as shown in the following example.
DECLARE ns NAMESPACE
'http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sapmatmas05';
CREATE COMPUTE MODULE test4_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
set OutputRoot.MQSAPH.SystemNumber = '00';
set OutputRoot.BLOB.BLOB =
InputRoot.DataObject.ns:SapMatmas05.IDocStreamData;
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
You can also create a request business object from an MQSeries link for R/3 message, as shown
in the following example.
CREATE COMPUTE MODULE test4_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
set
OutputRoot.DataObject.ns:SapMatmas05.IDocStreamData =
InputRoot.BLOB.BLOB;
RETURN TRUE;
END;
END MODULE;
The name of the SapMatmas05 element depends
on selections that you make when you run the Adapter Connection wizard.