2008 Nov 06 8:16 AM
Hi All,
I have a small doubt,
Iam in support project. I am go through the program which is already developed someone.....
In that program, I saw one statement.....like.........
PARAMETERS : p_vari LIKE disvariant-variant.
data: is_variant LIKE disvariant.
Here, my doubt is, what is exact use of this Disvariant structure...............
please help me in this regard........
2008 Nov 06 8:33 AM
this will be the variant of the ALV list. The report displays an ALV list, and the user is able to choose on the selection screen, how the report should appear.
this will be the variant of the ALV list. The report displays an ALV list, and the user is able to choose on the selection screen, how the report should appear.
2008 Nov 06 8:33 AM
this will be the variant of the ALV list. The report displays an ALV list, and the user is able to choose on the selection screen, how the report should appear.
2008 Nov 06 8:40 AM
in alv report we haVE option to save the layout(that is selecting particular fields to be displayed--- filtering option an d can be saved as variant).....
like this u can create many variant .....
as per the need u can select the output(variant to be displayed) in report output..
2008 Nov 06 8:41 AM
Hi,
DATA: is_variant TYPE disvariant.
PARAMETER: p_layout LIKE is_variant-variant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_layout.
PERFORM alv_f4.
*&---------------------------------------------------------------------*
*& Form ALV_F4
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM alv_f4 .
is_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = is_variant
i_save = 'A'
IMPORTING
es_variant = is_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_layout = is_variant-variant.
ENDIF.
ENDFORM. " ALV_F4
At run time you just save the layout....that will display as layout variant in future...
but for this in ALV function....you have to include one thing..
in REUSE_ALV_GRID_DISPLAY..
..................
i_save = 'A'
.............................................
Arunima
2008 Nov 06 8:59 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |