cancel
Showing results for 
Search instead for 
Did you mean: 

Change characteristics in Planning function exit

Rushikesh_Yeole
Contributor
0 Kudos
275

I am using a planning function EXIT for my planning cube. I have some info objects like unit/ material which are my dimensions/characteristics in my cube.

In my planning function, I am overwriting contents/ assigning values to these info objects [dimensions/characteristics] using class method program.

I am using field symbols to access this hashed table.

But it is giving run time error as "MOVE_TO_LIT_NOTALLOWED_NODATA" Error at assignment: Overwritten protected field. For key figures, it is behaving OK.

Is there any alternate solution for this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

are your chars changeable in the aggregation level?

Other solution is to create a copy of the hashed table using assign and dref.

Then make changes in the coopy table, clear the hashed table and move contents of your copy table to the hash table.

Regards,

Jürgen

Rushikesh_Yeole
Contributor
0 Kudos

HI,

How to make chars changeable in aggregation level? I have attached my agg level screenshot.

Former Member
0 Kudos

Sorry, my mistake, I meant in the planning function. All chars that will be changed by the planning function have to be changeable.

Regards,

Juergen

Rushikesh_Yeole
Contributor
0 Kudos

Sorry. I searched all settings, F1 helps. But did not get how to set changeable. I attached my planning function screenshot. Please guide.

There is nothing to do in planning function type and planning sequence.

Rushikesh_Yeole
Contributor
0 Kudos

Selection for characteristics to be changeable is available for repost function. But I have to create custom function type for EXIT.

Former Member
0 Kudos

Hi,

that's ok, then you have to do following in the execution method of your planning function:

data: lv_dref TYPE REF TO data.

FIELD-SYMBOLS:

         <lv_wa_data> TYPE any,

        <lv_wa> TYPE any.

CREATE DATA lv_dref LIKE LINE OF c_th_data.

 
ASSIGN lv_dref->* TO <lv_wa_data>.

 
ASSIGN lv_dref->* TO <lv_wa>.

 
LOOP AT c_th_data ASSIGNING <lv_wa_data>.

   
MOVE <lv_wa_data> TO <lv_wa>.

* make changes to <lv_wa> as necessary

INSERT <lv_wa> INTO TABLE c_th_data.

     
IF sy-subrc NE 0.



       
MODIFY TABLE c_th_data FROM <lv_wa>.

     
ENDIF.

   
ENDIF. "Read BI_HVERS



 
ENDLOOP.

Hope it gives you an idea

Regards

Juergen

Answers (0)