cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to default the "display change document" in user settings

Former Member
0 Likes
525

Hi,

Our need is to default the user-settings with the checkbox "display change documents" flagged for all the users, and defaulted like this at new user creation.

When checking the available parameters under: PFCG -> Role -> Personalization, this one is not present ==> So we are not able to change this default value.

Does anyone know how to achieve this?

Thanks

Matthias

Accepted Solutions (0)

Answers (1)

Answers (1)

daniel_humberg
Advisor
Advisor
0 Likes

Maybe with some coding?



DATA: lt_spers_obj TYPE  TABLE OF spers_obj,
      ls_spers_obj TYPE spers_obj.

FIELD-SYMBOLS: <fs_spers_obj> TYPE spers_obj.

SELECT * FROM spers_obj INTO TABLE lt_spers_obj
         WHERE pers_type = 'U'
         AND   pers_key  = 'DPR_USER_SETTINGS'
         AND   fieldname = 'TODO'.

LOOP AT lt_spers_obj ASSIGNING <fs_spers_obj>.
  <fs_spers_obj>-fieldvalue = TODO.
ENDLOOP.

*/ Update table
MODIFY spers_obj FROM TABLE lt_spers_obj.

IF sy-subrc IS INITIAL.
  WRITE: 'executed successfully'.
ENDIF.

Former Member
0 Likes

Hello,

I have a similar issue.

Left alone that coding should be considered the last resort. Where should this code be placed, do you have any particular enhancement spot in mind, badi ?

former_member201206
Active Contributor
0 Likes

Hi

I think, Daniel means to create a report and run frequently . And the involved fieldname should be

'SHOW_CHANGE_DOCS'

Kind regards,

ZHenbo

Former Member
0 Likes

Hi Daniel & Zhenbo,

In that case, we could use standard report "DPR_CHANGE_USER_SETTINGS" instead of a custom one. However this doesn't answer our need, such user default settings should be reachable in standard from the start.

We will try to reach SAP Support for this matter.

Matthias

Former Member
0 Likes

Hi Matthias,

Did you find any answer for your request? I would need to find a solution too...

Thanks a lot.

Neil

Former Member
0 Likes

Hello,

Depending on your system you can take a look at method GET_ALL_PARAMETERS from class CL_DPR_USER_SPECIFIC_SETTINGS and create a post-exit enhancement.

Unfortunatelly the original method uses a RETURN statement, so if your NW component is pre 7.01 post-exit enhancement will not be called.

You could also modify standard code somewhere around CASE WHEN 2...(line around 50 in that method).

Regards,

Michal