‎2010 Mar 01 10:49 AM
Hi experts,
I want to modify (or create) a report variant for a program with ABAP. I need to do this c'ause in this case it's impossible to execute a submit.
Is it possible to do it with a function módule or ABAP code? I only need to change the value of one of the variables.
Thank you very much,
Artur.
‎2010 Mar 01 10:54 AM
Hi , Just give RS_VARIANT* in SE37 and press F4 .It will give you the list of function modules using which we can play with variants of ABAP Reports. Regards, Lakshman
‎2010 Mar 01 10:54 AM
Hi , Just give RS_VARIANT* in SE37 and press F4 .It will give you the list of function modules using which we can play with variants of ABAP Reports. Regards, Lakshman
‎2010 Mar 01 12:13 PM
‎2010 Mar 01 2:56 PM
You can use Function modules:
CALL FUNCTION 'RS_VARIANT_EXISTS'
EXPORTING
report = 'RHINTE00'
variant = 'ALIGNMENT'
IMPORTING
r_c = lf_rc
EXCEPTIONS
not_authorized = 1
no_report = 2
report_not_existent = 3
report_not_supplied = 4
OTHERS = 5.
CALL FUNCTION 'RS_VARIANT_DELETE'
EXPORTING
report = 'RHINTE00'
variant = 'ALIGNMENT'
flag_confirmscreen = 'N'
flag_delallclient = 'N'
IMPORTING
VARIANT =
EXCEPTIONS
not_authorized = 1
not_executed = 2
no_report = 3
report_not_existent = 4
report_not_supplied = 5
variant_locked = 6
variant_not_existent = 7
no_corr_insert = 8
variant_protected = 9
OTHERS = 10.
ENDIF.
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = 'RHINTE00'
curr_variant = lf_variant
vari_desc = ls_vari_desc
TABLES
vari_contents = lt_valutab
vari_text = lt_vari_text
VSCREENS =
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_exists = 7
variant_locked = 8
OTHERS = 9.
Of course you need to change the program name and the variant name with your own.
Hope it can helps you.
Edited by: robcom69 on Mar 1, 2010 3:56 PM
‎2010 Mar 01 10:58 AM
Hi,
Tables : VARID,RSVAR
The above are the TABLES to store the variant for reports . By using the above table and achieve your requirement.
Regards
Nehruu