cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Here's a ridiculously simple, but baffling FOX question;

How do you read the value of a characteristic field (ZASEMP) into a local variable (ASE)?


My InfoCube has a characteristic ZASEMP, which has a reference characteristic of 0PERSON and is type NUMC Character string with only digits.

DATA ASE TYPE ZASEMP.

* This works, sets ASE to employee 00000017.
ASE = 00000017.

*This doesn't work
ASE = ZASEMP.

*This doesn't work
ASE = OBJV(ZASEMP).

*This doesn't work
ASE = OBJV().

*This doesn't work
ASE = OBJV ( ).

*Out of desperation, doesn't work
ASE = VARV(ZASEMP).

Here's what I am trying to do:
I need to store the value of the characteristics ZASEMP from the first record, so that I can populate subsequent records with that characteristic value, which is now blank.

Any ideas of what I'm doing wrong here?

Thanks,

Bob

0 Likes
View Entire Topic
Former Member
0 Likes

Hi Bob,

Based on the way you have framed the question, I assume that ZASEMP is positioned in "Flds to be changed".

If this is the case, make use of FOREACH loop with appropriate order of the chars and read the 1st value of ZASEMP into local variable and EXIT the loop after 1st iteration. To make it still simple, if you confident that there can be only one record among the block data, which can have the value for ZASEMP you can write - FOREACH ASE IN REFDATA. EXIT. ENDFOR. and ASE will have the value based on REFDATA.

There are more ways to read the value into the local variable such as passing it directly using BEX Variable etc. we can decide the method best suitable based on requirement.

Let me know if this helps!!

//Raghu