cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with transaction data in IF_RSPLFA_SRVTYPE_IMP_EXEC_REF

former_member386290
Participant
0 Kudos

Hello All,

I have a cube which has 0FISCYEAR, 0MATERIAL, 0VERSION & 0AMOUNT characteristic/ Key Figures among others. All the charactristics are in aggregation level. In 0VERSION, I have values 'ACT' (Actual) & 'PLN' (Plan). Actual will be reference data while Plan will be transactional (or plan) data.

My planning function type has 'Reference Data' check box ticked.

In my planning function I have 0MATERIAL in fields for selection (used in conditions) and 0VERSION as field to be changed but I am not restricting any values here.

In GET_REF_DATA_SEL method, I have added following code to mark 'ACT' (actual version) as reference data



DATA: s_charsel TYPE RSPLF_S_CHARSEL.

s_charsel-iobjnm = '0VERSION'.
s_charsel-sign = 'I'.
s_charsel-opt = 'EQ'.
s_charsel-low = 'ACT'.

INSERT s_charsel INTO TABLE E_T_REF_CHARSEL.

In my EXECUTE method, I_TH_REF_DATA is populated correctly with 'ACT' (actual version) data; but C_TH_DATA still has values for both 'ACT' (actual) & 'PLN' (plan) versions.

Question . I was not expecting C_TH_DATA to have values for 'ACT' data as I have made it as reference data in GET_REF_DATA_SEL method. What is wrong here in the code or my expectation?

Thanks- Abaper

Accepted Solutions (1)

Accepted Solutions (1)

former_member5472
Active Contributor
0 Kudos

Hi,

C_TH_DATA hashed table will give me my whole selection/data set for which we want the function to work.

If you are generating any new record which is not part of the selection in C_TH_DATA it will not allow to do so.

Ref data is your scope of dataset( ur needs) .. you need to manupulate ref dataset as per your requirement .

and then modify c_th_data based of ref data set.

Thanks

Pratyush

Answers (1)

Answers (1)

former_member5472
Active Contributor
0 Kudos

Hi,

C_TH_DATA is an hased table which contains the IP planning buffer.

The contents of this table depends on the selection criteria ( filter restriction ) that you have given in the modeller.

It will pick up all the values based on that.

You need to manupulate the C_TH_DATA based on ref data..

Thanks

Pratyush

former_member386290
Participant
0 Kudos

Thank you Pratush.

How do I make 'ACT' (actual version) data as reference data and protect it from being changed / overwritten in C_TH_DATA?

Then what is the use of adding selection by writing abap code in GET_REF_DATA_SEL method?

Can somebody else too respond please?

Regards,

Abaper

Former Member
0 Kudos

You need to restrict the function to version PLN only. This way you won't get the ACT data in the C_TH_DATA. Next you'll need to make sure you'll get the method EXECUTE called for all materials. Therefore you should implement the ADD_NEW_BLOCKS method. You'll get the REF_DATA table there and fill all materials from version ACT into the table E_TS_NEW_BLOCKS.

Best regards

Dirk

former_member386290
Participant
0 Kudos

Hello Dirk,

Thank you for your reply.

I had already inmplemented ADD_NEW_BLOCKS method.

If I follow the example mentioned in section 6.3.1 for case 3 on page 232 of your BI-ABAP book: In that example cost centre 1000 has record each for Plan and Actual, same is the case for cost centre 2000. Cost centre 3000 has 1 record for for Actual and Cost centre 4000 has 1 record for Plan. Now if I take you to page 241 of that book, it quotes

"If you define ACTUAL version as reference data and PLAN version as data to be processed, the EXECUTE method is called four times, once for each cost centre. The data table and the reference table each conatin one record for the cost centres 1000 and 2000..,,"

I do not see any where in that book that you have suggested that function be restricetd to PLAN only (by the way how to do that?) to eliminate the ACTUAL data from C_TH_DATA. What am I missing there?

Thanks

Abaper

NB: Thank you Mr Pratyush for your replies.

Former Member
0 Kudos

You're right, I only showed the ABAP implementation, not the whole function definition.

When you execute a planning function you normally pass a filter with it, either in process chains where you define the filter in the planning modeler or in the workbook/web template where you either choose a predefined filter or take the filter from a data provider. So you either need a data provider that is restricted to plan only or you design a filter in the planning modeler.

Best regards

Dirk

P.S.: It's great that you know my book. Did you enjoy it?

former_member386290
Participant
0 Kudos

Thank you Pratyush, your answer too was helpful and I have assigned some points.

Hello Dirk,

Thank you for your reply. I was actually following your book and trying to implement the scenario described in the book and that is how this thread orginated. Yes your book is good (actually very good) but it needs to be more bulky to contain the more details like the ones you missed out in this case!

Is there any other way we can keep in touch apart from this SDN forum?

Thanks

Abaper

NB: I have assigned you points even if you do not want it

Former Member
0 Kudos

You can send me mails.

I can't promise to answer them quickly but I'll try.

NB: I like them, thank you

Edited by: Dirk Herzog on Aug 12, 2010 2:23 PM