Standard exchange rules. Management organization in UT

And we show how with its help STRONGLY simplify the solution of your tasks

Today we will analyze how to set up and make a simple transfer of directories and initial balances.

And this is bulk and regular task, which is almost inevitable for most new configurations being launched.

Therefore, call your colleagues, it will also be very useful for them.

Especially if they have already seen CD 3 and got scared :)

Yes, when you see her for the first time, it’s not clear at all.

But in fact - everything is VERY simple. So simple that you will even get bored later :)

What exactly is in today's videos

These are 4 videos on sharing data via universal EnterpriseData exchange format.

In addition, we will show an example refinement of standard exchange rules in 1C: Data Conversion 3.0

Total duration - 34 minutes. Content:

  • Setting up an exchange using the example of 1C: Accounting 8 and 1C: ERP
  • How to download model rules and universal format exchange in Data Conversion 3.0
  • Transferring the metadata structure to CD 3.0
  • How to perform the first exchange of data
  • Refinement of the rules conversions
  • How to load new rules without changing configuration ( without withdrawal from support)

note that when solving this problem, the loading rules change only in the receiver configuration. And the source configuration works according to standard rules.

If such a task were solved in Data Conversion 2.0, then changes would have to be made in the rules of both the source and the destination.

These video tutorials are relevant for BSP revision 2.3.2(for any build older than 2.3.2.43).

If you are using an older version of BSP,0 make a "correction" for the changed interface and extended functionality. To do this, repeat the example from the video yourself.

Video 1:
Loading exchange rules between typical configurations in Data Conversion 3.0

