Skip to Content

open data slice for data entry and close afterwards

Dear all,

I have created one data slice for a characteristic combination country xy in order to prevent the data entry within the data entry query for the user. But for some reason I have to run a planning function in order to summarize some values and write a total value in the characteristic e.g. country xy.

The planning function brings out an error message because this can not be executed due to the fact that this combination is protected.

Is there a way to open the data slice before the planning function is writing the data in the cube? I have tried to to this in the Data slice exit, but I do not have an idea how to open the DS, save the data and close the DS again.

We are running NW BI 7.0. Any ideas would be great.

Best regards,

Stefan from Munich/Germany

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 08:09 PM

    I did something like this by creating an FM and calling that FM from a FOX function. I think you will have to use three commands to execute three functions one after the other (and not combine them in one planning sequence) - first one will switch off the data slice, next will be your planning function containing the logic, and the last will switch it back on.

    The FM would be something like below:

    FUNCTION Z_SWITCH_DSLICE.
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_INFOPROV) TYPE  RSINFOPROV
    *"     REFERENCE(I_DSNR) TYPE  RSPLS_DSNR
    *"     REFERENCE(I_STATUS) TYPE  I
    *"----------------------------------------------------------------------
    
    *** This function imports the name of a real-time Infoprovider and a Data Slice number
    ***        and a parameter I_STATUS. If I_STATUS is 1, data slice is activated
    ***        If I_STATUS is -1, data slice is de-activated
    
    data wa_ds type rspls_ds.
    
    
    select single * from rspls_ds
            into wa_ds
            where infoprov = I_INFOPROV
              AND objvers = 'A'
              AND dsnr = I_DSNR.
    
    if I_status = 1.
       wa_ds-used = 'X'.
    elseif I_status = -1.
       wa_ds-used = ''.
    endif.
    
    update rspls_ds from wa_ds.
    
    ENDFUNCTION.

    The Fox code will be like below -

    CALL FUNCTION Z_SWITCH_DSLICE
        EXPORTING
           I_INFOPROV = <infoprov name>
           I_DSNR = <Data Slice Number>
           I_STATUS = <0 or 1>.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 22, 2008 at 09:29 AM

    Hello,

    the calling of the function module in order to update the table RSPLS_DS works perfect.

    But now i have figured out that the web application is not aware of the deactivated data slice. After executing the FOX function whichs calls the function module, the entry in tabel RSPLS_DS for the data slice is set from 'X' to ' '. But it is still not possible to use the open characteristic combination not before I log off the web application and restart the application again.

    Is there a way to refresh the application anyhow.

    Any ideas would be great.

    Best regards,

    Stefan from Munich/Germany

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Stefan,

      To have an online effect you need to refresh the data slice buffer. I think it is possible to have the effect of data slice activation, deactivation without exiting from the web template. Like in BPS you will call the FORM statement

      PERFORM BUFFER_DATASLICE_UPDATE

      IN PROGRAM SAPLUPC_DATASLICE

      CHANGING ES_AREA_SLICE.

      And then you will call FM's

      CALL FUNCTION 'UPC_DATASLICE_COMMIT'.

      CALL FUNCTION 'UPC_DATASLICE_SAVE'.

      to have an online effect of the data slice activation or deactivation.

      I am not sure as to how this works in IP but I am sure you can replicate this functionality of BPS in IP. Try this.

      Regards,

      Ares!

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 12:20 PM

    Hi,

    you can implement your requirement using an exit data slice. Please take a look at [activatedeactivate-data-slices-over-a-command-in-t;

    and [bps---ip-dataslice-question;

    Did you try it already this way? The solution mentioned in the above thread, does not have the problem you are currently facing. So the dataslice can be set to active or deactive at run time. As already mentioned the option to update the entry in table RSPLS_DS should not be used, because of the refresh issue.

    Using an exit dataslice and some selfwritten activate and deactive methods works perferct. Thread [activatedeactivate-data-slices-over-a-command-in-t; explains where the activate and deactive methods of your exit data slice can be called. You can also create a new planning function type which activates and deactivates your exit data slice. I have already implemented this at a customer site and it works well.

    Hope this helps.

    Regards Matthias Nutt

    SAP Consulting Switzerland

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.