Skip to main content

Opening RPF Files

In Dynamics AX 2012, we have this concept of pushing and pulling the data for Retail between Head Office and Store.

The data is written in XML form, compressed into an rpf file then saved to a working folder. These rpf files or data packages can be opened using DDPackView.exe which is available if you install Async Server (Head Office) or Async Client (Store).

You may find it in:
C:\Program Files (x86)\Microsoft Dynamics AX\60\CDX\Async Server\Package

If you execute it from here, you will need to specify the actual rpf file you want to check and click Convert. You might encounter an error:
Could not load file or assembly 'Microsoft.Dynamics.Retail.StoreConnect.RequestHandlerManager, Version=6.3.0.0, Cuture=neutral, PublicKeyToken=xxxx or one of its dependencies. The system cannot find the file specified.

Usually, I just copy the following in the same folder of DDPackView:
  • DDPackView.exe.config
  • Microsoft.Dynamics.Retail.EventTraceProvider.dll
  • Microsoft.Dynamics.Retail.StoreConnect.Request.Compression.dll
  • Microsoft.Dynamics.Retail.StoreConnect.Request.Interface.dll
  • Microsoft.Dynamics.Retail.StoreConnect.Request.RequestHandlerManager.dll
And the RequestHandlers folder which contains:
  • Microsoft.Dynamics.Retail.StoreConnect.Request.Base.dll
  • Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.dll
You may find all of these from the CDX\Async Client\Package folder. 

I usually have a handy copy of these because it's just easier that way, you may download it from here. Mind you, it's R3 CU8 version - not entirely sure if it will work on other versions, but I think it will.

Anyway, if you're successful with the conversion you should be able to see something like this:

This is an RPF file of a full sync 1000-Currency job. So if you are going to check the Scheduler job for 1000, every subjobs here has its corresponding xml file:

And if you are going to open the those ax.XXXX.xml file you will find the data that will be transferred. I think it's worth mentioning the transfer field list of the Scheduler sub-job should be the same from what is generated:

Also, if you are going to check the Data output class of the Retail channel schema, which in this case is RetailCDXXmlDataOutput_AX63, you will find a method there with name Currency.

The data output class is responsible on the writing of the xml file, however if you want to customize this, know that this is not where you do actual filtering of what record should go into the file - maybe I'll discuss it in another post.

Anyway, going back to the actual converted rpf file, you will find there the file SCTargetRequest.xml. If you open this one, you should be able to see something like below. I highlighted the things that really matters to me: DeleteRequest, AttachmentFileList, WriteRequests


As I have mentioned, this RPF file is generated via Full Sync. If it is a full sync, the whole data in the table (of the RetailChannelDB) will be deleted. As you can see, there is no FilterConditionList which means it will delete everything. After which, we insert whatever data is indicated in the AttachmentFileList.

Just to give you an example how it is if it's just a regular sync, I created a sample currency then run a distribution schedule for 1000-Currency:

There is no delete request, however there is 1 attachmentfilelist and a write request for Currency target table.

If I deleted the sample currency that I created and run a distribution schedule job again, here's the targetrequestheader. There is a delete request for Currency table and this will be deleted based on Primary Key which is the Currency Code.

Anyway, that's it for today. I hope this helps somehow.

Comments

Popular posts from this blog

Importing Retail Transactions from POS to AX

Hi, regarding the synchronization of retail transaction from stores to HO, I received some inquiries what are the alternatives when there is an issue in the store that will prohibit Async Client from sending data to HO – for example, network issues, hardware failures. Well, there is always the ever helpful DMF entities . It is limited – however, the 3 main tables needed to successfully Calculate Statements every end of day are all provided as standard entities. If you are using the demo data from Contoso, chances are you will not be able to see these entities. However, go to Data import export framework à Setup à Target entities , just click New and drop down to Entity field and select as what has been provided above. This should automatically populate the columns Staging table , Entity Class and Target . Note : If you have a legacy POS with transactions which you want to integrate with AX, you can just use this and just make sure that it will follow th

Synchronizing Retail Transactions from Store to Dynamics AX

Hi, In my previous post, I have discussed about the details of downloading data from Head Office to Retail Store. Today, let’s discuss the process of synchronizing transactions from Retail Stores to Head Office. In a hindsight, the Async Client service in store is responsible in creating the RPF files and saving it in the Upload File Path Working folder . The RPF files of the retail transactions are created every interval as specified in the Async Client Configuration . Running the P-Job is unnecessary to create the RPF files, what we need is a secure connection between Async Client and Async Server every upload interval. Basically, the P-Job is for importing the transactions from the Upload Working Folder to Dynamics AX. So how does the Async Client know which record to include in every creation of RPF files? In AX 2012 R3, the Channel Database is maintaining the table called crt.TABLEREPLICATIONLOG . This table contains the following field: FIEL