Lesson Overview
Object channel serialization ensures that the order of messages for a particular object is always preserved on the receiving side. This means that the order in which messages are posted on the receiving side always corresponds exactly to the order determined on the sender side. The IDocs of an object channel are counted on the sender side. It is therefore possible to detect missing or overtaken IDocs on the receiving side. If the number of the IDoc that is currently in inbound processing is not the same as the expected sequential number, it is assigned a particular status value and processing is postponed.
Lesson Objectives
After completing this lesson, you will be able to:
• Describe object channel serialization
• Make the appropriate Customizing settings to activate or deactivate object channel serialization for a scenario
Business Example
You are transferring change data regarding an ALE scenario. You do not want to transfer all the information for an application document, but only the relevant parts. You therefore need to ensure that no overtaking occurs.
It is not sufficient to terminate processing if overtaking occurs, because this inconsistency cannot be easily corrected manually. Serialization by time stamp is therefore not applicable. Instead, you want to ensure that inbound processing occurs in exactly the same order as that in which the IDocs are generated.
Hint: If an ALE scenario is based on BAPIs, object channel serialization is always used instead of time stamp serialization.
Runtime Behavior
Figure 82: Serialization Using Object Channels
1. When creating the master IDoc in outbound processing, the application program always uses a function module to determine a channel number.
A characteristic key value for the application document is represented by a four-digit number.
2. The application program transfers this channel number, together with the master IDoc and the control record, to the ALE layer.
3. The ALE layer uses the Customizing settings to determine the BOR object type that is assigned to the message type.
4. Using the key information of BOR object type and channel number, the next sequential number is determined and is written in a serialization field of the control record.
The sequential number in the database tableBDRGOUTis raised by one .
5. In inbound processing, the system checks whether the sequential number for each BOR object type and channel number is one higher than the entry in the database tableBDRGIN. If this condition is fulfilled, the IDoc is transferred to the inbound function module of the application.
If the condition is not fulfilled, the IDoc is set to the status value 66.
In inbound processing using the background programRBDAPP01, all selected IDocs for which object channel serialization is activated are sorted by BOR object type and channel number before they are processed.
6. As soon as an IDoc has been successfully processed, the counter in the database tableBDFGINfor the key BOR object type and channel number is updated.
Figure 83: Serialization Field in Object Channel Serialization The serialization number of the control record is composed as follows:
• The first 10 characters contain the technical name of a business object type.
• The next 4 characters are formed by a character string created by an algorithm from an application key.
The application program obtains this number using the function moduleALE_SERIAL_KEY2CHANNEL. A material number, for example, can be used as a key.
• The last 6 fields are assigned a sequential number by the ALE layer.
• In the outbound program of the application, the channel number must be determined for an application key before the master IDoc is transferred to the ALE layer using the function module
ALE_SERIAL_KEY2CHANNEL. This number must be transferred to the ALE layer along with the master IDoc and the control record. Some ALE scenarios, which have not implemented any object channel serialization, provide an enhancement that you can use to determine the channel number.
• A suitable business object type must be released for object channel serialization. You can check this Customizing setting using transaction BD105. If an enhancement has been made, you can use this transaction to make a new entry.
• A business object type released for object channel serialization must be assigned to the message type. You can check this Customizing setting using transaction BD104. If an enhancement has been made, you can use this transaction to make a new entry.
Figure 84: Serialization Using Object Channels: Customizing To activate the object channel serialization planned for an ALE scenario, you need to make the following Customizing settings:
1. Maintain the outbound settings in the sender system. In transaction SALE, choose:
Application Link Enabling (ALE)→ Modelling and Implementing Business Processes→ Master Data Distribution → Serialization for Sending and Receiving Data → Serialization Using Business Objects → Activate Outbound Business Objects.
a) Make an entry for every recipient and business object type.
b) Select the field in the Ser. Flag column to activate object channel serialization for a recipient and a business object type.
2. Maintain the inbound settings in the receiving system. In transaction SALE, choose:
Application Link Enabling (ALE)→ Modelling and Implementing Business Processes→ Master Data Distribution → Serialization for Sending and Receiving Data → Serialization Using Business Objects → Activate Inbound Business Objects.
a) Make an entry for every sender and business object type.
b) Select the field in the Ser. Flag column to activate object channel serialization for a sender and a business object type.
3. Check the consistency of the settings. In transaction SALE., choose:
Application Link Enabling (ALE)→ Modelling and Implementing Business Processes → Master Data Distribution → Serialization for Sending and Receiving Data → Serialization Using Business Objects → Check Consistency System-Wide.
Lesson Summary
You should now be able to:
• Describe object channel serialization
• Make the appropriate Customizing settings to activate or deactivate object channel serialization for a scenario
Unit Summary
You should now be able to:
• Describe the settings required for sending or processing IDocs in packages
• Describe the prerequisites for package processing
• Describe the settings required for sending or processing IDocs using parallel processing
• Describe time stamp serialization
• Check whether a scenario uses time stamp serialization
• Describe how you can ensure serialized processing of dependent master data for different message types
• Set up serialization by message types (serialization groups)
• Describe object channel serialization
• Make the appropriate Customizing settings to activate or deactivate object channel serialization for a scenario
Test Your Knowledge
1. Where do you enter the number of IDocs that are grouped together for sending in a package under one transaction ID?
2. Where do you enter the number of IDocs that are to be processed in one LUW in inbound processing?
3. How can you tell whether a program uses parallel processing for IDoc generation?
4. For time stamp serialization, the application must first do the following:
Choose the correct answer(s).
A Check in the inbound function module whether overtaking has occurred, and make an entry in the table parameter
SERIALIZATION_INFO.
B In outbound processing, provide the function module
MASTER_IDOC_DISTRIBUTEwith the parameterSERIALIZATION_INFO. C Assign an ALE object type to the message type as a
serialization object type.
D Assign segment fields to the message type and the serialization type.
5. You want to implement serialization using message types for two message types. You want to define the serialization rule in the sending system. What do you need to do?
Choose the correct answer(s).
A Define a serialization group in the receiving system
B Create a distribution model forSERDATand define the partner profile in the sending system and the receiving system.
C Maintain the inbound settings for serialization in the target system.
D Schedule the programRBDAPP01in the target system for inbound processing of all IDocs of both message types.
E Schedule the programRBDSER04in the target system for inbound processing of all IDocs of both message types.
F Define a serialization group in the sending system.
6. You want to implement serialization using message types for two message types. You want to define the serialization rule in the sending system. What do you need to do?
7. The outbound processing of an ALE scenario supports object channel serialization. Which Customizing settings do you need to make to update object channel serialization for this ALE scenario?
Choose the correct answer(s).
A Activate each partner and object type in the sender system only.
B Activate each partner and object type in the receiving system only.
C Activate each partner and object type in the sender system and the receiving system.
D Assign a business object type to the message type.
E Assign a segment field to the business object type.
F Release the business object type for object channel serialization.
Answers
1. Where do you enter the number of IDocs that are grouped together for sending in a package under one transaction ID?
Answer: In the partner profile.
2. Where do you enter the number of IDocs that are to be processed in one LUW in inbound processing?
Answer: In inbound processing, the background programRBDAPP01 provides a selection parameter.
Related Information
You can also implement package processing for serialized inbound processing. For more information, see the documentation on serialization methods. In transaction SALE, choose Modeling and Implementing Business Processes→ Master Data Distribution →
Serialization for Sending and Receiving Data→ Define Inbound Processing
3. How can you tell whether a program uses parallel processing for IDoc generation?
Answer: Normally these programs provide a selection parameter in which you can enter an RFC destination.
4. For time stamp serialization, the application must first do the following:
Answer: A, C, D
No action is necessary in outbound processing. The ALE layer automatically provides a time stamp for the control record of the IDoc. As soon as the inbound function module returns the table parameterSERIALIZATION_INFOwith values to the ALE layer, the ALE layer updates the table BDSER.
5. You want to implement serialization using message types for two message types. You want to define the serialization rule in the sending system. What do you need to do?
Answer: B, C, F
Inbound processing for the IDocs for both message types of the serialization group cannot be triggerred by the programsRBDAPP01 orRBDSER04. Instead, it is triggered by the inbound program for
SERDAT. The serialization group in the target system is then irrelevant.
If inbound processing is triggered by RBDSER04, the corresponding serialization rule from the receiving system is used, and not the rule that is transferred bySERDAT.
6. You want to implement serialization using message types for two message types. You want to define the serialization rule in the sending system. What do you need to do?
Answer: Define a serialization group in the sending system and assign both message types in the required order. In addition, define a distribution model for the message typeSERDATwith the sender and receiver system of both message types. Send the distribution model to all sending and all receiving systems and generate the partner profiles. If necessary, change the outbound partner profile settings of both message types to Collect IDocs, and for SERDATto Transfer immediately. Schedule the programRBDSER02as a background job, and enter the serialization group as a selection parameter. In the inbound partner profile in the receiving system, select Processing by Background Program, and forSERDATselect Process Immediately and the process code SERD.
7. The outbound processing of an ALE scenario supports object channel serialization. Which Customizing settings do you need to make to update object channel serialization for this ALE scenario?
Answer: C, D, F
For more information, see the Customizing and Prerequisites section.