cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BPC 10 - BADI - Get Parameters passed in IT_PARAM

lijisusan_mathews
Active Contributor
0 Likes
1,465

Hi All,

I have to write few BADIs for BPC 10 .

There is a selection screen where user selects the Dimension values for restricting entries ( eg. Time , Category ) when the BADI is run (Run Package ) via EPM Excel. But I am unable to get the values passed here, in the BADI under IT_PARAM. I am able to get QUERY and  WRITE values in IT_PARAM . Can anyone please shed some light on this. I am new to BPC programming, hence would appreciate all help.

Interestingly, when we add a new screen for passing values, I am able to get it in it_param. But I am unable to get the values from the standard selection screen.

Regards,

Suzie

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Hi Suize,

There is no "standard selection screen"

Just look on the simple help sample: Custom Logic and BADI - SAP Business Planning and Consolidation, version for SAP NetWeaver - SAP Lib...

Parameters are passed explicitly - like YEAR=1 Etc...

If you are talking about selection of members - then you will receive the selected members in scope. Look on ct_data - it will contain records selected by scope (QUERY=ON).

Vadim

lijisusan_mathews
Active Contributor
0 Likes

Sorry ... am so used to normal abap reporting. hence the term Standard Selection Screen .

I was talking about the scope that is passed. It is correct that my Ct_data will have records of the selected scope, but my requirement is to get the scope itself. ie. There might be a case where my scope is to fetch data of category V1. in ct_data , there might not be any data for V1 for that particular time. Even in this case, I need to perform certain logic calculations based on the category V1. For this, I need the value V1 in the BADI so that I can perform the logic accordingly. Is this possible?

Suzie

Former Member
0 Likes

Hi Suzie,

You need to add parameters in your logic script file,

on the left is the place holder where to pick up in your BADI, and on the right it will be your dimension name + _SET from the selection screen.

*START_BADI BADI_NAME

VERSION = %VERSION_SET%

QUERY = OFF

WRITE = ON

*END_BADI

Look at the highlighted line.

Andy

lijisusan_mathews
Active Contributor
0 Likes

Thanx Andy.

Shall try the same and let you know. But I think my EPM consultant has already tried that and still the value was not passed. Anywasy, shall try again and let you know.

Suzie.

Former Member
0 Likes

Hi Suzie,

If it is still not passing after my suggestion then please paste LGF file here and ABAP code you using to read it.

Andy

former_member186338
Active Contributor
0 Likes

Look on IT_CV custom logic badi parameter...

Vadim

former_member186338
Active Contributor
0 Likes

P.S. In IT_CV you will have full scope info before badi start in the script - including members without records in ct_data.

lijisusan_mathews
Active Contributor
0 Likes

Sure Andy

lijisusan_mathews
Active Contributor
0 Likes

Thats what I saw too  Vadim in it_cv.

But I do not want the entire dimension values. I only want the values given in the scope used to populate ct_data.

Suzie

former_member186338
Active Contributor
0 Likes

Ups, looks like some misunderstanding...

"I only want the values given in the scope used to populate ct_data." - in IT_CV you will get a scope used to populate ct_data. Not all dimension members.

But if for some scope member you have no records in ct_data - this member will be present in IT_CV.

Just debug and look on results.

Vadim

former_member186338
Active Contributor
0 Likes

Sample:

In the DM prompt you select 2 members for VERSION: V1 and V2.

You pass the selected members to the script scope using %SELECTION%.

Then your script will be scoped to V1 and V2.

You have no records for V2.

In IT_CV - both members will be present.

In CT_DATA - only record with V1.

Hope it's clear.

Vadim

P.S. I want to explain that code with special parameter VERSION like

*START_BADI BADI_NAME

VERSION = %VERSION_SET% //scope members of VERSION

is equivalent to reading members of VERSION from IT_CV

lijisusan_mathews
Active Contributor
0 Likes

Thanks Andy and Vadim,

My consutant made a few changes to the .LGF file and now the values are availablein IT_CV.

Answers (1)

Answers (1)

UmaArjunan
Active Participant
0 Likes

Hi Susan ,

If the selected value from the IT_PARAM is still not passed to the BADI

Please check the script logic in LGF value.

Based on the run package process chain , Also there is a place where you can Modify script .

Please check in that place for the IT_PARAM variable name is correctly defined to read value..

other than that

it_Cv structure definition :

DIMENSION

MEMBER --

DIM_UPPER_CASE

USER_SPECIFIED

If you need to read only the scope with selected members

loop thru it_cv INTO lw_cv WhereTH KEY dimension = <dimensionname > and USER_SPECIFIED = 'X'

then read the lw_cv-members to get the list of selected members.

It_param can be read using the key name.

READ TABLE it_param INTO ls_param WITH KEY hashkey = <it_param variable name>


Pl. try this.