!--a11y-->
Generating Metadata for Business Document
Types 
You must generate metadata to maintain mobile client data in synchronization with the data in the CRM server. You can generate metadata for a set of business document types or all the business document types.
Metadata is generated in a Modification station (also referred to as a Development station) where business document types are customized. If you use multiple Modification stations, you must generate table scripts to update the IDES database.

You can generate metadata only when a connection to the CRM server is available.
You must have:
· A user ID with the access rights of the system administrator on Microsoft SQL Server and DBOwner on the IDES database.
· Read and write access to the registry. Set the user database login parameters in the registry.
· A user ID and a password for the CRM server you want to connect to.
You must know the details of the CRM server you want to connect to.

You can get the server details in the SAP Logon screen.
...
1. On the Client Console screen, choose Action à Client Administration à Metadata Manager.
The Metadata Manager - CRM Middleware Connection screen appears.

On the Customize Client Console screen, if you have selected the option Reuse Middleware Login and have already logged on to the server once in this session, the Generate Metadata screen appears. Continue with step 3.
2. Enter server details and login parameters and choose Connect.
The Metadata Manager screen appears.
3. Specify the business document type(s) for which you want to generate metadata.
If you select: |
Then: |
Append selections |
You can select business document types from more than one selection mode. |
Selected BDocs |
You must manually select business document types. |
All BDocs |
All the business document types are selected. You cannot deselect any business document type from the list. |
From File |
You must choose the file in which you have entered the list of business document type names.
If you frequently generate metadata for a set of business document types, enter the list of business document type names in a text file to reuse the list. |
Advance Selection Criteria |
You can specify advance selection conditions for selecting business document types. For information on selection conditions, see Advance Selection Criteria for BDoc Types. |
4. In the Fetch BDoc(s) from server per call field, enter the number of business document types. The data for business document types is fetched from the CRM server one at a time for processing. The default number of BDoc types fetched from the server is 50.

The greater the number of BDoc types during fetch, more memory is consumed during generation. If the number of BDoc types is less, the performance of the operation is low as the number of fetches increase. If the machine has 256 MB RAM and above, you can fetch all the BDoc types at once.
5. Choose Generate.
The Log window displays the progress and result of generation. Client Console performs the following for each business document type that you select for metadata generation:
...
1. A view is created in the IDES database for all the segments of the BDoc type.
2. The BDoc type metadata information is written in the TPS.net file.

If the mobile client is assigned to an XML enabled site, then in addition to the TPS.net file, the BDocSchema.xml file is created that contains the recordset schema information.
See also:
Generating Metadata from the Command Line