How to set up the data conversion configuration in 1s. Real world problems

Home / Doesn't turn on

Print (Ctrl+P)

Data conversion, edition 3.0

Lesson 1. Preparing to work with KD3.0

Data conversion, edition 3.0(further KD3.0) – is one of the components of data exchange technology through the format EnterpriseData. KD3.0 is not a configuration replacement Data conversion, edition 2.0(further KD2.0). This is a new standard that is very different from KD 2.0. Main purpose KD3.0 – this is the creation of a program code for an exchange manager module, consisting of procedures and functions that implement the logic for loading data presented in the format EnterpriseData, as well as the logic for uploading data into the format.

Fig 1 General exchange manager module

KD3.0 can be downloaded from https://users.v8.1c.ru/

Revision 3.0.5.3, intended for use with the system version
1C:Enterprise 8.3 is not lower than 8.3.10, and edition 3.0.4.3 is for use with the 1C:Enterprise 8.3 system version is not lower than 8.3.8.

Delivery KD3.0 contains the following external processing

  • Processing MD83Exp.epf“Uploading a description of the metadata structure of configuration 8.3” – is intended for uploading a description of the metadata structure of any configuration implemented on the 1C:Enterprise 8.3 platform.
  • Processing Uploading synchronization rules.epf“Uploading synchronization rules through a universal format” used when preparing conversion rule files intended for subsequent loading into the “Data Conversion” configuration, edition 3.0.
  • The file “Configuration Description.htm” contains a brief description
    basic configuration functionality
    “Data Conversion”, edition 3.0.

Additional information on the “Data Conversion” configuration, version 3.0
see http://its.1c.ru/db/metod8dev#content:5846:hdoc

1. Preparing to set up rules

To load the format structure, you must first open the configuration database in configurator mode and download XDTO packages from the configuration into *.xsd files.

It is necessary to unload all packages that are associated with the format. The names of the files are not of fundamental importance. You must also upload the ExchangeMessage XDTO package

After loading the XDTO format into CD 3.0, the directories “Format Objects”, “Format Properties”, “Format Values” are filled in

IN reference book “Format objects” loading:

  • Objects with the type “ObjectTypeXDTO”, which reflect reference data types (documents, directories)
  • Objects of type “XDTOValueType” containing an enumeration. They reflect predefined data (e.g. enumerations)

IN reference book “Format properties” loading:

  • Properties of “ObjectTypeXDTO” objects. At the same time, the objects themselves are those that were loaded into “Format Objects”
  • Objects with the type “XDTOObjectType” and their properties that reflect tabular parts and details of tabular parts

The properties of the “XDTOValueType” objects, which are elements of predefined data, are loaded into the “Format Values” reference book. At the same time, the objects themselves are those that were loaded into “Format Objects”

1. 2. Processing “Loading configuration structure”

This processing loads the configuration metadata structure into the infobase Data conversion ed.3.

To download information about the structure of the infobase, processing is used MD83Exp.epf, included in the delivery kit for the KD3.0 configuration

For the infobase whose structure needs to be unloaded, perform the following steps:

  1. Open the infobase in Enterprise mode.
  2. Open external processing MD83Exp.epf(Menu File - Open).
  3. Specify the name of the file in which to save the infobase structure.
  4. Check the settings in the processing form (all flags must be cleared).
  5. Press the button Unload.

After downloading the configuration structure, the directories are filled in

  • Metadata objects
  • Object Properties
  • Object values.

Directory Metadata objects contains information about configuration metadata objects. The type of objects is recorded in the corresponding attribute. Depending on the value of the Type attribute, the details describing the properties of the metadata object are filled in. Details of metadata objects are described in the subordinate directory Object Properties. Object values ​​(enumeration values ​​and names of predefined elements) are described in a subordinate directory Object values.

