Hardware and software setup

Universal data exchange 8.3. Exchange via universal format

Each plan has a certain list of elements, information about the change of which it can store. This list is called the “Composition of the exchange plan”. The composition can be expanded, but configuration support is removed.

The "Plan Layout" stores the very rules on the basis of which synchronization works. It is this conversion package (Registration Rules, Exchange Rules, Correspondent Exchange Rules) that we need for further study.

Consider an example of data synchronization between the configurations "1C: Payroll and HR 3" (ZUP) and "1C: Enterprise Accounting 3" (BP). We note right away that in this task we will have to remove the configuration from support. This is required by condition.

A living example of the need to refine the model exchange rules

For example, a customer contacted us with the following problem: when synchronizing between ZUP and BP, it is not possible to transfer the data of the “Registration with the tax authority” directory, which are necessary to fill out the “Reflection of wages in accounting” document. Now the tabular part of this document on the side of the BP receiver contains an empty "Registration ..." and users have to manually create such entries in the directory. Agree, it's inconvenient. We can improve this point.

Solution to the problem: we will finalize the conversion package from the exchange plan ExchangeSalary3Accounting3. Let's add to the standard "1C Exchange Rules" a new "Object Conversion Rule" (PKO) for the "Registration with the Tax Authority" directory and, accordingly, the "Property Conversion" of this directory (PKS). We will definitely finalize the standard "Rules for registering objects", because there was a need to register the directory changes on the exchange node. And we will revise the "1C Exchange Rules" of the correspondent's base.

Where will we edit this? to write and change the rules, we need the "1C: Data Conversion 2" configuration.

Refinement of standard conversion rules from the PZUP-BP exchange plan

So, let's start finalizing the 1C exchange rules by adding a new element to the composition in the configurator for the exchange plan ExchangeSalary3Accounting3 - the RegistrationIn Tax Authority directory. We will make this change in both configurations "1C: Salary and Enterprise Management 3" and "1C: Enterprise Accounting 3".

Save and update the configurations.

In the enterprise mode, for each database, we will upload a description of the metadata structure using the processing of MD83Exp.epf for the 1C:Enterprise 8.3 platform. Processing can be found in the "1C: Data Conversion" kit.

At the next stage, we will unload the conversion package from the ZUP and BP. The package should consist of 3 files: Registration Rules, Exchange Rules, Correspondent Exchange Rules.

Within the framework of this article, there will be no description of how data synchronization is configured, you can read it on the Coderline website in the Expert Articles section or watch webinar recordings. Now the databases are already configured this option. Therefore, go to the synchronization settings (Administration -> Data synchronization -> Data synchronization settings), click the "Load rules" button. We will see the form "Rules for synchronization". Click the "More" button and select the "Save rules to file" option.


Here is a package after unloading we should get.

We will perform similar actions for another information base "1C: Enterprise Accounting".
As a result, all the preparatory work for editing the rules is ready. We have:

Description of the metadata structure for loading into "1C: Data Conversion 2" (for ZUP and BP);

A conversion package that contains 1C exchange rules and registration rules required for uploading to 1C: Data Conversion 2 (for ZUP and BP).

Go to "1C: Data Conversion 2". Perform the following steps in order for both infobases:

Loading the metadata structures of our configurations;

We create conversions and load 1C data exchange rules from conversion packages (the rules file is called ExchangeRules);

Create registrations and load registration rules from conversion packages (rules file is called RegistrationRules).


We proceed directly to our refinement. We add a new object conversion rule (PKO) to the 1C exchange rules - the "Registration with the tax authority" reference book. We add a property conversion rule (PCS) for this directory and a data upload rule (PDS). This kind of refinement must be performed both for the rules from the ZUP package and for the exchange rules from the BP package. We unload our exchange rules into the corresponding files ExchangeRules.

Let's move on to the rules for registering a new element. We add the reference book "Registration with the tax authority". Upload the registration rules to the appropriate file from the RegistrationRules package. This action is also performed for both bases.

Modified exchange rules and registration rules are ready. Now we copy the contents of the exchange rules (ExchangeRules) from the BP package into the correspondent rules (CorrespondentExchangeRules) from the ZUP package. In the correspondent rules (CorrespondentExchangeRules) from the BP package, copy the contents of the exchange rules (ExchangeRules) from the ZUP package.

The result should be the following:

This completes the work in "1C: Data Conversion 2". The modified packages of conversion rules are ready, it remains to upload them back to the infobases and check the synchronization.

Archive files from packages to ZIP archive and upload our conversion packages to ZUP and BP.

