Hi, experts,
I need to iterate through all the values a characteristic has. I need to iterate 0EMPLOYEE because I need to make calculations specific to each employee, and to store that information in specific values for each employee.
I can not use exiting transactional data to iterate because I don't have any related to all the employees.
I tried using FOREACH employee in REF DATA but I also get '#' values.
Does anyone know what the correct syntax is or if it's possible?
Thank you in advance.
Request clarification before answering.
I did the following:
1. Set the characteristic to be an InfoProvider - this enables you to create a query directly on the InfoObject
2. Create a query on the InfoProvider and use it's ID as the output
3. Create a replacement path variable which uses a query and use the query from 2
4. In your filter to the planning sequence use your new replacement path variable as the selection as this will now contain all master data values
5. In your fox code use the following statement: FOREACH var IN SELECTION. .... ENDFOR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Typo, It's ENDFOR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nidia,
If you wanted all the transaction records of your reference data to be part of calculation logic and exclude only a part of your dimension member,
Use
FOR EACH DIM1,DIM2,DIM3,....,#, DIMn in REFDATA,
IF DIM1<> 'Exclusion set' AND DIM2 <> 'Exclusion set'.
--- Logic ---
ELSE
--- Logic ---
ENDIF.
END.
Hope this will help you. If you think, your concern isn't addressed yet, please post the sample data set and explain your requirement on that data set. It will help us to answer more appropriate to the requirement.
Thank you
Regards,
Harsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nidia,
I try understanding your requirement and seems you need to enhance the reference data selection. If it is, please refer to link:
https://help.sap.com/viewer/0ecf5244825c4742a7b062a89d11c2ac/7.5.12/en-US/f1f5721c63e6482cbbd89ee683...
The example in this page is:
---
KEEP REFDATA SELECTION FOR 0FISCPER.
ENHANCE REFDATA SELECTION FOR 0FISCPER: 2015001, 2016001, #.
You can also use global variables in this list:
ENHANCE REFDATA SELECTION FOR 0FISCPER: 2015001, VARIABLE FISCPERVAR.
To request all available data that corresponds to the deletion of the filter, write the following:
ENHANCE REFDATA SELECTION FOR 0FISCPER: *.
---
If it is not what you need, maybe you can try to illustrate your issue with one vivid example and then we can know your issue better.
Best Regards,
Sheldon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nidia,
you might want to use "foreach in selection" but then you also need a selection for the employees.
if you want to use "foreach in refdata" you need to read in the upcoming code some refdata - that needs to be transactional data from a cube or DSO.
regards
Cornelia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.