cancel
Showing results for 
Search instead for 
Did you mean: 

Account dimension not passing in stored procedure in default logic

Former Member
0 Kudos

Hello experts,

we have a default logic running a stored procedure with parameters:

*RUN_STORED_PROCEDURE=Z_SP_Test_Default('%ACCOUNTP_SET%','%BRANDS_SET%', ','%CATEGORY_SET%','%DATASRC_SET%','%ENTITY_SET%','%GROUPS_SET%','%INTCO_SET%','%MARKETP_SET%','%TIME_SET%')

with all the dimensions existing in the cube.

However, when we send data and the stored procedure is launched, the account dimension is not properly passed to the stored but the rest of the parameters are correctly passed.

Looking into the network, we have tried putting:

*SCOPE_BY = ACCOUNTP, BRANDS, CATEGORY, DATASRC, ENTITY, GROUPS, INTCO, MARKETP, TIME

*RUN_STORED_PROCEDURE=Z_SP_Test_Default('%ACCOUNTP_SET%','%BRANDS_SET%', ','%CATEGORY_SET%','%DATASRC_SET%','%ENTITY_SET%','%GROUPS_SET%','%INTCO_SET%','%MARKETP_SET%','%TIME_SET%')

but then, it is quite strange, because when the default logic is executed the ACCOUNT is passed correctly but the rest of parameters are passed as 0.

Any idea?

Thanks a lot for your help!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The ACCOUNT dimension alone is treated differently in BPC. It doesn't get limited by the Accounts being passed and runs for all Accounts. To limit the scope of the ACCOUNT dimension they need to be expliciltly scoped using the XDIM_MEMBERSET statement.

Refer this page as well for details on it:

http://help.sap.com/saphelp_bpc75/helpdata/en/72/c7b70db71c4967be180aff79f73ec9/frameset.htm

Hope this helps.

Santosh

Edited by: Santosh Nichani on Dec 22, 2010 10:44 AM

Former Member
0 Kudos

Hi Santosh,

we need to pass the Account parameter as there are many stored procedures in the default logic and they should be executed depending on the account that key users are entering into the tool (they enter parameters at a very aggregated level and the default script logic is set to split this values to the minimum level of detail). I think *XDIM_MEMBERSET won't be useful as we will not be able to know which account the user is entering.

What is strange is that with

*SCOPE_BY = ACCOUNTP, BRANDS, CATEGORY, DATASRC, ENTITY, GROUPS, INTCO, MARKETP, TIME

the ACCOUNT is passed correctly but the rest of parameters are passed as 0

and without *SCOPE BY

the ACCOUNT is not passed (0) but the rest of parameters are passed properly.

Any idea out there?

Thanks a lot for your suppor!

Former Member
0 Kudos

Hi,

You can try using it in the following way:

*XDIM_MEMBERSET ACCOUNT = %ACCOUNT_SET%

*WHEN %ACCOUNT_SET%

*IS XXX

computation1

*ENDWHEN

*WHEN %ACCOUNT_SET%

*IS YYY

computation 2

*ENDWHEN

Santosh

Former Member
0 Kudos

Hi Santosh,

the issue is that we need to run the stored procedure and it does not support *WHEN, *ENDWHEN clauses. We cannot do

*XDIM_MEMBERSET ACCOUNT = %ACCOUNT_SET%

*WHEN %ACCOUNT_SET%

*IS XXX

*RUN_STORED_PROCEDURE=u2026

*ENDWHEN

It only works with the *REC instruction and we really need to use the *RUN_STORED_PROCEDURE.

Any idea on how to pass the account parameter inside?

Thanks for your replies!

Former Member
0 Kudos

Hi,

Stored procedure cannot be run like that within the when statement.

I noticed that you used to compare your account member with XX. Only when the member is XX, you are running the stored procedure. In that case, why dont you pass XX in the stored procedure itself.

Hope this helps.

Former Member
0 Kudos

Hi nilanjan,

the issue is that the user has to parameterize several different accounts before launching the full budgeting process and we have to assign different stored procedures in the default logic depending on which account the user has parameterized.

So, hard-coding the account in the stored does not work, because we lose control on which account the user has entered (and they could be different depending on the template where he is entering data).

I don't know. It should not be that complicated to include it in the default logic, but we are struggling quite a lot!

Thanks for your answers!

Former Member
0 Kudos

Hi,

This will not be possible. You need to take an alternate approach for this. You can try to combine the logics in a single stored procedure using some conditional statement. Pass only %ACCOUNT_SET% to the stored procedure. The stored procedure should do the comparison and execute the logic accordingly.

This might take some effort. However, I dont see any other alternative.

Hope this helps.

Answers (0)