cancel
Showing results for 
Search instead for 
Did you mean: 

FOX Formula - Using an attribute KF in the code? + Value of 0FISCPER?

former_member192555
Participant
0 Kudos

Hello,

So right now it is possible to have characteristics as key figures such as comments, dates and other chars info object. Is it possible to use the in the code? Probably not?

For example, I want to enter certain purchases and then based char KF type 0fiscper select in which month they should be capitalised/aggregated.

The workaround is by using standard KF in format YYYYMMM and some offsets using TMVL.

Second question:

Is it also possible to retrieve the value of 0FISCPER directly:

FISPER_VALUE = ATRV('0FISCPER',PERIOD_VAR).

I've managed to retrieve 0FISCPER3 and 0FISCYEAR values and work from that to get the value in YYYYMMM format.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Emiliyan,

you have to be clear about the data model used:

1 InfoCube or cube-like advanced DataStore-Object: all characteristics are key

2 DataStore-Object or advanced DataStore-Object with explicit key definition: characteristics may also be non-key fields.

The 'characteristics as key figure' feature allows to expose characteristics A as a key figure 1KYF_A in case 2. Thus such a characteristic A really can be treated as non-key field (e.g. no drill-down by A, no group-by in DB access etc.).

Technically, 'characteristics as key figures' are transported through the software layers using SID values, this is the reason why (at least not yet) all planning function types support this feature: FOX does not support this as one would need language extensions for this, e.g. set/get values of 1KYF_A without using SIDs.

Though also not officially supported you may use your own planning function type work with 'characteristics as key figures' but you have to do the SID <-> characteristic value conversion and to ensure that the SID values used always correspond to existing master data values!

Without characteristics as key figures a characteristic is always 'key'; in this kind of data model changing a 'key' (as your 0FISCPER) always leads to a different/new record, this is not the usual way to change 'attribute-like' characteristics (as e.g. data fields in DataStore-Objects); one would have to use an InfoCube or cube-like advanced DataStore-Object. In the latter case you can access the field as always in FOX (cf. the documentation in the FOX editor).

ATRV() is used to access master data attributes, this is another story.

Regards,

Gregor

Answers (1)

Answers (1)

former_member192555
Participant
0 Kudos

Thanks Gregor for the explanation.