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

Former Member
0 Likes
919

hi,

what is variant?need for creating variant.in what areas it is helpful?

can anyone explain me.<b></b>

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
870

Hi,

Variants are more useful when you need to schedule a job in background and fill the selection screen variables with some value.

Then you save the screen values in a variant and schedule the program in background with this variant setting. At the scheduled time, the program will execute with the values what you have set through the variant.

Regards

Subramanian

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
870

Pl check this <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c0/98037ae58611d194cc00a0c94260a5/content.htm">SAP Help</a>.

~Suresh

Read only

Former Member
0 Likes
871

Hi,

Variants are more useful when you need to schedule a job in background and fill the selection screen variables with some value.

Then you save the screen values in a variant and schedule the program in background with this variant setting. At the scheduled time, the program will execute with the values what you have set through the variant.

Regards

Subramanian

Read only

Former Member
0 Likes
870

Hi,

Already Mr.Subramanian has give some explanation .In addtion to that

See the types of varients.

Use transaction variant to make your fields mandatory, hidden or display. You can hide unwanted screens and fields in any of the standard SAP programs without changing any of the standard programs. Additional features such as making the variant as default on the standard SAP transaction code is only available on 4.6x.

Steps:

Transaction SHD0 - Create a variant for the required transaction bychanging the layout through hiding fields and screens.

Transaction SE93 - Create a variant transaction (e.g. for VA02 you canname it as ZA02). Next allocate the transaction variant to this varianttransaction.

Create and change the Zxxx area menu with the new transaction variant. In this way, the user does have to remembers any extra transaction codes.

In 4.6c, you can default your transaction variant as the standard variant. (SHD0 - Edit -> Activate/Deactivate asstandard variant)

An example for using transaction variant (restricting the field displayfor CO11N - Goods movement) :-

If you want to restrict changes to the fields in Goods movement forone group of users.

1. Create a transaction variant for CO11N

2. Create a new transction code for the transaction variant and assign an authorization object to it

3. Divide the users into this two transaction code. Those who can change the field using CO11N. For those that have limited

field change, give them the authorizationfor ZCO11 (this is a new transaction code you have to create).

For more information, please check this links:

http://help.sap.com/saphelp_webas620/helpdata/en/eb/5fab41d79b11d296190000e82de14a/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/43/132f9803d76f40e10000000a422035/content.htm

http://www.sapgenie.com/abap/tvar.htm

Don't forget to reward if useful

Read only

Former Member
0 Likes
870

Hi abi,

Go through this info.

so for example i have a variable in my query with ready to input option...so when ever i run the query it will be asking me to give inputs so instead of that i can fill a value and save it as a variant. so no need of giving the value for variable when the query runs next time.

Use SE75 to create your own custom text ID for SAVE_TEXT object

Finding a user exit when you only have the function module name: Use table MODSAP with member=function module. This will give you the enhancement name that you can enter in SMOD.

To execute on OS command in SAP: Use program RSBDCOS0

Transaction Variants

Use Transaction Variants to make fields Mandatory, Hidden or Display. Also applicable to screens and tabstrips.

You can hide unwanted screens and fields in any of the standard SAP programs without changing any of the standard programs. Additional features such as making the variant as default on the standard SAP transaction code is only available as of 4.6x.

Transaction SHD0 - Create a variant for the required transaction by changing the layout through hiding fields and screens.

Transaction SE93 - Create a variant transaction (e.g. for VA02 = ZVA02).

Next allocate the transaction variant to this variant transaction.

In 4.6c, you can default your transaction variant as the standard variant. (SHD0 - Edit -> Activate/Deactivate as standard variant)

tables: tbtco.

data: jobcnt(1) type n,

t_sdluname like tbtco-sdluname,

t_strtdate like tbtco-strtdate,

t_strttime like tbtco-strttime.

  • ZXXX is the job name to check for

select * from tbtco where jobname = 'ZXXX'

and strtdate = sy-datum

and status = 'R'.

add 1 to jobcnt = jobcnt.

if jobcnt = 1.

t_sdluname = tbtco-sdluname.

t_strtdate = tbtco-strtdate.

t_strttime = tbtco-strttime.

else.

exit.

endif.

endselect.

if sy-subrc = 0.

if jobcnt >= 1.

message i999(b1) with t_sdluname ' has released job on '

t_strtdate t_strttime.

endif.

endif.

Use Transaction Variants to make fields Mandatory, Hidden or Display. Also applicable to screens and tabstrips.

You can hide unwanted screens and fields in any of the standard SAP programs without changing any of the standard programs. Additional features such as making the variant as default on the standard SAP transaction code is only available as of 4.6x.

Transaction SHD0 - Create a variant for the required transaction by changing the layout through hiding fields and screens.

Transaction SE93 - Create a variant transaction (e.g. for VA02 = ZVA02).

Next allocate the transaction variant to this variant transaction.

In 4.6c, you can default your transaction variant as the standard variant. (SHD0 - Edit -> Activate/Deactivate as standard variant)

Using Transaction variants

Change SAP standard screens by hiding fields, screens, tabstrips, changing field properties, ... read on

Show all users per Application server

Transaction AL08

To log a user off via an ABAP

CALL 'SYST_LOGOFF'.

Advanced SM04 program

The following program displays the Ip address , workstation name , Nt user name etc. Plus you can send instant messages to users just by clicking on the user name. It will show a red band for users who exceeds session limit. ( That you can adjust ). Created this for R/3 4.6C and above. (Submitted by Joy Ramachandran) - Click here to download zuser.txt

Changing the SAP Logo on the top right of the SAPGui

Change file sapalogo.bmp in directory C:\Program Files\SAP\FrontEnd\SAPgui\themes\default (SAP 4.6C)

Changing the Logo on the Right Hand Side ( Courtesy of: http://sapr3.tripod.com/ )

Transaction code - SMW0

X - Binary data for WebRFC application

Hit Enter

Click Execute

Click Settings -> Maintain MIME types

Click the Create button

Fill in :- TYPE : image/gif EXTENSION : .GIF

Click Save

Click Back to the Binary data for WebRFC

Click Create

Fill in :- Obj. name : ZXXXX.GIF Description : Company Logo

Click Import and specify the filename where your GIF file is located.File type is BIN. Finish press the Transfer button.

If successful, your logo will be shown in the Binary data for WebRFC.

Transaction codeSM30 - Table/View - SSM_CUST

Click Maintain

Click New Entries

Name Value to be set

START_IMAGE ZXXXX.GIF

RESIZE_IMAGE NO

Logoff and Login again

Automated transports

...so no need of giving the value for variable when the query runs next time,

BUT YOU HAVE TO CHOOSE THE VARIANT SAVED BEFORE...

Otherwise, if your intention is doing nothing, you have to look at personalization function:

http://help.sap.com/saphelp_nw2004s/helpdata/en/01/42c73c13b0ce5be10000000a114084/frameset.htm

Hope it helps!

*******Rewards some points.

Rgds,

P.Naganjana Reddy

Read only

Former Member
0 Likes
870

Hi,

Variant is created for reusing the set of values in the select options for executing the program .

when a particular values are entered for everytime of execution variants become helpful.

reward if useful,

rushi.