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

alv grid layout problem

Former Member
0 Likes
1,137

Hi everyone,

I generating 2 alv reports within a program.In the selection screen there are 2 radio buttons for different alv reports. First i selected the 1st radio button and executed the prog to get a alv report.Then i went to change layout and selected the required columns from the columns set and then saved the layout as the default layout.

Then I came back to the selection screen again.Then i selected the 2nd radio button and executed the program.Here the program is again taking the default layout (even though i didn't any lauyout in the selection screen )and generating the alv report according to that.But i don't want to use the default layout when i select the 2nd radio button,unless i select it from the variant list.How can i do that?

Any suggestions please?

6 REPLIES 6
Read only

former_member404244
Active Contributor
0 Likes
802

Hi,

use tow different fieldcatalogs and also two different alv grid and see.please try ....

clear the variant when u call second time for the other radio button..

clear : wa_variant1.

CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'

EXPORTING

i_save = c_save

CHANGING

cs_variant = wa_variant1

EXCEPTIONS

wrong_input = 1

not_found = 2

program_error = 3

OTHERS = 4.

regards,

nagaraj

Read only

abdulazeez12
Active Contributor
0 Likes
802

Looks like u r using the same field catalog for both the ALVs..

Try using different ALVs and ur problem will be solved..

Cheers

Shakir

Read only

0 Likes
802

*Try using different field catalogues and ur problem will be solved!

Read only

Former Member
0 Likes
802

populate different values for the field <b>is_variant-handle</b> when you change the radio buttons

Read only

Former Member
0 Likes
802

Hi everyone

Thanks for all ur replies.Actually i m using function module REUSE_ALV_FIELDCATALOG_MERGE and passing a standard structure.i m using this same funtion module for both alv displays.I can't use different filedcatalogues for both.For second alv i m filtering the fieldcatalogue with some conditions and displaying it.

Read only

Former Member
0 Likes
802

hi,

Check whether same fieldcatalog or layout or variant have been used for both the screens. And make sure those are clerared before going to second one.