on 02-13-2014 11:40 AM
Hi Experts,
Can anyone suggest how to reset the User Settings through code, the requirement is to reset all the Columns of a table in initialization, the problem is if the user is changing the layout of the column i have to allow the change but need to reset all the columns when he reopens the application again i have to reset the columns
Hi Syed,
Its not happening just for you.... its the same for all
As soon as we make any changes to layout in the application, these are captured under USER SETTINGS. Hence, it is loaded for that user on further run of application. It is the feature of personalization given to the users.
Yes, we can reset the user settings.
Steps:
Please refer my answer in the below thread.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Syed,
To delete the user settings programmatically,
Please write the below code in wddomodifyview( ) method
IF first_time = abap_true.
"get component name.
DATA lv_cmp_name TYPE string.
lv_cmp_name =
wd_comp_controller->wd_get_api( )->get_component_info( )->name.
DATA lt_wdy_conf_data TYPE TABLE OF wdy_conf_user.
SELECT *
FROM wdy_conf_user
INTO TABLE lt_wdy_conf_data
WHERE wduser = sy-uname AND
user_id = 'U' AND
component_name = lv_cmp_name.
DELETE wdy_conf_user FROM TABLE lt_wdy_conf_data.
ENDIF.
Note: This wil not let you save the user settings for your component. It always resets the user settings when you start application
Hope this should meet your requirement.
Regards,
Rama
Hi Syed,
can you elobare the your query. what do you mean by resetting columns. Do you want to allow the user to hide / show columns.
Thanks & Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The user will be moving the columns from one position to another like a column in position 5 can be moved to position 2, i have to allow the user to change the position of the columns but when the user opens the application again i have to show the columns as they were displayed initially the column 5 in position 5. hope this helps
Hi Syed,
For this no coding is required, SAP has provided drag and drop functionality.
Drag column 3 to column 1.
if you refresh the application. column will be at there original positions. We dont have fixed positions for the columns.
Postion of the column cannot be changes programitically, because we dont have that option. At this point of time, only drag and drop functionality is provided.
Thanks & Regards,
Sankar Gelivi
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.