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

Layout Management in Table Control

Former Member
0 Likes
808

Hi Dialog Programming Experts,

I have a new requirement - adding Layout Management options in Table Control. This is dialog/module programming, not ALV Report. Is there a function module for this?

Thanks so much in advance for your help.

Regards,

Joyreen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
643

Hi,

I would also like to know how to add the filter controls like in ALV... The function modules require ALV parameters... I would like to know which parameters should be populated. Thanks!

5 REPLIES 5
Read only

Former Member
0 Likes
644

Hi,

I would also like to know how to add the filter controls like in ALV... The function modules require ALV parameters... I would like to know which parameters should be populated. Thanks!

Read only

0 Likes
643

Hi

For filter use the following function modules,

l_rightx-id = l_index.
  l_rightx-fieldname = 'DESCR'.
  l_rightx-text = text-054.
  APPEND l_rightx TO i_rightx.
  l_index = l_index + 1.
  CLEAR l_rightx.
  l_rightx-id = l_index.
  l_rightx-fieldname = 'DEL_CM'.
  l_rightx-text = text-055.
  APPEND l_rightx TO i_rightx.

CALL FUNCTION 'CEP_DOUBLE_ALV'
       EXPORTING
            i_title_left  = text-034
            i_title_right = text-035
            i_popup_title = text-036
       IMPORTING
            e_cancelled   = l_cancelled
       TABLES
            t_leftx       = i_leftx[]
            t_rightx      = i_rightx[].

Firstly populate the right table with all fields which you want in the filtering condition. The left table will be populated once the use selects some fields and transfer it to the left portion of the dialog.

Then use the following FM like this.

DATA: i_group TYPE lvc_t_sgrp.
      CALL FUNCTION 'LVC_FILTER_DIALOG'
           EXPORTING
                it_fieldcat   = i_fldcat1
                it_groups     = i_group
           TABLES
                it_data       = i_ziteminvoice[]
           CHANGING
                ct_filter_lvc = i_filter
           EXCEPTIONS
                no_change     = 1
                OTHERS        = 2.

here filter table should have fields from left table above.

Once you get the filter data, populate range table for each fields and then delete your internal table using these range.

CASE l_filter-fieldname.
              WHEN 'ITMNO'.
                l_itmno-sign = l_filter-sign.
                l_itmno-option = l_filter-option.
                l_itmno-low = l_filter-low.
                l_itmno-high = l_filter-high.
                APPEND l_itmno TO li_itmno.
                CLEAR l_itmno.
DELETE i_ziteminvoice WHERE NOT  itmno IN li_itmno OR
                                      NOT  aedat IN li_aedat OR...

First check this if it works, else let me know.

Thanks

Sourav.

Read only

0 Likes
643

Hi Sourav,

I already did the code, and I was able to use it successfully. I just did trial and error on the function modules you mentioned.

Your thread really helped alot! Thanks so much for this!

Read only

0 Likes
643

okay thats great....i hope you could also solved the layout part. in case you require any kind of information, please let me know.

Read only

0 Likes
643

Hi Sourav,

If u have already solved this functionality can u please post me the code.

Thanks in advance,

Ravi