14
Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database Applies to: ECC 6.0 For more information, visit the ABAP homepage . Summary Any report or Transaction code which uses Logical Database has a feature to show dynamic selection screen, which contains the fields of the tables associated with corresponding Logical Database. Here we will learn how to make any field available on the Dynamic Selection Screen. Author: Anurita Waghe Company: Larsen & Toubro InfoTech Ltd Created on: 3 Aug 2009 Author Bio The author has 4.5 years of experience in SAP ABAP and is working with L&T InfoTech. She has worked for various Support and Implementation Projects which includes ABAP developments. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1

SAP Adding fields to dynamic selection for fbln transactions (2)

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

Applies to: ECC 6.0

For more information, visit the ABAP homepage.

Summary Any report or Transaction code which uses Logical Database has a feature to show dynamic selection screen, which contains the fields of the tables associated with corresponding Logical Database. Here we will learn how to make any field available on the Dynamic Selection Screen.

Author: Anurita Waghe

Company: Larsen & Toubro InfoTech Ltd

Created on: 3 Aug 2009

Author Bio The author has 4.5 years of experience in SAP ABAP and is working with L&T InfoTech. She has worked for various Support and Implementation Projects which includes ABAP developments.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1

Page 2: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

Table of Contents Selection Screen in Logical Database ................................................................................................................ 3

Adding New Field on the Selection Screen..................................................................................................... 4 Get the Logical Database Used by the Transaction Code ........................................................................................... 4 Add the Field on Selection Screen ............................................................................................................................... 5

How It Suppresses the SAP Standard Selection View? ................................................................................... 12 Related Content ................................................................................................................................................ 13 Disclaimer and Liability Notice .......................................................................................................................... 14

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 2

Page 3: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

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 QA33 for Inspection Lot.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 3

Page 4: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

On clicking that button, selection screen opens a window where user can further pass certain selection criteria. In this case we cannot see any field on the right side, which is explained further.

We will learn how any additional field can be made available on this Dynamic Selection Screen.

As an example, Transaction Code QA33 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 QA33.

2. On the Selection Screen go to menu System > Status.

3. One pop up window appears which shows the Program name. Here RQEEAL10 is the program associated with Transaction code QA33.

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 PGQ is the Logical Database used by the Transaction Code QA33.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 4

Page 5: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

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 PGQ.

2. From the Menu Bar go to Extras > Selection Views.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 5

Page 6: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

3. On the next screen which appears select Origin of View as SAP and Name of View as STANDARD, and click Display Button.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 6

Page 7: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

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. QALS, QAOBJMS, QPRN, QAVE, 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.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 7

Page 8: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

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 have to be transportable.

7. When the selection view is copied then go to Change mode to add the new fields.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 8

Page 9: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

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.

Save the changes.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 9

Page 10: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

9. Now execute Transaction code QA33, and open the Dynamic Selection Screen. You will find the selected fields on the right side of the selection screen.

10. In the Selection View there are some fields which are not even assigned to any Functional Group. Let us learn how to add those fields.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 10

Page 11: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

11. Scroll down the SAP Selection View, there you will find some fields that are not assigned to any Functional Group and consequently the checkbox for Preselect does not appear for those fields.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 11

Page 12: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

12. To select these fields first assign them to any Functional Group.

Here three fields STAT15, ZAEHL1 and PRBNAVV are assigned to Functional Group 01.

Fields can be assigned to different Functional Groups also.

13. Now the Preselect Checkbox appears for these fields. It can be selected as explained earlier.

And these fields can also be made available on the dynamic selection screen.

How It Suppresses the SAP Standard Selection View? When a selection view with origin CUS and name STANDARD exists, and is assigned to a logical database, then this view takes precedence over the SAP-defined view. When such a view does not exist for a particular logical database, then the selection view SAP – STANDARD is used to determine the dynamic selections

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 12

Page 13: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

Related Content http://www.sdn.sap.com/

http://help.sap.com/

For more information, visit the ABAP homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 13

Page 14: SAP Adding fields to dynamic selection for fbln transactions (2)

Add New Field on the Dynamic Selection Screen of Any Report Using Logical Database

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 14

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.