Add New Field on the Dynamic Selection Using Logical Database
Customer always asking some additional fields either in the selection screen or in the output of a report and we try to convince the customer as it’s a standard report we can’t change or with the help of Abapers we are changing the reports.
I prepared this attached document which can help you to add the new fields in the standard report without any help of Abapers .
Selection Screen in Logical Database :
Whenever any report is created by using Logical database or, if any Transaction Code is using any Logical Database, in those cases we can observe that the Dynamic Selection Button automatically appears on the Selection Screen.
As an example, below is the screenshot of Transaction code FBL5N for Customer Line Item Report .
On clicking that Dynamic Selection button, selection screen opens a window where user can further pass certain selection criteria.
We will learn how any additional field can be made available on this Dynamic Selection Screen.
As an example, Transaction Code FBL5N is referred throughout the document.
Adding New Field on the Selection Screen
Now our requirement is to add new field on the left-hand side folder (as well as in the selection screen) that is not present currently.
For this we need to get the Logical Database which is used by the report.
Get the Logical Database Used by the Transaction Code
Following steps are followed to get the Program Name of any Transaction Code:
1. Execute Transaction Code FBL5N.
2. On the Selection Screen go to menu System > Status.
3. One pop up window appears which shows the Program name. Here RFITEMAR is the program associated with Transaction code FBL5N.
4. Double click the program name. It will navigate to the ABAP Editor of the concerned program.
5. In the ABAP Editor go to the menu Goto > Attributes. This displays the attributes of the program.
6. This shows the logical database which is used in the program. In the below screenshot it can be observed that DDF is the Logical Database used by the Transaction Code FBL5N.
Add the Field on Selection Screen
Following steps are followed to add the field on the selection screen:
1. Go to Transaction code SE36 and give the name of Logical Database as DDF.
2. From the Menu Bar go to Extras > Selection Views.
3. On the next screen which appears select Origin of View as SAP and Name of View as STANDARD and click Display Button.
4. This shows the Standard Selection View. In the below screen shot it can be observed that there is a column named as ‘Preselect’. By default, only those fields appear on the selection screen of Transaction Code which are assigned to any Functional Group and the checkbox for Preselected is selected. SAP uses the below view to generate the dynamic selection screen. The top left side shows the Functional Groups involved with this Logical Database. Each Functional Group contains fields from the tables that are listed on the right side e.g. KNA1, ADDR1_VAL, KNAS, KNKA, KNKK,KNBK etc. The field which is assigned to a functional group will be available in left hand side of the dynamic selection screen under the folder with name of the functional group.
5. As we want to extend the SAP-delivered dynamic selections with new fields, so we must create our own selection view. This view will have CUS as the Origin of View, and Name of View as STANDARD. To create such a view, simply use the Copy button on the top of the screen, and copy the SAP delivered view to a CUS view.
6. Once you check the Continue Button it will ask for the Package in which the Customized View has to be saved. And create the Transport Request if the changes must be transportable.
7. When the selection view is copied then go to Change mode to add the new fields.
8. If any field is already assigned to any Functional Group, then just select the Checkbox of Preselect to make the field available for dynamic selection screen.
In the Table KNAS we added VAT Registration Number under Functional Group 01 Customer Master
9. Now execute Transaction code FBL5N and open the Dynamic Selection Screen. You will find the selected fields .
You can Get the report as per the Requirement .
By Using the blog ,lot of Customer can benefited by saving money and time and one more big advantage is without knowledge of ABAP , One Functional consultant can Configure this to get the fields in the standard Report .