‎2008 Nov 20 11:31 AM
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 -
‎2008 Nov 20 12:06 PM
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
‎2008 Nov 20 12:11 PM
Hi:
Just save the input values with the relevant names.
Regards
Shashi
‎2008 Nov 20 12:11 PM
Hi,
To select variant use FM
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'U'
CHANGING
cs_variant = wa_variantand 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
‎2008 Nov 20 12:16 PM
hi,
I have developed a interactive report not a ALV report. Actually my requirement is to use variant in customized 'Z' pf-status
‎2008 Nov 20 12:46 PM
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