You can set-up many selection variants for most reports in R/3.
These selection variants can contain fixed data such as plant. They can also contain dynamic data such as today’s date minus 30 days. You can make fields mandatory, or hide them, etc.
There is one nice function mainly applicable to the PM/CS modules in which the user can default their own settings each time they enter the report. This can be done as follows:
- Enter your data in the relevant selection-screen. You can use dynamic selection fields to defaut dates
- Page to the bottom of the screen and enter display variant name entered in step above
- Save variant as U_XXXXXX where XXXXX is your user name
- Re-run the transaction to test. You should find your defaults have been automatically assigned from variant U_XXXXXX
- Your variant will be called every time, even if you log-off and back on again
The above does not stop you from manually selecting another variant once the selection-screen has been displayed.
One negative aspect of this functionality is that a company that uses the PM module extensively may have 1000s U_XXXXXX type of variants.
You can include this functionality in your own ABAP programs too. Have a look at SAP’s ABAP code in program RIAUFK10 and routine VARIANT_START_F68.
Layout variants are used to control which data columns are shown in the report display screen.
The data columns can be chosen while the list is being displayed by using menu option Settings > Display variant > Current. The pop-up which is presented displays the current fields which have already been selected (on the left of screen) and those which can be chosen (on the right). List order, totals / subtotals and filtering can also be defined in a display variant and saved for future use with the menu options under the “Edit” submenu.
Note that if one or more columns have been selected (by clicking on the column title) when these menu options are initiated, the system will assume that the user wishes to order, filter etc. on those columns, otherwise a selection will be presented.
Once the display variant has been set up it can be saved using menu option Settings > Display variants > Save as variant. Subsequently the display variant can be selected by using menu option Settings > Display variants > Get.
Alternatively each user can nominate one default display variant using menu option Settings > Display variant > Administration. Select the display variant required and execute menu option Edit > Set initial var or simply click in the Initial variant column. Note that sort criteria, filtering and totals are not taken into consideration when downloading (e.g. to spreadsheet).
Lastly you can add this layout variant to the selection variant defined in the above section. This enables you to link the selection-screen data and the report display data together.
To deactivate the ALV grid view, enter the following PID Q_ALV_GRID_INACTIVE in your user profile
Also try PID 0AV (Order list: List variant)
Downloading to MS Access:
Before you can use MS Access you must first ensure that the following two RFCs have been created:
- PS_ACCESS_1 is used for downloading the table structure in MS Access format.
- PS_ACCESS_2 is used to populate the table created with PS_ACCESS_1.
These RFCs can be also used in the various PM/CS list edit reports to download data into MS Access. In the display screen you will find a menu option for Access. They can also used in the IBIP transaction.
For further details see OSS Note 583698: MS Access Interface
User-Exit for List Edit Reports:
IWOC0004: Change single-level list editing PM/QM/SM ALV settings
You can use this customer exit to alter how single-level lists are displayed in Customer Service, Plant Maintenance and Quality Management. When doing this, you can change accordingly various parameters and tables that are transferred from the report in the ABAP List Viewer (ALV). For example, the following changes are possible:
- Deactivate alternating white/gray display
- Set print parameters (with/without cover sheet)
- Change field attributes in the field catalog (hide fields, set automatic optimization of column widths, define fields as being mandatory)
- Change field grouping for field selection
- Enter a title for the list
BADIs for List Edit Reports:
|BADI: IWOC_LIST_TUNING||Performance Tuning for Lists in PM/CS|
|BADI: BADI_EAM_SINGLELEVEL_LIST||Enhancements to EAM Lists|
|User-Exit: IWOC0004||Change single-level list editing PM/QM/SM ALV settings|
You can use the Business Add-In to exchange the views used for elections in Plant Maintenance and Customer Service lists. To do this, you can use the methods CHANGE_VIEW to optimize the selection. In addition, you can exclude the main selection criterion from the selection, depending on the number of entries. The selected data records are then later checked according to these selection criteria.
- Remove selection variant protection – report RSVARENT. Allows you to delete somebody elses variant .
- Delete all user layouts for a user – report BCALV_LAYOUT
Emailing List Edit Reports:
Note: this will only work if your system is set-up for external emailing (see TCode SCOT)
- Create variant for the report you want to run
- S023: Create distribution list and add the email or SAP user name in distribution lists
- SM36: Define a simple job
- Specify Job start condition: Immediate checked and periodic job scheduled start No. start after
- Steps: ABAP program name and variant name
- Spool List Recipient: Define internal user or distribution list or external address.
- Save and release the background job.