!--a11y-->
Creating Interfaces for New BDoc
Types 
For newly created BDoc types you have to create interfaces between the CRM application and the CRM Middleware.
The interfaces required are one validation service and two mapping services.
You can find the examples below in the Object Navigator in package SMW3.
· Service for mapping from synchronization BDoc types to messaging BDoc types
This service involves a class method that implements the interface IF_SMW_MAP.
Precisely one messaging BDoc type
of a predefined type (n:1 relationship) is created from one synchronization
BDoc type.
For example, class EXAMPLE_IF_SMW_MAP with method MAP_SYN2MSG.
Proceed as follows:
1. Follow the example to implement a class with a method.
2. Choose Message Flow ® Define BDoc Type-Specific Attributes. The key field BDoc Type of table SMW3BDOCIF must contain the name of the synchronization BDoc type.
3. In the field Mapper enter the name of the class containing the method.
· Validation service for CRM server applications
This service is an enhanced flow service. It supports mass processing and supports status determination.
The validation service is called up by the messaging flow. The service validates the inbound mBDoc message in the CRM server application database.
An example of a validation service is the function module SMW3_SCARREXAMPLE_VALIDATE under the function group SMW3_SCARREXAMPLE.
Proceed as follows:
1. Implement a validation service as a function module using the example.
2. Transfer this function module into your flow definition in the configuration table SMW3BDOCIF. Choose Message Flow ® Define BDoc Type-Specific Attributes. The key field BDoc Type must contain the name of the messaging BDoc type.
· Service for mapping messaging BDoc types to synchronization BDoc types (for the mobile applications)
A messaging BDoc type is transferred into one or more synchronization BDoc types (1:n relationship).
An example is the function module SMW3_SCARREXAMPLE_MSA under function group SMW3_SCARREXAMPLE.
Proceed as follows:
1. Implement a function module using the example.
2. Choose Message Flow ® Define BDoc Type-Specific Attributes. The key field BDoc Type of table SMW3BDOCIF must contain the name of the messaging BDoc type. Enter the name of the function module in the Bridge field.
3. Choose Message Flow ® Define Customer-Specific Flow Attributes. Make the required entries in table SMW3FDCUST as described in the following section:
|
BDoc Type |
Context |
Sequence |
Function Module |
Active |
Mobile |
|
<mBDoc Type> |
10 |
<Function Module> |
X |
X |
|
|
<mBDoc Type> |
MOB |
10 |
<Function Module> |
X |
X |
|
<mBDoc Type> |
MOC |
10 |
<Function Module> |
X |
X |
Then check your flow definition. Choose Achitecture and Technology ® Middleware ® Message Flow ® Display and Check Flow Definitions.