Post IDoc to SAP

General Tab

The Post IDoc to SAP activity is used to post IDocs to the SAP system without the need to use TIBCO Enterprise Message Service where the IDoc would be passed as input to the activity.

Note: When using this activity, exceptions must be caught and handled accordingly in the catch process.

On the General tab, establish connections to the SAP system 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 Post IDoc to SAP 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 a 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 the Create Shared Resource to create one. For more details, see Creating and Configuring an SAP Connection.

IDoc Name No Click Fetch IDoc button 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 schema 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, from which it is extended. Therefore, the extended IDoc types can be filtered out by using the corresponding basic IDoc type name.
  3. Click Fetch IDoc button.
  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.

After 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:
  • After 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 when user clicks the Fetch IDoc button.
Process IDocs in Raw Format No

Specify whether to process 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 to post raw IDoc format. The user provides the raw IDoc in the fixed schema in the Input tab.

Description Tab

On the Description tab, enter a short description for the Post IDoc to SAP activity.

Advanced Tab

On the Advanced tab, specify the posting of the IDoc to SAP confirmation mode, confirmation destination, the messaging source, and the protocol used to post IDocs.

The following table lists the configurations on the Advanced tab of the Post IDoc to SAP activity:

Field Module Property? Description
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 tRFC.

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 Mode Yes

This mode is used for IDoc Confirmation.

There are three modes for IDoc Confirmation:
  • None: No action is taken for IDoc Confirmation.
  • JMS: This posts information about the IDoc after it is posted to SAP on the JMS destination queue.
  • NoMessaging: After the IDoc is posted to SAP, a confirmation report is provided on the output of the activity.

The default mode for IDoc Confirmation is None.

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: This field is displayed only when you select JMS in the IDoc Confirmation Mode field.
Confirm IDoc Destination Yes

This destination is used to confirm the posted IDocs.

This field is displayed only when you select JMS in the IDoc Confirmation Mode field.

Input Tab

On the Input tab, specify the IDoc data for the selected IDoc.

The following table lists the input elements on the Input tab of the Post IDoc to SAP activity:
Input Item Data Type Description
ProcessInput Complex

Enters the data for the IDoc to be posted.

Note: Data for IDoc can be posted when IDocs are received in XML and Raw format.
sessionID String (Optional) Enters the sessionID of the previous activity for the use of Dynamic Connection instead of SAP connection, which is configured in the General Tab.

For information on how to create IDoc in XML format, please refer to Mapping Data for SAP Palette Activities

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 Post IDoc to SAP activity:
Output Item Data Type Description
TID String Displays the TID of the transaction that the SAP system uses to receive the posted IDoc.
sessionID String Displays the sessionID provided in the Input tab for the use of Dynamic Connection.
CPIC_ID String Displays the CPIC_ID associated with SAP Connection created for a dynamic connection
correlationID String This output is available only when NoMessaging is selected in the IDoc Confirmation Mode field on the Advanced Tab.
errorMessage String This output is available only when NoMessaging is selected in the IDoc Confirmation Mode field on the Advanced Tab.
successMessage String This output is available only when NoMessaging is selected in the IDoc Confirmation Mode field on the Advanced Tab.

Displays the success message only populated in the case where the IDoc to be confirmed is sent to the SAP system by using qRFC.

Because the IDoc number cannot be retrieved in that case, no call is made to the SAP system for the IDoc number and status. The value of the successMessage output item is populated in the following format:

IDoc sent to SAP via qRFC. IDoc number is unavailable. The original TID is TID.

idocNumber String This output is available only when NoMessaging is selected in the IDoc Confirmation Mode field on the Advanced Tab.

Displays the IDoc number populated by the IDoc Confirmation activity by retrieving the information from the SAP system.

Note: The IDoc number is populated only when the IDoc is posted to SAP by using the tRFC protocol.
idocStatus String This output is available only when NoMessaging is selected in the IDoc Confirmation Mode field on the Advanced Tab.

Displays the IDoc status populated by the IDoc Confirmation activity by retrieving the information from the SAP system.

Note: The IDoc status is populated only when the IDoc is posted to SAP by using the tRFC protocol.

Fault Tab

On the Fault tab, you can find the error codes and error messages of the Post IDoc to SAP activity and any element for logging the posted IDoc.

See Error Codes for more detailed explanation of errors.

The Fault tab has the following exception:

SAPPluginException

The SAPPluginException 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.
any element - Displays the input IDoc data at run time.
Note: The IDoc data is available only when the IDoc is not malformed.