Everything is ready. It remains to be tested.

Let's remember the conditions of the problem. It was necessary to register for unloading the directory "Registration with the tax authority" and check how the PM of the document "Reflection of wages in accounting" is filled out on the side of "1C: Enterprise Accounting 3".

In the source "1C: Salary and Enterprise Management 3" we register our directory for unloading. We perform synchronization. We go to the receiver database and also perform synchronization to receive data. Please note that now the necessary directory for registering changes has appeared in the exchange plan.

We check on the side of "1C: Enterprise Accounting 3":


Summarize. The result of the task was completed successfully. We have finalized the plan for the exchange of ZUP - BP, adding a new element for registering changes and completing the conversion rules for data synchronization.

Probably, every 1C specialist faced the situation of the need to transfer data from one infobase to another. In the case when the configurations are different, you have to write data conversion rules. These rules are created in the 1C "Data Conversion" configuration.

You can also transfer data using . Many 1C 8.3 configurations have standard functionality for setting up data synchronization between different configurations and seamless integration with 1C Document Management.

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

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

It is universal and suitable for any configuration.

Consider an example of unloading the "Nomenclature" directory from one 1C 8.3 Accounting 3.0 infobase to another. A prerequisite there will be a selection by the parent (group) "Woodworking".

Uploading data from 1C to XML

Go to that information base, from where the data will be unloaded (source). Be sure to check them, providing for all possible conditions in order to avoid undesirable consequences.

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

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

In the processing header, the period for which the selection will be carried out is configured. Also, for periodic registers, you can specify the method for applying selection by period. If it is necessary to upload movements along with documents, the corresponding flag is set. In this case, we are overloading the directory, so nothing needs to be configured in the header.

Let's move on to selecting the data to upload. In the tabular part of the processing form, check the boxes 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 nomenclature you are reloading has a unit of measure that is not in the base-receiver. If the flag in the column "Upload if necessary" is set opposite the reference book with units of measurement, a new position. AT otherwise as the value of the attribute will be the inscription "<Объект не найден>' and its unique identifier.

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

AT this example you need to select only the nomenclature that is in the "Woodworking" folder.

Similar processing for 8.2 allows you to conveniently set filters for each configuration object. In 8.3, unfortunately, there is no such functionality. One of the ways out in this situation is to select the necessary positions on the "Additional objects for unloading" tab.

You can add objects here either manually ("Add" button) or by request ("Add by request..."). With a large number of them, the second option is preferable.

In this case, the query will be as follows. Fill in the parameters, run the query after checking the data, and click on the "Select result" button.

After you have specified all the necessary objects and additional elements To upload, click on the "Upload data" button. They will end up in the XML file, the name and location of which were 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" reference book in the "Upload if necessary" column. Together with the necessary positions, their parents were overloaded.

Loading a reference from XML

After successfully uploading data from the source configuration to an XML file, open the destination database. The structure of objects and their attributes must match. In this case, the transfer is carried out between two typical 1C: Accounting 3.0 configurations.

Open the processing in the receiver base. This processing used for both uploading and downloading data. Go to the "Upload" tab and specify the path to the XML file into which the data was uploaded earlier. Then click on the "Upload Data" button.

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

The reference book "Nomenclature" in the base-receiver was not filled. Now it has five elements: three item positions and two groups.

2018-11-15T19:32:35+00:00

Universal processing "Unloading and loading XML data" performs full or partial unloading of infobase data into a file in XML format. Subsequently, this file can be loaded into the infobase using the same processing. The upload file format differs from the file format created when uploading according to the exchange plan by the header part.

Processing can be used only in cases where the infobase in which the data was uploaded and the one in which the data is uploaded are homogeneous (the configurations are identical, the data may differ), or all uploaded objects are almost completely identical in composition and types of details, and tabular parts, properties of the "leading" metadata object, and so on.

The use of this processing is possible, for example, to create a complete or partial backup data, data exchange between infobases, as well as an auxiliary tool for restoring failed infobases.

Processing supports data upload with the ability to set the selection by period. Also implemented is checking objects for invalid characters when exchanging via XML.

Sincerely, (teacher and developer).

Send this article to my mail

The main reasons for the need to introduce an exchange between 1C databases are the presence of branches and the separation of types of accounting, tk. companies often work in several infobases. Setting up the 1C 8.3 exchange allows you to eliminate double work - entering the same documents and directories in two programs, as well as quickly supplying the necessary system objects for various branches and departments.

