- Administration, Periodic, Data export/import, Definition Groups.
- Create new definition group (type: standard)
- Click 'Table Setup' button and add the tables listed below.
- Click Export on the 'sending' system.
- On the receiving system, choose Administration, Periodic, Data export/import, Import (you don't need the definition group)
The tables required are:
DimensionSetTable
DimensionSetRuleTable
DimensionPriorityTable
LedgerBalHeaderDim
LedgerRowDef
LedgerRowDefLine
LedgerRowDefLineCalc
LedgerBalColumnsDim
Addition: as noted by the comment to this post, LedgerRowDefLine can be problematic to move because of the ParentRecId field. The script below is one possible workaround. Just make sure that you don't have any data in the SourceRecId field.
static void NDPToolsPackRecId(Args _args)
{
LedgerRowDefLine ledgerRowDefLine, ledgerRowDefLineParent;
boolean pack = true; //run with true before export. run with false after import.
int i;
;
/*
The script to 'pack/unpack' the recid was straight forward. These are the steps to use it:
1. In this job, set the 'pack' variable to true and run the job prior to export in the source environment.
2. Do the export from the source environment using a standard definition group
3. Do the import in the destination environment.
4. In this job, set the 'pack' variable to false and run the job after import in the destination environment.
*/
ttsbegin;
if (pack)
{
while select forupdate ledgerRowDefLine
{
info (strfmt("%1 < %2",ledgerRowDefLine.SourceRecId,ledgerRowDefLine.RecId));
ledgerRowDefLine.SourceRecId = ledgerRowDefLine.RecId;
ledgerRowDefLine.update();
i++;
}
}
else
{
while select forupdate ledgerRowDefLine where ledgerRowDefLine.ParentRecId != 0
{
select firstonly forupdate ledgerRowDefLineParent where ledgerRowDefLineParent.SourceRecId == ledgerRowDefLine.ParentRecId;
if (ledgerRowDefLineParent)
{
info (strfmt("%1 < %2",ledgerRowDefLine.ParentRecId,ledgerRowDefLineParent.RecId));
ledgerRowDefLine.ParentRecId = ledgerRowDefLineParent.RecId;
ledgerRowDefLine.update();
//clear the temporary storage location.
ledgerRowDefLineParent.SourceRecId = 0;
ledgerRowDefLineParent.update();
i++;
}
}
}
ttscommit;
info (strfmt("%1 records updated",i));
Hello,
ReplyDeleteI want to refere this way will work in simple Row Definitions, but in complex one specially the one which has a ParentRecId value On the table LedgerRowDefLine that refer to another RecId on the same table, it will not work definitly.