cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple variables in Dataslice

Former Member
0 Kudos

Hello Experts,

It appears that I can create a dataslice using variables. Here is my challenge. I have created a function to activate and de-activate the locks using a function module executed via a planning folder.

I have two user-input variables

plant and version.

How can I lock individual plants per version without creating a separate dataslice for all combinations. There are many plants so I want to use the variables to decide which slice of data in the cube needs to be locked.

or

Can I create a dataslice via a function module like UPC_DATASLICE_INIT and

UPC_DATASLICE_SAVE.

Any suggestions?

Thanks in advance

DW

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Dennis,

I would implement a dataslice based on an exit, such as CL_RSPLS_DS_EXIT_BASE.

Hope that helps.

Dieu

Former Member
0 Kudos

Hi Dieu,

Could you please provide a sample code for this if any..? Just how to go about implementing this exit class?

Regards

Syam

Former Member
0 Kudos

Method IF_RSPLS_DS_METHODS~IS_PROTECTED

  
DATA:
    dref  TYPE REF TO data,
    l_locked(1) TYPE c,
    l_msg TYPE edimessage,
    lv_dummy       TYPE c.

  FIELD-SYMBOLS:
    <lv_cube>          TYPE rsinfoprov,
    <lv_year>         TYPE /bic/oiyn_year,

    <ls_th_data>       TYPE ANY,
    <ls_msg>           TYPE bapiret2.


*** create required data objects ************************************
  CREATE DATA dref LIKE LINE OF c_th_data.
  ASSIGN dref->* TO <ls_th_data>.

*** assign values ***************************************************
  ASSIGN COMPONENT:
    '0INFOPROV' OF STRUCTURE <ls_th_data> TO <lv_cube>,
    'YN_YEAR'  OF STRUCTURE <ls_th_data> TO <lv_year>.

  LOOP AT c_th_data INTO <ls_th_data>.

*   Do not warn for entries from other cubes
    CHECK <lv_cube> EQ 'MY_PLANNING_CUBE'.

    CLEAR : l_locked, l_msg.

    IF <lv_year> EQ '2006'.
       MOVE 'X' TO l_locked.
       EXIT. " from LOOP
    ENDIF.

  ENDLOOP.

  MOVE l_locked TO e_noinput.
    
ENDMETHOD.

Former Member
0 Kudos

Thanks Dieu. Shall assign points once system allows me to do so ..

Warm Rgds

Syam

Former Member
0 Kudos

You are allowed to, now...

Answers (0)