‎2007 Sep 07 6:59 AM
hi all,
how to create variants for an abap program. for one abap program can we create differents variants.
If so pls let me know how to create as well as how to transport varaints.
if u have any docs send it across to my email id ha_rock@yahoo.com
regds
haritha
‎2007 Sep 07 7:01 AM
In selectin screen give the data and press save and create variant.
‎2007 Sep 07 7:03 AM
For creating varient just run ur program,
And enter the values into the inpur parameters or select-options.
then press the save button,
after it will display another screen which will ask about the varient name and its discription, fill it and save it,
your varient will created.
Same way u can create another varient also
‎2007 Sep 07 7:09 AM
hi haritha
after input to selection-screen PRESS SAVE button
The varient screen will opens give the text to create varient(related as program input)
and save it.
‎2007 Sep 07 7:16 AM
hi all,
in which tables does those abap varaints are stored can anyone tell me the table name in which those variants are stored.\
regds
haritha
‎2007 Sep 07 7:25 AM
Hi Harita,
Variants are stored in table VARID.
Regards,
Raghu.
*Reward points if useful
‎2007 Sep 07 7:20 AM
HI,
to create a varient,
just run the program
on the selection screen give the values you want in ur varient
press save
give varient decription
ur varient will be saved
for more details about varients
see this saphelp site
http://help.sap.com/saphelp_nw04/helpdata/en/c0/980389e58611d194cc00a0c94260a5/content.htm
thanks
vivekanand
‎2007 Sep 07 7:21 AM
hi,
in selection screen which u get before output [input screen] after giving all values -> click save -> give name and desc for variant -> u can get it automatically in standard tool bar .
for transporting variants :
Execute program RSTRANSP (via se38) and give the source and target program and variant names..
hope this is helpful..
with regards,
Suresh Aluri.
‎2007 Sep 07 7:31 AM
hi,
go to transaction shd0.
select the tab transaction variants.
in transaction code: give the tr code for which u want to create variant ie fb50.
in transaction variant givwe the name of variant ie zfb50.
now click create it will take u to the initial screen of fb50.
hit enter it will throw another screen which would show technical name of the fields with check boxes have different options i.e withg contents ,invisible, required etc.
just check check boxes as per your need.
<b>click save & move to the next screen.
but when u get to the last screen click exit & save</b>.
i hope this helps rgds.
reward points if it helps
‎2007 Sep 07 7:43 AM
Variants can easily be saved when running a report program by clicking the save/disk icon, there you give a name and can input some attributes of variant (hide, protect or fill parameters and select-options)
These variants are stored in three tables
- VARID - header
- VARIT- texts
- VARI - data and attributes (INDX like file, via IMPORT/EXPORT FROM DATABASE)
To access VARI, use FM of group SVAR (exist, copy, add, maintain)
RS_VARIANT_VALUES_TECH_DATA will give you values stored in variant
Regards
‎2007 Sep 07 7:49 AM
‎2007 Sep 07 7:52 AM
hi haritha,
To create a variant, just run the program i.e (F8) then in the selection-screen give the values for select-options or parameters or anything else.., and then press the save button then a window will open in that specify the variant name and description and press SAVE button.
<b>please reward points if helpfull.</b>
with regards,
radhika kolluru.
‎2011 Jan 21 6:14 AM
Hello,
Use the FM: RS_CREATE_VARIANT.
Code:
DATA: ls_vari_desc TYPE varid,
lt_var_val TYPE TABLE OF rsparams,
ls_var TYPE rsparams,
ls_varit TYPE varit,
lt_varit TYPE TABLE OF varit,
lv_variant_exists TYPE sy-subrc,
lt_var TYPE TABLE OF raldb_vari.
ls_vari_desc-mandt = sy-mandt.
ls_vari_desc-environmnt = 'A'.
ls_vari_desc-ename = sy-uname.
ls_vari_desc-edat = sy-datum.
ls_vari_desc-etime = sy-uzeit.
ls_vari_desc-report = <<Your report name>>.
ls_vari_desc-variant = <<Required variant name for above mentioned report>>.
**values for variants
ls_var-kind = 'P'. "if its of type parameter... or value 'S' for select-option
**Assign values for all required fields
ls_var-selname =
ls_var-low =
APPEND ls_var TO lt_var_val.
ls_var-selname =
ls_var-low =
APPEND ls_var TO lt_var_val.
**Text table -> description for a variant
ls_varit-mandt = sy-mandt.
ls_varit-langu = 'EN'.
ls_varit-report =
ls_varit-variant =
ls_varit-vtext =
APPEND ls_varit TO lt_varit.
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report =
curr_variant =
vari_desc = ls_vari_desc
TABLES
vari_contents = lt_var_val
vari_text = lt_varit
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.
Cheers,
Arvind
‎2011 Jan 24 6:03 PM
Hi,
In se38, give program name, following below steps would helpful
execute goto -> variant from the pull down menu
here you can see the existing variants for the program or create a new one
to execute the program with a variant, from the main screen in SE38, execute Shift+F6, click on variant and execute.