what is the button to change the variant in alv?

Answer Posted / k.nagalakshmi

It depend when these "specific circumstances" are occurring?

Before displaying the ALV, then force the value of the
variant used in set_table_for_first_display,

CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
IS_VARIANT = GS_variant
I_SAVE = X_SAVE
CHANGING
IT_OUTTAB = GT_SFLIGHT.



If you want to simulate multiple "default variant" you
should "mislead" the ALV by changing the report name used
for storing variant (IS_VARIANT-REPORT) But in this case
you will no longuer see every variant when in the ALV, only
those of the "report name" passed when setting for first
display.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the max no of match code id's that can be defined for one match code object? : abap data dictionary

641


​​What is view proxy in abap?

785


what is 3 tire architecture and how does SAP utilizes this architecture. and how do netweaver came into picture?

1724


What are the differences between a database index and a match code?

592


What is the difference between collect and sum?

568






What is the collect statement? How is it different from append?

516


How can we handle table control in bdc? : abap bdc

588


While sorting field groups we cannot use more than one key field. State true or false. : abap modularization

582


What are the basic functions of database utility? : abap data dictionary

591


In which time constraint does the infotype records depend on the subtype ? : abap hr

629


How can we create callable modules of program code within one abap/4 program?

611


What are the differences between session method and call transaction method? : abap bdc

546


Explain how to write a bdc - how do you go about it?

597


What is synchronous update?

564


Define database layer?

611