on 12-07-2017 7:53 AM
Dear Experts,
Our team faces a following issue, we have three plants in the company code 1001,1002 and 1003. So when a user from 1001 plant presses F4 help option anywhere in their SAP S4Hana,then it must display values corresponding only to their plant. For instance 1001 user must be able to view only their 1001 plant details like materials,production orders etc etc..in F4 help.
Client is very specific about this issue.
Kindly help me, thanks in advance.
For such requirement (filters on search help) I created once an Enhancement Implementation in function group SDSD which manages such search helps. I put my code at explicit ehnancement points at start (save maxrecords) and end (remove some records) of forms GET_VALUES_SH and GET_FALUES_FV (for search help and domain values) there I called my own BAdIs (*) with filter on search help or domain name. Then me and other Abaper can implement our own filters on most search helps implemeting those BAdI, using, for example, some authority-check or any depending filter.
For sample: end of GET_VALUES_FV
enhancement 3 z_sh_hide. "active version
* allow specific implentation of filter on search-help
data: lo_handle type ref to z_fv_hide, " Ehn Spot defined with SE18
lv_domname type domname.
* Map search help name to domain name
lv_domname = shlp-shlpname.
* Look for BAdI implementation and call it
get badi lo_handle
filters
domname = lv_domname.
call badi lo_handle->change_value_tab
exporting
shlp = shlp
changing
value_tab = record_tab[].
* apply max records
if lv_maxrows <> 0.
add 1 to lv_maxrows.
delete record_tab from lv_maxrows.
endif.
endenhancement.
As can be seen the method CHANGE_VALUE_TAB has a SHLP (SHP_DESCR_T) importing and a VALUE_TAB (DDSHRESLTS) changing parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The first implementation which 'create' the BAdI is done only once. Then created some implementation of the z-BAdI with filter values resulting in some sets of search-helps.
You could remove the filter in get badi and create the z-BAdI without filter, so ever implementation will be called. Or you could even filter immediately the data without using any z-BAdI, all your code will be in one point, and less maintanable?
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.