cancel
Showing results for 
Search instead for 
Did you mean: 

Data slices with CL_RSPLS_DS_EXIT_BASE

Former Member
0 Kudos

Hello,

I want to lock cells in a input query by data slices. E.g. I have a input query for all month in 2014. March should not be changeable because this is locked by DS.

I copied the class CL_RSPLS_DS_EXIT_BASE and maintained a coding in method IS_PROTECED. But this method is only called when I start a planning function. But I want to lock the cells when they are displayed first time.

Does anyone have an idea.

Best regards

Jürgen

Accepted Solutions (0)

Answers (2)

Answers (2)

schmidhnx
Explorer
0 Kudos

Hi,

late Response but maybe somebody with same issue reads this thread,

You can also define a data slice based on selection and implement a customer Exit variable on your characteristic.

In your Exit coding for the variable you read your Z-Table and lock the data depending on the characteristic values of the data slice.

I hope this helps.

Anand71
Active Contributor
0 Kudos

Hallo,

I think without Exit class you can achive your requirement. open data slice,  select  " a selection'  from Dropdown window of Basis of dataslice. In the character selection window use 'March' as a filter for infoobject 0CALMONTH2.

regards,

Anand Kumar

Former Member
0 Kudos

But I want to maintain this restriction in a table and not in the DS. It should be possible to lock different months for different company codes

e.g.

company code     locked month

DE                        2.2014

FR                        3.2014

US                        2.2014

This should be maintained in a transparent table.

Former Member
0 Kudos

Hello Jürgen,

you can do it in the IS_PROTECTED method of your DS class. Just enter some code like

  SELECT * from Z_Table into ltable lt_data.

ASSIGN COMPONENT '/BIC/BI_PLANT' OF STRUCTURE i_s_data TO <lv_bi_plant>.

 
  ASSIGN COMPONENT 'CALYEAR' OF STRUCTURE i_s_data TO <lv_calyear>.

 
ASSIGN COMPONENT 'CALMONTH2' OF STRUCTURE i_s_data TO <lv_calmonth2>.

  loop at lt_data into ls_Data. 

      if <lv_bi_plant> = ls_data-country and <lv_calyear> = ls_Data-calyear

        and <lv_Calmonth2> = ls_Data-calmonth2 .

        e_noinput = rs_c_true.

    endif.

endloop.

Then your keyfigures are not input ready for selected country and month. if you use an account model you can decide which keyfigure to be input ready or not.

Hope you got a rough idea.

Regards,

Jürgen

Former Member
0 Kudos

Hello Jürgen,

thank you for your help. But this is exactly what I have done.

For testing, I set an external breakpoint at the beginning of the method and I can see that this method is not executed when I start the query (also after selection screen). The input table appears and all cells are ready for input.

When I change some data and start a planning function, than I come to the breakpoint.

Regards

Jürgen

Former Member
0 Kudos

Please check your query is input-ready, the keyfigures are set to input-ready, your query apply to the filter of your aggregation level...execute query in RSRT to check that at least one keyfigure is input-ready. If not you will get a hint what is missing. Please check that your query has at least one input-ready keyfigure, data slice of course has to be active for infoprovider. Maybe you have to add some additional chars from your aggregation level to query to get it input-ready. Then it should work and you should jump into DS exit if you execute your query.

Regards

Jürgen

0 Kudos

Hi Jürgen,

a data slice exit is only called if the characteristics specified in the data slice definition can be filled. So if the exit is not called company code or month are not determined on the cell level in the query result set.

You can also use method 'is_overlapping' to prefetch the contents of the customizing table; there you get the selection the query/planning functions is using.

You can also set the interface parameter N_USE_EXTERNAL_BUFFER in the constructor of your class to use external buffering (for better performance if your exist is called very often).

Regards,

Gregor