In this lesson, we will perform preparatory actions when making changes to the exchange rules between typical configurations:

  • Loading the structure of the exchange format into the CD (
  • Creating a conversion
  • Uploading rules files from a typical configuration
  • Unloading the exchange manager module

Video 2:
Refinement of exchange rules in CD 3.0

In this tutorial, we'll show you how to fill in the details of objects when loading data.

The task will be solved - when loading objects from the source configuration, set the comment “Loaded from BP 3.0”.

To solve the problem, you need to make changes in object conversion rules, in the event “Before writing received data”.

The developed rules will be saved as external processing for future use.

Video 3:
Setting up a universal exchange between typical configurations

In this tutorial, we'll show you how to set up a new type exchange.

The settings will be made in the source configuration and then loaded into the destination configuration.

Also in this video we'll show you how without changing the configuration upload new exchange rules.

Video 4:
Transferring opening balances using exchange rules

In the lesson, we will show a typical functional for transferring initial balances.

P.S.

Yes, exchanges via txt / dbf / ole etc. have the right to exist. In some special cases, such as docking with a web server or transferring from a ready-made external application format.

However, for standard exchanges - standard methods are both faster and much simpler.

And if someone reinvents the wheel when there is a ready-made universal solution - it’s like writing on your forehead “I don’t own an instrument, I don’t want to learn, I will build crutches for your money” .

P.P.S.

We want to show that Data Conversion 3.0 is not difficult.

Unusual - yes. Not everything is immediately clear - yes. There are very ambiguous moments - yes.

But with the help of ready-made instructions and videos, it can be mastered in just 1-2 weeks.

If you exchange data between Trade Management 10.3 and Enterprise Accounting 2.0 configurations, then after updating one of the configurations, you must update the exchange rules.

Consider the case when the exchange was configured from the Trade Management configuration and configured through a direct connection to the receiver base, i.e. accounting. You need to upload new rules through the data exchange settings in Trade Management. It is highly recommended to do bases before doing this.

Zauskaem 1C Trade Management 10.3. Select the item “All communication settings” from the menu Tools => Other communication.

Select the "All exchanges" section. We find your data exchange in the list, right-click and click "Edit". If you try to change the exchange settings from the “Data exchange with 1C: Accounting 8” section, then when you try to change the data exchange setup assistant, which we do not need, will be launched.

In the window that appears, we see that the exchange takes place according to the exchange rules, which can be saved and loaded. The rules for uploading to the exchange database are the rules by which information is uploaded from the Trade Department to the Accounting Department, and the rules for uploading from the exchange base to the current database are the rules by which information is loaded from the Accounting Department to the Trade Administration.

Upload the upload rules to the exchange database. Click "Load rules from file". Attention, if you have a non-standard configuration and you are not using model rules exchange, i.e. designed specifically for your modified configuration, then you should contact the specialists to create new rules based on the existing ones.

In no case do not replace them with standard rules. If you are not sure that you have typical configurations, just in case, save the existing rules with the “Save rules to file” button.

Since the latter came out much later than the update for Trade Management, we are looking for exchange rules in the catalog of 1C update templates for Accounting. You can find the update template directory as follows. We start 1C and click "Settings". In the window that appears, we see the path to the directory of configuration and update templates.

Let's go down this path. Next: 1C=>Accounting and select the folder with the name of the last installed release of Accounting. If the rules need to be taken from the “1C: Trade Management” configuration update, the folder will be called Trade. For the "1C: Retail" configuration - Retail. It contains the "Data Exchanges" folder.

Further “Exchange with Trade Management configuration, rev. 10.3". In it we see RULES OF CONVERSION BP-UT and RULES OF CONVERSION UT-BP. Since we need the rules for unloading from UT, select “UT-BP CONVERSION RULES” and click open. We do the same for the rules for uploading from the exchange database to the current database, just select the BP-UT CONVERSION RULES file and click open.

In the folder “Exchange with Trade Management configuration, rev. 10.3” is the Sharing.htm file. If you've never read it, you should definitely read it. It contains the following useful information:

  • Sharing purposes
  • general description
  • Migration from previous versions of bidirectional communication
  • Preliminary actions
  • How to set up communication between configurations
  • Data synchronization
  • Joint operation of the configurations “Trade Management” and “Enterprise Accounting”
  • Examples of user scenarios
  • Correspondence table of uploaded documents UT - BP (version 1.6, edition 2.0) Correspondence table of uploaded documents BP (version 1.6, edition 2.0) - UT
  • Features of unloading documents and directories
  • Correspondence table of unloaded documents BP (version 1.6, edition 2.0) - UT
  • Transfer of documents “Invoice for payment to the buyer” and “Order of the buyer”
  • Postponing the cost of writing off goods
  • Monitoring the results of data exchange

We check the rules with the check buttons. And click OK. The new rules have been saved. We start the data exchange and check their work.

How to set up two-way data exchange between Trade Management 10.3 and Enterprise Accounting 2.0 configurations is written in my other article.

Tutorial on 1C Data Conversion (edition 2) Detailed acquaintance with the exchange rules

We know what exchange rules are and why they are needed. Let's get acquainted in more detail with the additional functionality of working with exchange rules. Let's open the settings for data exchange (conversion) rules:

The exchange rules define the source and destination configurations for data, in addition:

Tab "Advanced":

You can specify the default file name for saving the exchange rules, modules for uploading and downloading data for 7.7, the name of the exchange rules.

"Parameters" tab:

Suppose the office accepts orders exclusively for goods, so it is desirable to establish a ban on unloading services. If the item of the catalog Nomenclature has the requisite Service set to True, then it is guaranteed not to be unloaded. It is best to make control of unloading services optional immediately so as not to change the rules in case remote office will take orders for services.

For this case, we will have to learn two new tricks for working with the "Data Conversion" configuration - using handlers and setting parameters.

Parameters are a specialized data structure in upload algorithms that can be used to access processing variables. Setting the structure of parameters for conversion rules is carried out in the "Data Conversion" configuration, and setting parameter values ​​is possible in the form of processing data upload and download.

To edit the parameters, open the form of the element of the Conversions directory for editable exchange rules and go to the parameters tab. Let's create a new element of the Parameters directory. Let's assign the name of the parameter - Unload Services. The parameter name is used to refer to it in the Parameters structure when writing program code in handlers. The name will be displayed in the tabular section of the Parameters in the form of processing the universal data exchange. In order for the parameter to be visible in the dialog when setting up unloading, you need to check the "Set in dialog" box and select the type of parameter value. To work with parameters in the dialog, you must also check the box "Upload parameters in version 2.01 format" in the form of an element in the Conversions lookup.

It is not enough just to specify the parameters, it is necessary that the unloading algorithm "understand" in which case to unload the element, and in which not. For such (and many other) cases, the handler mechanism is used. Its essence lies in the fact that at the key points in the execution of all the basic algorithms for uploading and downloading data, the code written by the developer when creating the exchange rules is processed. Naturally, the use of such a delicate tool requires caution and thoughtfulness. Before writing your own handlers, we recommend that you carefully read the help for the "Data Conversion 2.0" configuration, which describes all the variables available in the handlers and how to use them, as well as lists the types of handlers and the features of their call in data exchange algorithms.

For our purpose, we need to use the "Before Unload" unload rule handler. Open the Nomenclature data upload rule and place the following program code in the "Before upload" field on the "Events" tab:

What does our handler do? When writing the program code, we used the variables of data unloading algorithms. The Parameters structure is used to refer to the UploadServices parameter, which is set in the data exchange processing form. The object variable provides access to the object being unloaded. And the Refusal variable allows you to control the refusal to unload the current object. The handler is executed just before the object is unloaded, which makes it possible to cancel the unloading of the object.

ONLY FOR EXCHANGE V8 - V8 AND PROCESSING DOWNLOAD AND DOWNLOAD NOT BELOW 2.0.18.1

It is possible to pass parameters from one configuration to another. To do this, on the "Parameters" tab, check the box "Transfer parameter when unloading" and this parameter will be placed in the exchange file and its value can be accessed when loading data. You can specify a conversion rule for a parameter, according to which the values ​​will be converted. Using the "Transmit parameter when uploading" checkbox, you can only transfer those parameters that are edited in the dialog when uploading data. If you need to pass a parameter that is not present in this dialog, then you need to call the procedure:

The Unloading parameters tab now has a parameter, changing the values ​​of which services are either unloaded or not unloaded.

Many entrepreneurs who trading activity, to improve management efficiency, they purchase two programs "1C: Accounting 8" at the same time (hereinafter BP) and "1C: Trade Management 8" (hereinafter UT).

BP is used for maintaining regulated accounting and reporting, and UT - for operational and management accounting in company.
The success of sharing these software products largely depends on the organization of data exchange between the BP and UT configurations.

Understanding the following features of typical data exchange will help to avoid errors in the process of exchange between configurations and accounting violations in each configuration separately.

When writing this article, materials from the 1C documentation for software products were used. In detail, the exchange setup methodology is described in the htm-file “Sharing configurations of Trade Management (11) and Enterprise Accounting”, which is located in the template directory when installed as 1C: Accounting 2.0 (hereinafter BP), and 1C: Trade Management 11 (hereinafter referred to as UT); recommendations received at the partner conference 1C and personal experience the author on creating and changing exchange settings for clients of RG-Soft Project Consulting LLC.

1. Set up one-way or two-way exchange.

First of all, it should be noted that only documents related to cash and non-cash transactions can be uploaded from the BP configuration to the UT configuration. Money. These include: Incoming cash order, Outgoing cash order, Receipt to the current account and Write-off from the current account. Goods movement documents created in the BP will not be uploaded to the UT.

Firm 1C recommends making an exchange with a bank in UT. “This will ensure full-fledged work with outgoing payment documents and more simple job with incoming documents. However, there was a situation when it was not possible to upload almost a single payment order from the client-bank file to the UT, while this file was completely uploaded to the BP.

This is due to the fact that more stringent checks on the content of the client-bank file have been added to the UT, for example: checking the completion of the TIN, checking the document number, the number must contain only numbers in accordance with the regulation of the Central Bank of October 3, 2002 N2-P "On cashless payments in Russian Federation(as amended March 3, 2003, June 11, 2004, May 2, 2007, January 22, 2008).

Setting up a one-way exchange (from UT to BP) makes sense only if all documents and reference information are filled in UT. Thus, duplication of elements in this database can be avoided.

To do this, you need to configure the following exchange scenario: create an exchange scenario in the UT configuration, in which only the unloading is saved (Fig. 1), in the BP configuration, create an exchange scenario and save only the download.

It must be taken into account that in such an exchange scenario, all additional documents and directories created in the BP will be registered for exchange, but will not be loaded into the UT, so it is recommended to periodically reset the registration, otherwise the exchange message file from the BP will constantly increase, slowing down the exchange process .

For this, it is recommended to use processing RegisterChangesForExchange82.epf, which can be found in the configuration delivery "Data conversion, rev. 2.1". After the configuration is installed, the processing is located in the update installation directory: ...\1c\Conversion\...version_number…

If the regulatory and reference information is filled in both in the UT and in the BP, then two-way exchange should be configured, but it may be necessary to track duplicates by starting the exchange in interactive mode instead of automatic (Fig. 2).

In order to limit data exchange only at the document level, it is not necessary to configure one-way exchange, it is enough to set a date in the exchange filter on the BP side that is greater than the date of the last document (see Fig. 5). But before setting the filter on the date, you need to make sure that the documents in the BP were not previously registered for exchange, otherwise the registered documents will be transferred to another database during the exchange.

Data Change Priority

If the exchange is first performed in the UT, and then in the BP, then the data downloaded from the UT will have priority. For example, in the UT they entered the document “Receipt to the current account”, launched the exchange first in the UT, then in the BP - the document appeared in the BP configuration. Then the accountant in the BP configuration made changes to this document. During the subsequent exchange, if the order of launching the exchange has not changed, then the changes made to the document will be overwritten by data from the UT.

For the correct exchange with those objects that are changed in both databases, 1C recommends organizing work so that the object is edited only in one of the databases. In another database, such an object should be opened only for viewing. To do this, you will need to use the setting of user access rights, but this approach guarantees the absence of collisions during the exchange, i.e. discrepancies that arise when an object changes in one or the other database, during the period between exchanges (Fig. 3).


2. Differences between BP and UT affecting metabolism

Counterparty agreements

In the UT configuration, there is no analytics for contracts of counterparties. All operations that are carried out in the UT configuration, when loaded into the BP configuration, are always executed under separate agreements created and controlled by the UT system itself.

If there is no contract with the required parameters in the BP configuration, then such a contract is created. It should be noted that the search for an agreement is carried out only from the number of agreements previously downloaded from the UT.

Management organization in UT

Starting from release 11.0.6.9, the predefined element " Management organization". This element must not be mapped to (or changed from) the current (single or one of) organization. You can read more about the use of this object in the documentation file "Changes and additions to documentation.htm" included in the delivery of UT.

Company structure

In UT for management accounting, the directory "Structure of the enterprise" is used, which contains a list of company divisions. When drawing up documents, the indication of the division of the enterprise is mandatory.

The elements of the "Enterprise Structure" directory are not mapped to the elements of the "Organization Units" directory in the BP. In order to prevent documents with an empty Subdivision attribute from being uploaded to the UT, it is necessary to fill in the default value in the exchange settings (Fig. 4).

Warehouse in the tabular section

If it is planned to use in UT new opportunity specifying warehouses in the tabular sections of documents, then in the settings of the exchange plan node it is necessary to set a generalized warehouse, which will be substituted when unloading documents from the UT to the BP configuration instead of the warehouses allowed for selection in the tabular parts of documents (Fig. 4).

Item type

When uploading data from the BP to the UT, the “item type” attribute is not filled in the nomenclature, this is due to the fact that the exchange serves the scenario when the nomenclature is created in the UT configuration, and not in the BP. There is no separate tabular section for accounting for services in the goods movement documents in the UT (services are filled in the goods table), therefore, in order for the services specified in the UT documents to be correctly transferred to tabular part in BP, you need:

1. In the reference information section, open the “Types of item” reference book, go to the “services” item view - click “All actions” - enable editing and select Item Type - Service.
2. Change the item (service) - click "All actions" - allow editing and select this Item type with the Service type.

3. Setting up exchange filters (Fig. 5)

Changing the date of uploading (downloading) documents

1) Before moving the date forward, it is necessary to synchronize the databases by performing an exchange session so that the node does not have documents registered for exchange at the time the setting is changed. Otherwise, such documents, after changing the settings, as a result of unloading, may become marked for deletion in the receiving database, if they were previously uploaded there.

