|
Merge Function: Mix Data of Two Satellites |
|
SATxx_MERGEyy
* Available from Allevo version 3.4
Background: when reading data from satellites, it may be useful to mix contents of various tables. Example from COPA planning:
· A satellite 02 contains COPA plan data; sales defined by a non-SAP system should be the basis for this planning (and be available e.g. in satellite 01).
· During the ongoing planning via Sat02, updates from the non-SAP system may occur (i.e. for Sat01). These data should now be available also for further planning in Sat02, without that current data are being overwritten.
· This means that, when reading Sat02, only contents of certain columns may be replaced by data from Sat02.
This function is realized by constant SATxx_MERGEyy, with “xx“ and “yy““ serving as placeholders for the involved satellites:
· “xx“ stands for the number of the satellite read in Excel and
· “yy“ for the satellite containing the additional data.
The constant is established as follows:
· The target satellite (here “02“) must be active also in the layout via constant ACTIVE_SAT (note: if master data are loaded in Sat01 via Shuttle, also Sat01 must be active at least in the * layout).
· Entry of constant SATxx_MERGEyy in the current layout with specification of the relevant satellites; e.g. SAT02_MERGE01 for the example above.
· Column Value from must contain a list of fields describing a satellite row as central characteristics (comma-separated). These comparison fields serve to identify a suitable row in Sat02 for a row in Sat01. If these fields are not unique, possibly multiple rows of the target table will simultaneously receive an update.
· Column Value to must contain a list of fields that shall receive an update in the target satellite (while reading the target satellite, contents here will be overwritten by data from the second satellite).
Example for concrete entries:
· Comparison fields Value from: “ZBUKRS,ZVKORG,ZSPART,ZARTNR,ZKNDNR,ZVVIQT_ME“
· Update fields Value to: “ZSALES_QTY,ZGROSS_REV,ZDIR_SALES_COSTS,ZVV150,ZVV160“
Further information on the application (named are satellites as in the example above):
· It is recommended to set up the append of both satellites in the same way. At least the fields entered in the constant must be included in both satellites.
· If the source table (here Sat01) contains rows that are not yet available in the target table (here Sat02) corresponding to comparison fields in “Value from“, another row is automatically appended in the target table (Allevo automatically generates a new row number).
· If the target table is empty (e.g. during the first call), all rows are automatically copied from Sat01; they are thus newly created in Sat02 and transferred to Excel including these initial values.
The Merge function is executed internally in Allevo, after reading data from the satellite but prior to the Badi event AFT_RD: a subsequent customer-specific extension is therefore possible.
|
Note: |
Constant SATxx_MERGEyy appears in the F4 selection aid for constants but must be set up with the desired characteristic (e.g. SAT02_MERGE01 as in the example above). It is also possible to adopt data of multiple source satellites subsequently in a satellite; possibly, the constant must then be created repeatedly; e.g. via SAT10_MERGE01 and SAT02_MERGE01 in order to fill Sat10 with data from Sat.01 and Sat.02. |