on 04-09-2009 3:50 PM
Hi Experts!.
Can anyone provide an advise or guidence to use data slices for lock and unlock planning data using data slice with IP?.
I was read the SAP Help documentation about Data Slicing but stills unclear when to use data slice with exits and when to use selections...
My customer's requirement is basicly tu protect data in the outdate during the planning process. I mean, the planner defines a planning window from start date to end date. For eg. from 04/01/2009 until 04/10/2009 transactional data is available to plan, any data out of date range will be protected.
The main planning application es web-based and builded with IP.
Please advice, thanks in advance...
Hi,
I think, you can create 2 Data Slices, one is only based on the selection of Version, another one is based on the selection of Version and Fiscal Per3.
For example: a Data Slice with two characteristics.>:With chars: version and fiscper3.>version A; fiscper3 not lock.-->version B; fiscper3 lock from January to May.
Also you can customize the standard locking functionality of IP,in context of your application rather than Data slice. pls chk information over here:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/588168ce8c08fae10000000a422035/content.htm
Regards
CSM Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reddy,
Thank you very much for that suggestion.
Actually I'm looking to consider the standard locking functionality as well, but at the other side, since this planning application has a top-down structure then I would like to propose a little more dynamic solution. I mean, to make the data slice with variable restrictions by user-exit with a z-table as input.
Could you or anyone provide some coding example for the CL_RSPLS_DS_EXIT_BASE?? or any other similar solution???
I tried to set up this exit-class but nothing happens during the input ready query....stills unclear...
Thanks in advance....
Hi,
a sample implementation for the method my_dataslice which is called in IF_RSPLS_DS_METHODS~IS_PROTECTED of your exit dataslice.
For all versions the initial period is open, otherwise we read the open fiscal periods for a given version using a function module and check if the current fiscal period is in the open periods.
Please note, this code does not use any buffers. It is just a small example and you should definetly implement some additional performance optimizations.
E.g. you should move the calls to 'RSD_NSPACE_PAR_GET_FROM_NAME' into the constructor and only call 'Z_GET_OPEN_PERIODS' if the version has changed.
method my_dataslice.
data: l_error type c.
data: l_fiscper type char30.
data: l_version type char30.
data: l_chbasnm type rschabasnm.
data: lt_open_periods type RSR_T_RANGESID.
data: ls_range type rrrangesid.
data: l_dummy type char100.
field-symbols: <lf_fiscper> type any.
field-symbols: <lf_version> type any.
* fiscper
l_chbasnm = '0FISCPER'.
call function 'RSD_NSPACE_PAR_GET_FROM_NAME'
exporting
i_objnm = l_chbasnm
importing
e_name_w_o_prefix = l_fiscper
exceptions
name_error = 1
others = 2.
* version
l_chbasnm = '0VERSION'.
call function 'RSD_NSPACE_PAR_GET_FROM_NAME'
exporting
i_objnm = l_chbasnm
importing
e_name_w_o_prefix = l_version
exceptions
name_error = 1
others = 2.
* fiscal period
assign component l_fiscper of structure i_s_data to <lf_fiscper>.
if sy-subrc <> 0.
l_error = 'X'.
endif.
if l_error = 'X'.
e_noinput = 'X'.
message e011(zplanning) with '0FISCPER' 'my dataslice'
into l_dummy.
move-corresponding syst to e_s_mesg.
return.
endif.
if <lf_fiscper> is initial.
* initial values is allowed for all versions
e_noinput = space.
else.
* version
assign component l_version of structure i_s_data to <lf_version>.
if sy-subrc <> 0.
l_error = 'X'.
endif.
if l_error = 'X'.
e_noinput = 'X'.
message e011(zplanning) with '0VERSION' 'my dataslice'
into l_dummy.
move-corresponding syst to e_s_mesg.
return.
endif.
* Implement your checks here ....
* I would call a function module or a method here which returns
* the open periods for the given version. The open periods could
* be determined from the master data for characteristic, a DSO
* a z-table or something similar.
* Let us assume the open periods are returned in a sorted table
* of fiscal periods which are open for planning. Fiscal periods
* which are not contained in the table should be locked.
call function 'Z_GET_OPEN_PERIODS'
exporting
i_version = l_version
importing
e_t_range = lt_open_periods.
read table lt_open_periods into ls_range
with key low = <lf_fiscper>
binary search.
if sy-subrc = 0.
assert ls_range-sign = 'I'.
assert ls_range-opt = 'EQ'.
* inside fiscal period range -> no lock
e_noinput = space.
else.
* outside fiscal period range -> lock
e_noinput = 'X'.
message e012(zplanning) with <lf_fiscper> into l_dummy.
move-corresponding syst to e_s_mesg.
endif.
endif.
endmethod.
Hope this helps ...
Matthias Nutt
SAP Consulting Switzerland
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.