2) You can move the date back, because it only expands the area of ​​the uploaded data. It is worth noting that in this case, documents from a previously closed period will not be automatically registered for exchange. In order to do this, you must either change the documents, or use the processing RegisterChangesForExchange82.epf.


Filter by organizations

Enabling this filter allows you to limit the list of organizations for which data exchange is allowed. The presence of the enabled filter affects both the unloading of the directory of organizations itself, and the unloading of other data related to organizations (directories and documents).

The principle of operation of the upload filters is as follows: the new settings apply to all data - at the time of the exchange creation, or only for those data that have been changed after the application of the new settings - after the exchange has been created, therefore it is recommended to approach the filter settings as responsibly as possible when creating the data exchange .

Example: when creating an exchange, the user set a filter by organization. Only data for the specified organization was uploaded to the receiving database. Further, the user decided that data on all organizations should be uploaded to the receiving database. But since the settings take effect only for newly changed data, the existing documents and directories will not be uploaded to the receiving database until the user makes any changes to them.

4. Removing objects from one of the databases

Mark for deletion

It is possible that the previously used element of the directory is not planned to be used for further accounting, and users consider it right to mark this directory for deletion. Objects marked for deletion do not participate in the exchange. This feature should be taken into account.

Removing duplicates

To remove objects that have arisen during the exchange of duplicates, we recommend using the processing Search&ReplaceValues.epf, which is located in the \1CITS\EXE\ExtReps\Unireps82\SearchAndChange\ directory on the ITS disk. And to check the correctness of the comparison of objects of two infobases, you can open the Information Register "Correspondence of infobase objects" and the entries in this register can be corrected manually. It is important to know that after deleting an object in one of the databases, the information register record will still have a match for the deleted object (broken link), you will either need to match another object or delete the record.

