2012 Feb 07 1:51 PM
Hi,
I have a requirement in which I have to restrict the WBS search help values in IW32 based on user parameter in user profiles i.e.
Suppose I have maintained an entry in User profile -->Own data --> Parameters and there I will give BUK as parameter ID and DK00 as Value. And now in IW32 in WBS search help(in Additional Data tab) it will only show WBS values for DK00 and not for any other country. Rite now it is showing for all the countries i.e. denmark ppl wont be allowed to view WBS values for any other country.
Thanks in advance.
Regards
Sumeet Durgia
2012 Feb 07 2:16 PM
Hi,
in the definition of search help there is column 'Default value' - You enter name of GPA / SPA parameter like 'BUK' in Your example. You can enchance default search help or append new one with this setting.
Regards,
--
Przemysław
2012 Feb 08 9:15 AM
Hi Przemysław
I am using standard collective search help PRPM in which parameters are already maintained POSID and PSPID where we cannot maintain any values. And I am trying to write the code in search help exit CN_LDST_SHLP_EXIT_PS_PR but its not triggering the pop up which filters the WBS.
Thanks in Advance
Regards
Sumeet
2012 Feb 08 9:19 AM
Hi,
I would create new elementary search help and add it to the standard collective search help,
or copy and change search help exit (in exit You can read parameter BUK and filter values).
Regards,
--
Przemysław
2012 Feb 08 9:42 AM
Hi Przemysław
I have copied the search help PRPM into ZPM_PRPM (as i dont have the access key) and also copied the standard exit 'CN_LDST_SHLP_EXIT_PS_PR' into 'ZPM_CN_LDST_SHLP_EXIT_PS_PR' and assigned it to zpm_prpm. But in the Z serach help exit when I try to put the breakpoint its not triggering the pop up which filters the WBS i.e. it stops before that pop up only where we enter the values for WBS.
Regards
Sumeet
2012 Feb 08 9:44 AM
Hi,
This is the exit where i m making the changes.
FUNCTION ZPM_CN_LDST_SHLP_EXIT_PS_PR.
*"----
""Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----
DATA: lv_application TYPE cnldst_applic,
lv_object TYPE cnldst_object,
lv_sh_name TYPE char40.
lv_application = 'PS'.
lv_object = 'PR'.
EXIT immediately, if you do not want to handle this step
IF callcontrol-step <> 'SELONE' AND
callcontrol-step <> 'SELECT' AND
" AND SO ON
callcontrol-step <> 'DISP'.
EXIT.
ENDIF.
*"----
STEP SELONE (Select one of the elementary searchhelps)
*"----
This step is only called for collective searchhelps. It may be used
to reduce the amount of elementary searchhelps given in SHLP_TAB.
The compound searchhelp is given in SHLP.
If you do not change CALLCONTROL-STEP, the next step is the
dialog, to select one of the elementary searchhelps.
If you want to skip this dialog, you have to return the selected
elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
either to 'PRESEL' or to 'SELECT'.
break sdu047.
IF callcontrol-step = 'SELONE'.
CALL FUNCTION 'CN_LDST_DB_ACTIVATION_CHECK'
EXPORTING
iv_application = lv_application
iv_object = lv_object
EXCEPTIONS
not_activated = 1
OTHERS = 2.
IF sy-subrc = 1.
CONCATENATE 'CN_LDST_' lv_application '_' lv_object INTO lv_sh_name.
DELETE shlp_tab WHERE shlpname EQ lv_sh_name.
ENDIF.
EXIT.
callcontrol-step = 'SELECT'.
ENDIF.
*BREAK sdu047.
IF callcontrol-step = 'SELECT'.
break sdu047.
PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
CHANGING SHLP CALLCONTROL RC.
IF RC = 0.
CALLCONTROL-STEP = 'DISP'.
ELSE.
CALLCONTROL-STEP = 'EXIT'.
ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.
*"----
STEP PRESEL (Enter selection conditions)
*"----
This step allows you, to influence the selection conditions either
before they are displayed or in order to skip the dialog completely.
If you want to skip the dialog, you should change CALLCONTROL-STEP
to 'SELECT'.
Normaly only SHLP-SELOPT should be changed in this step.
IF callcontrol-step = 'PRESEL'.
PERFORM PRESEL ..........
EXIT.
ENDIF.
*"----
STEP SELECT (Select values)
*"----
This step may be used to overtake the data selection completely.
To skip the standard seletion, you should return 'DISP' as following
step in CALLCONTROL-STEP.
Normally RECORD_TAB should be filled after this step.
Standard function module F4UT_RESULTS_MAP may be very helpfull in this
step.
IF callcontrol-step = 'SELECT'.
break sdu047.
PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
CHANGING SHLP CALLCONTROL RC.
IF RC = 0.
CALLCONTROL-STEP = 'DISP'.
ELSE.
CALLCONTROL-STEP = 'EXIT'.
ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.
*"----
STEP DISP (Display values)
*"----
This step is called, before the selected data is displayed.
You can e.g. modify or reduce the data in RECORD_TAB
according to the users authority.
If you want to get the standard display dialog afterwards, you
should not change CALLCONTROL-STEP.
If you want to overtake the dialog on you own, you must return
the following values in CALLCONTROL-STEP:
- "RETURN" if one line was selected. The selected line must be
the only record left in RECORD_TAB. The corresponding fields of
this line are entered into the screen.
- "EXIT" if the values request should be aborted
- "PRESEL" if you want to return to the selection dialog
Standard function modules F4UT_PARAMETER_VALUE_GET and
F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.
break sdu047.
IF callcontrol-step = 'DISP'.
break sdu047.
PERFORM AUTHORITY_CHECK TABLES RECORD_TAB SHLP_TAB
CHANGING SHLP CALLCONTROL.
EXIT.
ENDIF.
ENDFUNCTION.
2012 Feb 08 9:50 AM
Hi,
You ignore required steps:
IF callcontrol-step 'SELONE' AND
callcontrol-step 'SELECT' AND
callcontrol-step 'DISP'.
EXIT. " <-- do You really want to stop processing these steps?
ENDIF.
Regards,
--
Przemysław
2012 Feb 08 11:05 AM
Hi Przemysław
I have commented the exit keyword in the code and now its taking me inside callcontrol-step 'SELECT' ,but still its not going to the area where all WBS search help entries are coming. There is one table record_tab[] in which there are zero entries showing.
So,still not able to figure out in which table its displaying all the WBS entries.
Regards
Sumeet
2012 Feb 07 4:03 PM
or you can make use of search help exit to filter the values. Search for search help exits on sdn.
Nabheet
2012 Feb 08 9:12 AM
Hi Nabheet
I am using search help exit 'CN_LDST_SHLP_EXIT_PS_PR '(in search help PRPM) but after putting break point in the enhancement spots mentioned in the FM , it is not going to that pop up where I want to filter the WBS... before that only it stops.
I hope you are getting me.
Thanks in advance.
Regards
Sumeet