In the case when it is necessary to exchange between branches, RIB (Distributed Infobase) is used. It is a mechanism for exchanging between identical configurations. It is a tree, on top of which is the most important root node, below a pair of interconnected nodes. Changes can be made at any node in this system, and they will be propagated to other related nodes. It also distributes not only data, but also configuration changes from the root node to subordinates.

If it is necessary to separate the types of accounting, for example, maintaining an operational one in the trading base, and regulated - in the accounting one, universal mechanisms for exchanging with flexible settings data synchronization.

One of the latest developments in 1C is the EnterpriseData data exchange format. It is easy to use and is intended for exchange within the company both between 1C databases and third-party programs.

The implementation of data exchange in the enterprise can be represented as sequential procedures.

First of all, it is necessary to determine between which bases there should be an exchange; will it be a two-way or one-way exchange; if one-way, then which base will transmit information, and which will only receive; if this is a complex branch network, then it is necessary to prescribe a scheme for building databases.

Then choose the appropriate format: RIB, universal format; exchange according to the exchange rules; exchange without exchange rules.

The next step is to select the transport to perform the exchange. A wide range of technologies is available, we will highlight the main ones: directory (local or network), FTP resource, COM connections, web service, e-mail.

The fourth step will be the definition of data: documents, directories and, if necessary, detailing to their individual details to be transferred.

And in conclusion, a schedule for the frequency of the exchange is prescribed

Each option for setting up the exchange 1C 8.3 requires careful preparation. Its implementation is beyond the power of every user, here it is necessary to take into account many nuances and understand the principles of the exchange. Particular attention will need to be paid to setting up if the bases: contain improvements or a lot of extras. requisites, differ in platform versions or are used outdated versions configurations, the enterprise is large and uses automated system, consisting of a large number bases Mistakes are not allowed here, because may lead to irreparable consequences. Independent implementation of the exchange in 1C is recommended only if you need to set up a simple transfer of information between typical configurations.

If you doubt your abilities, it is better not to save money, but to contact a competent specialist who will help you solve the difficult task of setting up 1C 8.3 exchanges.

If you still decide to configure 1C exchanges without involving experts, it is recommended that you first test on copies of the databases, and before starting work in the working databases, upload the configurations so that you can return to the original state in case of errors.

Below we give a detailed example of setting up the 1C 8.3 exchange unilaterally between the typical configurations Trade Management 11 (UT) and Enterprise Accounting 3.0 (BP). The example is relevant for many companies leading wholesale and retail trade. In UT, management accounting is maintained, in BP - regulated, the exchange is necessary to facilitate the work of users.

This algorithm is also suitable for other typical configurations on the 1C 8.3 platform

First of all, we will carry out preparatory work for the information receiver, i.e. for BP. Run the program in Enterprise mode. You need to set the Data synchronization constant (section Administration → Data synchronization).

Pay attention to the Prefix field, here you need to specify a value that will later allow you to distinguish (by the value of the reference code or document number) in which program the objects were originally created. In our example the usual one will do abbreviation - BP and UT, if the exchange setting 1C 8.3 is performed for a complex exchange between large quantity bases, as well as identical configurations, each base will need to enter its own understandable designation.

Since the PSU is only a receiver of information, we proceed to setting up the UT.

Here, as well as in the BP, you need to enable synchronization and specify a prefix. This information is available in the section Master data and administration → Data synchronization settings.

Select the setting method Specify settings manually. Further.

Set the direct connection option when both programs are located in the same local network, specify the parameters for connecting to the IS directory in this network, and also fill in the authentication information about the user (in the BP database). Further.

The system will check the correctness of the specified data and in case positive result will display the exchange settings window 1C 8.3.

The Edit data upload rules link provides settings for performing the exchange. We will make clarifications of NSI - upload only those used in documents, select organizations and the option of working with contracts - without linking, separating documents by warehouses. The exchange starts on March 1 of the current year.

The introduced rules are recorded and closed.

Since the example is about a one-way transfer of information, in the next settings window, to receive data from another program, set the values ​​to Do not send. Record and close. Further.

Now you need to check the entered parameters and if they are correct, click Next, otherwise return to the previous step by clicking Back.

You will then be prompted to sync. Click Done.

If it is necessary to correlate identical objects of two configurations, a window for data comparison will open. Perform the mapping and click Next.

When you transfer objects, you may experience problem situations, you can view the results by clicking the Data Sync Warnings link.

After the synchronization is completed, a window will be displayed confirming the successful completion of this process.

Here, using the Configure command or after, in the synchronization script, you can configure the schedule automatic execution exchange.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!