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: 

I need some methods to replace REUSE_ALV_VARIANT_F4

0 Kudos

Hi guys,

I want to use some methods to replace the function module REUSE_ALV_VARIANT_F4, so I want to ask what class and methods will be used.

Thanks.

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

Did you try CL_SALV_LAYOUT_SERVICE=>F4_LAYOUTS ?

(Actually this static method calls FM REUSE_ALV_VARIANT_F4, when instance method CL_ALV_VARIANT->SELECT_VARIANT calls FM LT_F4_FOR_VARIANTS which is also called by REUSE_ALV_VARIANT_F4...)

5 REPLIES 5

Rajasekhar_Dina
Participant

Hello

You can use method GET_VARIANTS_FOR_USER of class CL_ALV_VARIANT.

0 Kudos

The method GET_VARIANTS_FOR_USER returns the ALV layout variants, it doesn't display any dialog to select one, as does the function module REUSE_ALV_VARIANT_F4. Better use method SELECT_VARIANT.

0 Kudos

Thank you very much for your answer. Although I have decided to learn how to use SELECT_VARIANT first, I will also learn how to use GET_VARIANTS_FOR_USER by comparison. Thank you again for your help

raymond_giuseppi
Active Contributor

Did you try CL_SALV_LAYOUT_SERVICE=>F4_LAYOUTS ?

(Actually this static method calls FM REUSE_ALV_VARIANT_F4, when instance method CL_ALV_VARIANT->SELECT_VARIANT calls FM LT_F4_FOR_VARIANTS which is also called by REUSE_ALV_VARIANT_F4...)

0 Kudos

Your answer is very helpful to me, F4_LAYOUTS because calls REUSE_ALV_VARIANT_F4 can be easily understood.

I will try to learn how to use SELECT_VARIANT through LT_F4_FOR_VARIANTS.