Re: Create calculated Table in Script with allocation keys
I don't think the T1_Key value is precalculated in the script. There is a SET statement in tab Keys, but that doesn't do anything except setting a variable to a string value. The actual calculation will be done in the Pivot Table object.
I think the best way to approach this chalenge is to copy fields Valuehome, E14 and Docdate of all rows from PL10110_Umsatzbuchungen into a new table in your script. Then create a mapping table that maps E14 to CODE_H_CODE in Fire.xls_Budgetgruppen. Now add CODE_H_CODE to your new internal table. You may have to drop all rows that have no mapping, but that depends on which transactions should be included in your table.
Then perform a RESIDENT LOAD of Sum(Valuehome) with a GROUP BY on CODE_H_CODE and your preferred translation of Docdate (MonthYear or something).
Next calculate a variable that sums the value of Valuehome in all rows. Call it vTotalSum.
Reload your new table and add ValueHome / vTotalSum as T1_Key.
Is this something you can work on? If not, just ask. I don't have enough information (or data, or time) to do it myself in your document, but it doesn't look that difficult.