Before loading synchronization rules through a universal format, the data format must be loaded from files (using processing(see clause 1.1), and the configuration for which the synchronization rules are configured must also be loaded. The configuration is loaded using processing ( see point 1.2) . Note also that directory item to be created Conversions . To convert, you must specify the configuration and one or more format versions for which the conversion is intended.

1.3.1 Preparing files for loading rules

Files are prepared in the infobase for which the exchange will be carried out in a universal format (for example, Enterprise accounting ed.3.0).

To prepare rule files, you must enter the infobase in Enterprise mode and start processing Uploading synchronization rules via a universal format, which is included in the configuration delivery Data conversion ed.3.

To prepare a file with a manager module, you must enter the information base in Configurator mode and save the general module Exchange Manager Through Universal Format to a text file. You can specify any file name.

All prepared files must be located in the same directory.

1.3.2 Loading synchronization rules

Performed in the infobase Data conversion ed.3 by processing Loading synchronization rules from files.

In the processing form, indicate:

  • Exchange directory in which previously prepared files are located
  • Conversion
  • Composition of downloaded data
    • or specify the “all” option
    • or select selective loading and configure the list of rules that should be loaded
  • File with the exchange manager module (not required if selective loading is performed and handlers are not loaded)
1.3.3 Features of loading into a non-empty database
  • If the loaded rule exists, and it belongs to only one conversion (the current one), the rule will be changed. In this case, the analysis of differences between the existing and loaded rules is not performed; the rule is refilled and written unconditionally.
  • If the loaded rule exists and it belongs to several elements of the Conversions directory, including the current conversion, a new rule will be created and linked to the current conversion. The “old” rule will remain unchanged and will remain tied to other conversions.
  • Rule groups are not loaded. But if the rule was assigned to a certain group, when it is re-loaded into this rule, this information will be saved.

Data conversion 2.0 and 2.1 is a technological configuration of 1C, implemented on platform versions from 8.1 to 8.3.

The main task of the tool is to write rules for exchange between application solutions 1C 8 and 7. The current version of data conversion today is 3.0.

Data conversion is a very useful configuration; with its help you can solve not only the issue of transferring information from one information base to another, but also, for example, converting information within one database.

The configuration is very convenient to use with .

Data conversion will be useful to any programmer: having the skills to create exchange rules is a serious plus for professional skills.

To learn how to work with a configuration, solving practical problems is best suited. Try to come up with tasks for yourself, for example: transfer some information from one database to another, turn a sales document into a receipt document, “enter” current accounting balances into a document “entering balances” and other tasks.

It will be very useful to understand the “standard” exchange rules of 1C 8.3; there you can often find interesting examples of implementing tasks.

To understand the basics, you will need materials, we will consider them below.

Video instructions for conversion

For the basics of setting up data exchange in 1C using the “1C Data Conversion” configuration, see the example in the video:

Materials, textbooks for studying 1C Data Conversion 2.0

There are not too many materials and documentation on the Internet, I tried to collect the most important and interesting materials:

0. First of all, I recommend the free video course by Ilya Leontyev, it is available at link.

1. I would advise first of all to use the built-in help in the configuration. It is really well written and technically well implemented:

2. The second most important source of information is the site http://www.mykod.info/ (the site has closed), specialized specifically in data conversion. There you can download a large number of materials on conversion.

3. Separately, I would like to highlight the textbook - (author - Olga Kuznetsova).

The effective operation of 1C Enterprise 8.3 programs is due to the correct setup of data exchange between them, that is, uploading and downloading directories, as well as other information. In some situations, it is enough to use the “Universal XML Data Interchange” processing or the existing standard transfer rules, for example, when moving from one edition of programs to another. They can be built into the program with a specific list of exchange rules or located in the installed update folder. For example, AccountingBase (“Accounting”, basic version) and the “Data Exchange” folder is located there.

Fig.1

But when you need an exchange between completely different configurations, and therefore transfer rules for non-standard versions, which will require setting up exchange rules and comparing objects for transfer, you should resort to an external program designed to create conversion rules between any configurations, regardless of their structure and complexity.

To describe metadata, external processing MD83Exp.epf is used - for products on the 1C:Enterprise 8.3 platform (managed application), MD82Exp.epf - for a regular application, in XML file format. Typically, the processing file is located in the templates directory where the configuration is installed. For example, C:\Program Files\1cv8\tmplts\1c\Conversion\3_0_5_3\. In our example, we use “1C: Data Conversion, ed. 3.0" (release 3.0.5.3).



Fig.2

Preparing a conversion file involves generating an XML file of exchange rules. Let's look at the progress of its creation using a small example.

Step 1. The program can be downloaded from the ITS website or installed from the ITS disk. Suppose we need to download the “Counterparties” directory from “Accounting” into “UT 8.3”. Our first program is “Source Base”, and the second is “Sink Base”. Note that the exchange is configured not only between databases 8.3, but also between 7.7 and 8.3 and others.

Step 2. We upload the metadata structure of the databases involved in the exchange into an XML file using MD83Exp.epf processing. To do this, in the “Source Database” and “Destination Database” in the “1C Enterprise” mode, open the specified processing and use it to unload the configuration structure, specifying the name of the generated file. For example, let’s name the files “Source Base” and “Destination Base”.



Fig.3



Fig.4


Fig.5

Step 3. We export the xml scheme of the exchange format. This is a file with the extension "xsd". You can get it from both the “Source” and the “Sink”. To do this, open the information base in the “Configurator” mode (“Open configuration”), in the metadata tree there is the “General” section and the XDTO packages subsection.


Fig.6

Let’s find the lines with the name “EnterpriseData” (different numbers are different versions of the format) and, by right-clicking, select the “Export XML Schema” command.


Fig.7



Fig.8


Fig.9

Step 4. We add the structure of the database of uploaded configurations (source and destination) to the “1C: Data Conversion” database. To do this, in the “Configuration” menu item, for each generated file (source and destination) we perform “Loading the configuration structure”.



Fig.10

We indicate the path to our file, select the download method - “To the new version of the configuration”, and click the “Download” button.



Fig.11



Fig.12

After downloading the files, if we go to the "Configurations" section of the menu, we will see our two downloaded configurations.



Fig.13



Fig.14

Step 5. Loading exchange format structures. In the “Data Format” menu item, select the “Load format structure” command.



Fig.15

We indicate the previously uploaded file and click the “Download” button.



Fig.16

After the download is complete, we will check the result. Let's go to the menu “Data format” - “Tree of format objects”. Having selected the format we downloaded, we see its structure.



Fig.17

Step 6. Creating a conversion. To accomplish our task, we create two conversions. The first is for unloading the directories “Employees” and “Counterparties” from “Accounting”, and the second is for loading into “UT”. Let's go to the "Conversions" menu.



Fig.18

For each operation we indicate the name, for example - “Unloading from BP”, “Loading into UT”, the name is Enterprise Accounting, Trade Management and the version of the format (which we downloaded, in our example 1.6).



Fig.19



Fig.20

Step 7



Fig.21

Opening each operation separately, let's configure it. On the “Object Conversion Rules” tab, click the “Create” button.

Fig.22

On the “Basic Information” tab, we indicate the identifier of our rule (for example, Directory_Accounts_Upload), configuration object and format object. Scope of application – “For sending”.



Fig.23



Fig.24

Click “Auto-matching”, and click the “Create property conversion rules” button to save the result.



Fig.25



Fig.26



Fig.27

If necessary, other fields are manually configured for conversion.

Step 8 The conversion rule for loading is configured in the same way, in our example in “Trade Management”. Please note that the scope of application is “For receipt”.



Fig.28

On the “Property conversion rules” tab, we perform auto-matching and, by clicking the “Create property conversion rules” button, save the result.



Fig.29

Step 9 In both created conversion rules, we create a rule for converting predefined data by going to the tab of the same name, clicking the “Create” button, and comparing the values ​​in the table from the configuration and format. Scope of application: “For receiving and sending.”



Fig.30



Fig.31



Fig.32

We indicate a new rule for converting the property “Legal Individual” for our directory. Let’s open the conversion rule for the “Directory_Counterparties_Upload” object.



Fig.33

On the “Property Conversion Rules” tab, add a property conversion rule, indicating “Transfer_LegalIndividual” in it.



Fig.34



Fig.35

The action is similar for the second rule “Directory_Contragnets_Loading”.



Fig.36

Step 10 We create a data processing rule. The actions are the same for both rules we created. Going to the conversion rule, click the “Create based on” - “Data processing rule” button.



Fig.37

The data gets into it automatically.



Fig.38



Fig.39



Fig.40

Step 11 Unload the exchange manager module, either in the conversion rule by clicking “Save exchange manager module”, or through the “Conversion” - “Unload module” item.

Fig.41



Fig.42



Fig.43

Next, we open the configuration for which our module is intended, and in the metadata tree we look for “Omena Manager Through Universal Format”, open it and paste our module copied to the clipboard there.



Fig.44

When setting up an exchange, the program in question has so far only one function - generating texts of common modules Exchange Manager Through a Universal Format for each of the databases, using the metadata structure of the configurations participating in the exchange and the universal format schemes. It is better to create and apply these modules at the initial stage of setting up the exchange, and you should continue to refine them directly in the text of the configurator module.

Configuration edition “Data Conversion 3.0” is a new but progressive technology for simplifying the exchange between configurations using the universal EnterpriseData exchange format.

Probably every 1C specialist has encountered the need to transfer data from one information base to another. In the case where the configurations are different, you have to write data conversion rules. These rules are created in the 1C “Data Conversion” configuration.

Data can also be transferred using . Many 1C 8.3 configurations have standard functionality for setting up data synchronization between different configurations and seamless integration with 1C Document Flow.

But when data needs to be transferred between absolutely identical configurations, you can simplify your task and use standard processing for uploading and downloading via XML. Please note that this method, like data conversion, compares objects with each other by a unique identifier (GUID), and not by name.

You can download this processing on the ITS disk, or using the links:

It is universal and suitable for any configuration.

Let's consider an example of unloading the "Nomenclature" directory from one 1C 8.3 Accounting 3.0 information base to another. A prerequisite will be selection by the parent (group) “Woodworking”.

Uploading data from 1C to XML

Go to the information base from which the data will be downloaded (source). Be sure to check them, taking into account all possible conditions to avoid undesirable consequences.

Open XML data upload and download processing (Ctrl+O).

We are interested in the “Upload” tab. First of all, specify the name of the file into which the data will be uploaded and the path for saving. In this case, the data is uploaded “to a file on the server”.

In the processing header you can configure the period for which the selection will be carried out. Also, for periodic registers, you can specify the method of applying selection by period. If it is necessary to upload movements along with documents, the corresponding flag is set. In this case, we overload the directory, so there is no need to configure anything in the header.

Let's move on to selecting data for uploading. In the tabular part of the processing form, select the checkboxes for the configuration objects that you need to transfer.

The “Unload if necessary” column means whether it is necessary to overload this object if it is referenced by the attribute of the directory we are overloading. For example, the position of the item you are loading has a unit of measurement that is not in the target database. If the flag in the “Upload if necessary” column is checked opposite the reference book with units of measurement, a new position will be created. Otherwise, the value of the attribute will be “<Объект не найден>" and its unique identifier.

In a simple case without selections, the item overload setting will look like this.

In this example, you need to select only the items that are located in the “Woodworking” folder.

Similar processing for 8.2 allows you to set selections for each configuration object in a convenient form. In 8.3, unfortunately, there is no such functionality. One way out in this situation would be to select the necessary items on the “Additional objects for unloading” tab.

You can add objects here either manually (the “Add” button) or by request (“Add by request...”). If there are a large number of them, the second option is preferable.

In this case, the request will be as follows. Fill in the parameters, complete the request after checking the data, and click on the “Select result” button.

After you have specified all the necessary objects and additional elements for uploading, click on the “Upload data” button. They will end up in an XML file, the name and path of which you specified earlier. The results of this operation will be displayed in messages.

In this example, it was necessary to unload only 3 positions, but five were unloaded. This is because a flag was set opposite the “Nomenclature” directory in the “Upload if necessary” column. Along with the necessary positions, their parents were overloaded.

Loading a directory from XML

After successfully downloading data from the source configuration into an XML file, open the destination database. The structure of objects and their details must match each other. In this case, the transfer is carried out between two standard configurations 1C: Accounting 3.0.

Open processing in the receiver database. This processing is used for both uploading and loading data. Go to the “Download” tab and specify the path to the XML file into which the data was previously downloaded. After that, click on the “Download data” button.

The download result will be displayed in messages. In our case, everything went well.

The “Nomenclature” directory in the receiving database was not filled out. Now it has five elements: three nomenclature positions and two groups.

© 2024 ermake.ru -- About PC repair - Information portal