cancel
Showing results for 
Search instead for 
Did you mean: 

dyanamic selection screen accordingly output

Former Member
0 Kudos

Hi Experts,

I want to making dyamic selection screen on there I take two fields only customer number and date.

It can be change the position of fields. In following ways.

First time selection screen : customer no

Date.

If I insert first value in customer field then output will come

In tree Report

Customer

Sales order

Items no. material no. order qty net price currency.

Second time selection screen : Date

Customer no.

If I selected date and inserted values in date field then output will get

Date

Sales order

items no material no. order qty net price currency.

This my requirement , I will try to making by using OOP ALV. Can any one give me any example or any standard such type of report for help.

Regards

Pravin

Accepted Solutions (1)

Accepted Solutions (1)

former_member218674
Contributor
0 Kudos

Hello Pravin,

You can try this way:

1. Create basic selection screen with customer number and date field.

2. Now on START-OF-SELECTION you can call another screen which will display data in ALV.

3. Main part is of creating internal table dynamically depending on which field is selected on first selection screen,

4. So you can use static method cl_alv_table_create=>create_dynamic_table for creating dynamic table.

5. so load fieldcatalog table with required field as per the field selection and call method as follow:



DATA table TYPE REF TO DATA.

FIELD-SYMBOLS <ITAB> TYPE ANY TABLE.

call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = fieldcatalog_tab
importing
ep_table = table.

Now, here table is data object having reference to internal table created dynamically.

so you can assign that table to field symbol as follows:



ASSIGN table->* to <ITAB>.

Now you select data into table <ITAB> and pass it to ALV method SET_TABLE_FOR_FIRST_DISPLAY.

There are lot of threads on SDN for creating ALV using OOP method.

Hope this helps!

Thanks,

Augustin.

Answers (0)