Saving layouts as user specific or default layouts
[default user] [friendster layouts] [myspace layouts] [sharepoint layou]
Symptom
When the attribute layout(screen) of a record (or document) is saved as default layout then during the search of records(or documents) the hit list of search screen is not visible. Similarly when the search layout is saved as default in the search screen, then on accessing a record (or document) the attributes are not visible.
Other terms
Save layout, Default layout, User specific layout, record, document, attribute, search, find, screen.
Reason and Prerequisites
The grid used for displaying the attributes of a Record while viewing a Record is different from the grid that displays the search results. While saving layouts, the 2 grids must be distinguished from one another.
The changes cannot be made on the standard RM code which is a released product and applying these changes, the previously created layouts will not be accessible.
So a new variable has to be used in order to distinguish the 2 grids with different values for each grid, which means that for previously created records or documents,
-the attributes may not be visible
OR/AND
-the records/documents may not be visible
Hence, this will affect the processing of existing records & documents.
Therefore, apply these code changes only if there are no previous objects for the element type or previous objects are obsolete now.
Solution
Note: Once these code changes are made, then the previously existing
layouts will not be accessible and
-you will not be able to view the attributes of records/documents created prior to this change
OR/AND
-you will not be able to view the records/documents in hitlist in the search screen.
Kindly apply these changes only if the previously created layouts are not required.
Changes that are required are as mentioned below:
1> Go to transaction ‘SE80′.
2> Create a new class, that inherits from ‘CL_SRM_PROP_ALV_SAPGUI’.
3> Open the method ‘DISPLAY’ of the newly created class. In this method just before calling the method ‘g_grid->set_table_for_first_display’ add the following line of code:
ls_variant-handle = ‘ATTR’.
(The value ‘ATTR’ can be any 4 character. Here ATTR has been used to
show that this is the ALV grid that is used to display the attributes of the record)
4> Again Create a new class, that inherits from ‘CL_SRM_LOC_SAPGUI_FE’
5> Open the method ‘SHOW_RESULT’ of the newly created class. In the method just before calling the method list_view->set_table_for_first_display, add the following line of code:
ls_variant-handle = ‘SEAR’.
(The value ‘SEAR’ can be any 4 character. Here ‘SEAR’ has been used to show that this is the ALV grid that is used to display the search
results).
Kindly make these changes.