Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select table fields on selection screen

Former Member
0 Likes
2,752

I have a requirement, where I need to select the table fields dynamically from the selection screen and further I should give option to user to save selected fields as variant and display the final report with the selected fields as catalog.

For EX: In the selection screen user have two options, one is to check the select fields option where all fields from KNA1 will display from that user will select few and he can save as variant. After execution the report output should display?

Could you please guide me how to go ahead?

Thanks,

A Raghu.

5 REPLIES 5
Read only

Former Member
0 Likes
1,291

Standard SAP ALV Layout functionality is similar to your requirement. Provide a layout input parameter in the selection screen for the user to choose already saved layouts. Enable the layout in the ALV output for the user to choose the list of fields and to save layouts.

Read only

Former Member
0 Likes
1,291

Hi

Why dont u use a query? Use the tcode SQ01.

In addition u can use the tcode SQVI.

Those are very simple to use and it does what u need.

Regards

Read only

Former Member
0 Likes
1,291

I'm agree with Suman you can present in the initialization parameter with the field of the tables and the make the fieldcat with that information you can check this examples of interactive reports to get an idea http://bit.ly/k6jFB4 and this for creating a dynamic AVL http://bit.ly/mflEEH

Read only

Former Member
0 Likes
1,291

Hi Raghu,

For your requirements, you have to define the all the select-options inyour code but at first display onlya few selected ones. Then you can give a button to the user to select the fields and depending on the selection you can hide/unhide the select-options.

For e.g. you define the select-options on your screeen for all the fields of KNA1. But at first go, display only the customer. Now give a button to the user on the toolbar. When user clicks on the button, give a popup to the user displaying all the fields except customer and allow him to select them. Based on the selection of the user, you can hide/unhide the select-options for the remaining fields.

Also, in this case your select query will be dynamic. The field list and the where clause have to be maintained in a string and then passed to the select statement.

Try the functions: FREE_SELECTION_INIT, FREE_SELECTION_DIALOG and MASS_SEL_FIELDS_ENTERPRISE.

Hope this helps,

Regards,

Himanshu

Read only

Former Member
0 Likes
1,291

Thanks