Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Ability to add filter before executing a BAdI – Script Logic

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.

 

  1. Tried additing a property via XDIM_FILTER, but that did not filter.  The DM/BAdI ran on the entities chosen.
  2. Tried adding a *WHEN clause to limit the execution of the BAdI before the START command, but Script logic does not accept the syntax.

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

Tags:
replied

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" - ????

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question