on 12-29-2014 2:41 PM
Hi Experts,
I am attemptintg to run run a BAdI that performs a reclassification entry (not so important what the BAdI does) via a Data Manager package that selects Category/Entity/Time
The user will select his/her entity, and I would like to ensure that the entity selected has a property = Y before executing.
Having problems creating this script logic. Can you assist.
Below is the script logic.
Any ideas?
Thanks.
Eyal
// EVALUATE WHETHER TO FILTER OR NOT FOR SCOPE. TBD
//*XDIM_MEMBERSET SCOPE = S_NONE
*XDIM_MEMBERSET FLOW = F99
*XDIM_MEMBERSET CURRENCY = LC,USD
*XDIM_MEMBERSET SCOPE = S_NONE
// VARIABLES TO SELECT
*XDIM_FILTER Entity =
[Entity].properties("ENT_REC_DTAL") = "YES"
*// SELECTION TO ACTIVATE THE BADI
*XDIM_MEMBERSET ACCOUNT = BAS(151000),BAS(225000)
*XDIM_MEMBERSET AUDITID = BAS(AD3100)
// SELECT THE VARIABLES FROM THE DM
*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
*XDIM_MEMBERSET TIME = %TIME_SET%
*START_BADI ADAMA
QUERY = ON
WRITE = ON
*END_BADI
//*ENDWHEN
Hi Eyal,
Strange code - first you filter, then override filtering with:
*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
If you want to filter user input (to remove incorrect selection), then:
*SELECT(%E%,"[ID]",ENTITY,"[ID]=%ENTITY_SET% AND [ENT_REC_DTAL]='YES'")
*XDIM_MEMBERSET ENTITY=%E%
Vadim
P.S. Dimension names are case sensitive: *XDIM_FILTER Entity =
[Entity].properties("ENT_REC_DTAL") = "YES" - ????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Or even more simple solution:
At the beginning of the script the script scope will be based on user selection %ENTITY_SET%
Just add only filter (filter works with the initial script scope):
*XDIM_FILTER ENTITY = [ENTITY].properties("ENT_REC_DTAL") = "YES"
And no XDIM_MEMBERSET for ENTITY after!
Vadim
By the way the option with SELECT will be fully equivalent to FILTER if SELECT will also check for base members:
*SELECT(%E%,"[ID]",ENTITY,"[ID]=%ENTITY_SET% AND [ENT_REC_DTAL]='YES' AND [CALC]='N'")
*XDIM_MEMBERSET ENTITY=%E%
same result as with:
*XDIM_FILTER ENTITY = [ENTITY].properties("ENT_REC_DTAL") = "YES"
Vadim
User | Count |
---|---|
16 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.