Application Development 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: 

variants

Former Member
0 Kudos

hi experts

wt is variant how it will use in ALV, give me a simple program(ALV) using

VARIANT to understand function of variant.

2 REPLIES 2

Former Member
0 Kudos

Hi Raj,

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!

Reward if useful.

Thanks

Aneesh.

Former Member
0 Kudos

Hi Raj,

Variant is nothing but the data on the selection screen.

In actual business there may be chance that we require some report to be run daily based on the ceratin selection criteria. So to avoid daily entering the same value on the selection screen, we store these values as variant so that next time when we want to run that report we can call this variant.

To just understood the concept, goto any report's selection screen and enter values AND press SSAVE button. It will create a variant for you.

Hope it is clear.

Reward points if useful.

Regards,

Atish