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

Variant in interactive report

Former Member
0 Likes
630

Moderator message: please do NOT offer points

Hi Experts,

I have developed a interactive report with customized PF-Status.

Now my requirement is to use variants in this report.

so Can one please help me to know the code for 'Variant'.

<<text removed>>

regards,

Kishore

Edited by: Matt on Nov 20, 2008 1:17 PM -

5 REPLIES 5
Read only

former_member150733
Contributor
0 Likes
559

In your reports selection screen, enter the input values to run the report. After entering the input values press 'SAVE' to save the input values as a variant.

Hop this helps.

Regards,

Anish Thomas

Read only

Former Member
0 Likes
559

Hi:

Just save the input values with the relevant names.

Regards

Shashi

Read only

Former Member
0 Likes
559

Hi,

To select variant use FM

CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
       EXPORTING
            i_save        = 'U'
       CHANGING
            cs_variant    = wa_variant

and pass the selected variant to alv and activate saving option in alv by setting U variant save

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            i_callback_program = v_progname
            i_background_id    = ' '
            is_layout          = gs_layout
            it_fieldcat        = i_fieldcat2            
            i_save             = 'U'                     
            is_variant         = wa_variant

Regards,

Nandha

Read only

0 Likes
559

hi,

I have developed a interactive report not a ALV report. Actually my requirement is to use variant in customized 'Z' pf-status

Read only

Former Member
0 Likes
559

You have to do it using your own code.

On Save button,

call FM, RS_REFRESH_FROM_SELECTOPTIONS to capture all values on screen in table Selection_table.

Use FM RS_VARIANT_SAVE_FROM_SELSCREEN to pop up standard screen for saving variant ..

Use FM RS_CHANGE_CREATED_VARIANT to change values of above created variant with values you have fetched from first FM call (Selection_table).

This will be to handle saving variant.

To fetch variant , you have to add "Get Variant" button in your PF-status.

You may exclude this button, if no variant exists by using Exclude functionality of PF-STATUS.

example : SET PF-STATUS 'PF01' EXCLUDING gt_extab

On Get_variant --

You can use FM RS_VARIANT_CATALOG to pop up screeen for variant selection.

Use FM RS_VARIANT_CONTENTS to get variant contents

Looping at selection_table, you can refresh values of screen elements (There is FM to do this, i do not recall that -- you can check Function Group SVAR to get more FM for variant operations)..

Regards,

Mohaiyuddin