Application Development 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: 

Display of variant in ALV .

Former Member
0 Kudos

Hi Experts,

I need to see if any variant is selected or not

if it is selected , I need to display in the top of page of ALV

Please advice

Thanks..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think u r going to check whether a variant name is given in the selection screen or not. If it is then u need to check it's validity. If it is true then u can use the Fm REUSE_ALV_VARIANT_EXISTENCE to check the validity of the variant.

3 REPLIES 3

Former Member
0 Kudos

a better way to do this is to read the info from your selection screen and display that.

naimesh_patel
Active Contributor
0 Kudos

If you use the OO ALV than you have to use the method GET_FRONTEND_LAYOUT to get the Layout.

Like:


    call method gt_grid-grid->get_variant
      importing
        es_variant = es_variant.

If you use the classical ALV, than you have to get the Layout information from the ALV object created in the classical ALV.

Check out the solution of [Changing Subtotal in Classical ALV |http://help-abap.blogspot.com/2008/09/classical-alv-change-subtotal.html] on my professional blog. Instead of the Method to change the Subtotal, you have to use the method GET_VARIANT.

Regards,

Naimesh Patel

Former Member
0 Kudos

I think u r going to check whether a variant name is given in the selection screen or not. If it is then u need to check it's validity. If it is true then u can use the Fm REUSE_ALV_VARIANT_EXISTENCE to check the validity of the variant.