5. Additional settings

Cash flow items

To configure the UT, it may be necessary to put down the props “corr. account” for those items of cash flow that will be used and uploaded to the BP.

For BP configuration: you may need to enter the type of cash flow in the elements of the directory.

Users

Directory elements users can be transferred to another database if they are indicated as responsible in one of the objects participating in the exchange. For such objects, you will need to set permissions.

Base prefix and organization prefix

In UT, the prefix always has a fixed length and the separator (hyphen) "-". So if the prefix information base is not set or the organization prefix is ​​not set, it is replaced with zeros. However, when setting up an exchange, the infobase prefix is ​​always filled in on the CB (for UT) and on the BP (respectively for the BP configuration).

This solution is the standard for generating document numbers and object codes. The prefix has a fixed length and is separated by a hyphen from the document number. If in the future there will be several organizations in the database, then it will be enough to set prefixes for them and it will not be necessary to renumber all objects.

Error correction

In our article, the most important points organization of data exchange between "1C: Trade Management 8" rev.11 and "1C: Accounting 8" rev.2.0.

Specialists of RG-Soft Project Consulting LLC are ready to offer not only setting up the exchange for the accounting features of a particular organization, but also ways to correct errors in existing exchanges.

When developing 1C 8 exchange rules, the ability to programmatically redefine the behavior of exchange rules is widely used - the mechanism of handlers. Event handlers significantly expand the functionality and are an indispensable tool for setting exchange rules in cases where interactive configuration options are not enough.

Handlers and algorithms are written in the language of the platform in which they will be executed during the exchange.

If this is the "1C: Enterprise 7.7" platform, then the handler code is integrated into the upload or download processing code. Accordingly, each handler or algorithm is allocated to a separate function and is available for debugging during the exchange.

If the upload or download occurs on the 1C:Enterprise 8 platform, then the handler code is not integrated into the data exchange processing code, but is uploaded to the exchange rules file. In the process of data exchange, the code of handlers or algorithms is taken from the rules file and executed directly in the context of the "Execute" operator. To debug the code of handlers and algorithms, you can use the Universal Data Exchange XML processing.