Develop Write Back Support

IFS Business Reporting & Analysis services supports the write back of information from e.g. a client as IFS Business Reporter to IFS Applications.

Contents

 

Concepts

In order to satisfy the write back functionality two requirements must be fulfilled:

Two types of Write Back are supported:

Note: When performing write back in the IFS Business Reporter client, it is totally possible to retrieve data from one Information Source and then write modifications of that data back to IFS Applications using another write back Information Source. This leads to that the retrieved information in IFS Business Reporter does more or less never contain information about OBJID and OBJVERSION as in ordinary IFS Applications clients.

The General Write Back is probably sufficient to handle most part of write back scenarios. The IFS Business Reporter write back framework will never write anything directly to a table, it will rely completely on registered APIs that have the full responsibility to take care of the data, for e.g. reading, validating and processing.

The Write Back is mainly handled according to the following:

Entity Model

The entity model for write back looks as follows:

Figure 1: Entity Model

When IFS Business Reporter collects write back data, a server model called XlrWbCollection, based on the entity model, is created and sent back to IFS Applications.

The processing of the posted write back data must also make sure to set the status on Collection, Fact, Set and Row level.

When the processing of the posted write back data is complete, the response is collected in a server model, based on the entity model, named a XlrWbResponse and sent back to IFS Business Reporter that can present the result of the processing.

Comments:

If e.g. an error occurs on the set level for one of the sets associated with a fact, then the specific set will get ProcessedWithError status while the other data sets get ProcessedOk status. The fact and the response/collection level will in this case get ProcessedWithError status along with a message that says that, something is wrong on lower levels.

To make the status handling work, it is necessary to handle it correctly in the API that takes care of the write back. Especially applies for the Advanced Write Back case.

More details:

Errors found during processing can be handled either by stopping the processing immediately and reporting a general error on the highest level. In this case all data base changes are rolled back completely. Another option is to process all rows and keep track of the status for each processed row and reporting the status/result to the IFS Business Reporter framework. This case gets a bit more complicated since partial ROLLBACK has to be considered where all changes from last SAVEPOINT has to be rolled back.

 

About Modified Write Back

IFS Business Reporter supports write back by either performing a complete write back or a so called modified write back.

The first criteria to be fulfilled is that the Information Source supports modified write back. This is controlled by the attribute SupportModifiedWriteback in the enity XlrFactWriteBackInfo in the Meta Data. When this attribute has been defined as TRUE, it will be possible in IFS Business Reporter to handle modified write back.

The information about unique items in entity XlrWbItem is necessary to be able to handle the write back properly. The main problem is that the transactions represented in an Information Source always have a fixed lowest level while in a general client like IFS Business Reporter, it is possible to group these transactions in different ways, leading to a small problem; the write back information can be represented on a higher, aggregated, level than in the table that is the target. There are two ways of approaching this:

  1. The server code makes sure that the modified write back supplies enough values for each row, so that the write back is consistent with the target model in the target LU. If not this is the case, issue an error.
  2. Try to handle inconsistencies when it comes to how the written back information is grouped compared to the grouping level of the target model:
    1. For each set, find out which the unique items are (according to the sender)
    2. For each processed row
      1. Get the unique item values from the old write back row
      2. Delete information in the target table according to these values
      3. Insert the new values according to the new row

Implementation Details

More implementation details can be found on the Write Back Implementation Details page.

Implementation Example

One implementation example can be found on the Write Back Implementation Example page.