10-11-2007 11:24 AM
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?
10-11-2007 11:26 AM
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
10-11-2007 11:27 AM
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
10-11-2007 11:28 AM
*Try using different field catalogues and ur problem will be solved!
10-11-2007 11:42 AM
populate different values for the field <b>is_variant-handle</b> when you change the radio buttons
10-11-2007 11:51 AM
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.
10-11-2007 11:55 AM
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.