IDoc Reader

Use the IDoc Reader activity to post IDocs to the SAP system.

The IDoc Reader activity retrieves the XML message persisted on a messaging source, converts the message into an IDoc, and then posts the IDoc to the SAP system.

IDocs of SAP port type 4x are only supported using tRFC and qRFC protocols.

Note:
  • The IDoc Reader activity requires the TIBCO Enterprise Messaging Service.
  • The IDoc Listener activity does not support the job tuning property, FlowLimit.
  • In IDoc Reader activity, while reconnecting if SAP exhausted, the client connection exception is caught by the IDocReaderFault exception and the IDoc messages remain in queue.

See Job Tuning for details.

General Tab

On the General tab, establish connections to the SAP system and the messaging source separately, and download the schema of the IDoc to be posted to the SAP system.

The following table lists the configurations on the General tab of the IDoc Reader activity:

Field Module Property? Description
Name No Specify the name to be displayed as the label for the activity in the process.
SAP Connection Yes Click to select an SAP Connection shared resource. The SAP Connection shared resource establishes connections between the plug-in and the SAP system.

If no matching SAP Connection shared resources are found, click Create Shared Resource to create one. For more details, see Creating and Configuring an SAP Connection.

IDoc Name No Click Fetch IDoc to download the schema of the IDoc to be posted.
In the Search IDoc dialog box, complete the following tasks:
  1. Specify the IDoc filter to filter out the required IDoc types with the IDoc type name.

    The IDoc filter supports the wildcard search. The default value of the IDoc Filter field is .*, and the value of this filed is case sensitive.

  2. Select an IDoc type.
    • Basic Type: select Basic Type if you want to download the IDoc schema of the basic type. Only the basic IDoc types matching the IDoc filter can be filtered out.
    • Extended Type: select Extended Type if you want to download the IDoc schema of the extended type. The extended IDoc type name includes the name of the basic IDoc type that it is extended from. Therefore, the extended IDoc types can be filtered out by using the corresponding basic IDoc type name.
  3. Click Fetch IDoc.
  4. Select the IDoc type that you want to download and click OK.

    Ensure that the selected IDoc type and the associated segments have been released in the SAP system.

    You need to clear the Download IDoc specific to SAP release checkbox to filter those IDocs that have been released but do not have a release number assigned.

When the IDoc schema is downloaded, an XSD file is created. The XSD file cannot be visible in the project, but it can be picked from the activity if required.

Note:
  • When an IDoc schema is downloaded to the plug-in, if new segment definitions are added to the IDoc schema because of the upgrade of the SAP system, you have to refresh the IDoc schema in the plug-in.
  • If the IDoc schema requires to be refreshed from the SAP system, then ensure that the Download IDoc specific to SAP release check box is configured accordingly. The Download IDoc specific to SAP check box is by default always selected whenever user clicks the Fetch IDoc button.
Messaging Source No Select the messaging source where the activity retrieves messages from the list.

Only the JMS type is supported.

JMS Connection Yes Click to select a JMS Connection shared resource. The JMS Connection shared resource establishes a connection between the plug-in and the EMS server where the activity retrieves the IDoc to be posted.

If no matching JMS Connection shared resources are found, click Create Shared Resource to create one. For more details, see the TIBCO ActiveMatrix BusinessWorks documentation.

Note: When the fault-tolerant operation is not configured on the EMS server and the server goes down, if the server is restarted, the IDoc Reader activity might retrieve a duplicate IDoc message.
Max Session Yes Enter the number of IDoc messages to be processed concurrently.

The default value is 1.

If you set the value of this field to negative numbers or zero, the value of 1 is used automatically at run time.

See Job Tuning for details.

Receive IDocs in Raw Format No Specify whether to receive IDocs in a raw format.

If you select this check box, the IDoc Name field and Fetch IDocs button becomes unavailable because the IDoc schema is not required for the raw IDoc format.

Description Tab

On the Description tab, enter a short description for the IDoc Reader activity.

Advanced Tab

On the Advanced tab, specify the destination used to retrieve IDocs to be posted, and the protocol used to post IDocs.

The following table lists the configurations on the Advanced tab of the IDoc Reader activity:

Field Module Property? Description
Sequence Key No This field contains an XPath expression that specifies the order in which the process runs. Process instances with sequencing keys that have the same value are executed sequentially in the order in which the process instances were created.
Custom Job Id No This field contains an XPath expression that specifies a custom job ID for the process instance. This ID is displayed in the $_processContext process variable. The custom job ID for the process instance.
Post IDoc Destination Yes This destination is used to retrieve the IDoc to be posted. For more information on how to create IDoc in XML format, please refer Mapping Data for SAP Palette activities
IDoc Error Destination Yes This destination is used to forward the IDoc when an exception occurs in the SAP system.
Note: If the value of the IDoc Error Destination or Confirm IDoc Destination field is invalid, the IDoc Reader activity fails to be initialized during startup, and no IDoc messages are read from the destination specified in the Post IDoc Destination field for processing.
IDoc Error Msg Expiration (ms) Yes This field allows for messages on the IDoc Error Destination to be deleted from EMS Server if not processed by the time mentioned. This field is maintained in milliseconds (ms) and the default is 0 where messages will not expire.
IDoc Input Mode No This protocol is used to post IDocs.
The plug-in supports the following protocols:
  • tRFC: select tRFC if the message delivery in sequence is not required.
  • qRFC: select qRFC if the message delivery in sequence is required. If you select qRFC from the IDoc Input Mode list, the queueName attribute in the message sent to the destination specified in the Confirm IDoc Destination field contains the value of the SAP Queue Name field.

The default protocol is qRFC.

SAP Queue Name Yes The name of the queue is to be used when posting IDocs by the qRFC protocol.
Note: This field becomes available only when you select qRFC from the IDoc Input Mode list.
IDoc Confirmation Yes This check box indicates whether IDoc confirmation is enabled.

Select this check box if you want to get information about the IDoc after it is posted.

Confirm IDoc Destination Yes This destination is used to confirm the posted IDocs.

This field is displayed only when you select the IDoc Confirmation check box.

Note: If the value of the IDoc Error Destination or Confirm IDoc Destination field is invalid, the IDoc Reader activity fails to be initialized during startup, and no IDoc messages are read from the destination specified in the Post IDoc Destination field for processing.

Output Tab

On the Output tab, find the information of the posted IDoc.

The following table lists the output elements on the Output tab of the IDoc Reader activity:
Output Item Data Type Description
MessageID String Displays the message ID of the posted IDoc.
TID String Displays the TID of the transaction that the SAP system uses to receive the posted IDoc.
Dynamic Properties Complex Displays the JMS dynamic properties received in the JMS message.

In case of any error posting in the IDoc, SAPPLUGIN_ERROR_MSG and SAPPLUGIN_ERROR_MSGID are generated in the output of dynamic properties.

Fault Tab

On the Fault tab, you can find the error codes and error messages of the IDoc Reader activity.

See Error Codes for more detailed explanation of errors.

The Fault tab has the following exceptions:

IDocReaderFault

The IDocReaderFault generates an exception and causes the activity to stop.
Error Schema Element Data Type Description
msg String Displays the error message.
msgCode? String Displays the error code.