cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically pass the current view member as property value for another dimension

Former Member
0 Kudos

Hi experts

We have a model where we have following dimensions.

FLZTYP => Here we have all the airplane types

FLZ => The single airplanes belonging to a FLZTYP (see below)

IDFLZTYP

(property)

123HC124HC125HC221HD222HD

We want to write a default logic, where it the script should read FLZTYP from the current view and post the amount to all the members of FLZ, when there is a posting to FLZ_NA

//HERE: "HC" SHOULD NOT BE HARDCODED. IT SHOULD BE TRANSFERED FROM THE CURRENT VIEW //DIMENSION FLZTYP.

*SELECT(%FLZ%,"[ID]",FLZ,"[FLZTYP] = 'HC'")

*WHEN FLZ

*IS FLZ_NA

*FOR %FLZ_Z% = %FLZ%

*REC(EXPRESSION = %VALUE%, FLZ = %FLZ_Z%)

*NEXT

*ENDWHEN

Please can you help ?

Accepted Solutions (1)

Accepted Solutions (1)

gcybill
Active Participant
0 Kudos

*SELECT(%FLZ%,"[ID]",FLZ,"[FLZTYP] = %FLZTYP_SET%")

former_member186338
Active Contributor
0 Kudos

Unfortunately it will not work if posting was done to multiple FLZTYP members... And some other strange effects 😉

gcybill
Active Participant

True. Default logic would have certain disadvantages over custom logic. meithom can consider run package with automated parameter filling.

Former Member
0 Kudos
Thanks.

I tried exactly the same coding with %dim_set% but it would not work. I will go on with a package.

Rgds

Thomas

former_member186338
Active Contributor
0 Kudos

Strange idea to accept not working proposal 😉 DM package will also require different syntax to support multiple types. If you want to achieve your goal (create records after saving value) - the best solution is to write write back badi.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Vadim

Sorry. I try to be more specific

The FLZTYP member is coming from the context (it is also the driver dimension of the activity in the BPF).

sdn.jpg

In this line HC should be replaced by a variable which represents the current context member of FLZTYP as this is a property of FLZ.

*SELECT(%FLZ%,"[ID]",FLZ,"[FLZTYP] = 'HC'")

Regards

Thomas

former_member186338
Active Contributor
0 Kudos

Please use "Insert Image" instead of incorrect "Insert File" to make your post readable.

Again, when we are talking about default.lgf - forget about context. You have scope of saved members only! Have you read my blog?

former_member186338
Active Contributor
0 Kudos

P.S. Please explain what is saved in the input form!

former_member186338
Active Contributor
0 Kudos
former_member186338
Active Contributor
0 Kudos

Sorry, but requirements are not clear!

Please, explain again using some screenshots.

"We want to write a default logic, where it the script should read FLZTYP from the current view and post the amount to all the members of FLZ, when there is a posting to FLZ_NA"

default logic (default.lgf) is not related to current view! Nothing can be passed to default.lgf from CV, default.lgf has only scope of saved members.

...