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

TVARV table

Former Member
0 Likes
1,955

Hi,

I've a report where there is the field Year.

If I save a variant the next year system will propose 2011 when that variant will be manually selected.

I would like the system will update automatically the value of the year.

I don't know how to do that by TVARV table

Best regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,325

For system will update automatically the value of the year

Use SY-datum+0(4)

regards

Ajit

7 REPLIES 7
Read only

Former Member
0 Likes
1,326

For system will update automatically the value of the year

Use SY-datum+0(4)

regards

Ajit

Read only

0 Likes
1,325

Hi,

where can I use SY-datum+0(4) ?

Regards

Read only

0 Likes
1,325

Hi ,

Could u be more specific is this a standard report or customization.

a) In case of customization we can do the following for ( Transaction Variant )

The variant gets stored in the table VARID and the variant values are checked in tables TVARC , TVARV.

In some programs the variants are assigned to selection selection screen . These tables are used on the basis of

variant maintenance

The are various scenarios in which it could be used

1) In case of execution of report on yearly basis

TABLES: TVARC

DATA: FROMDATE TYPE SY-DATUM.

UPDATE TVARV

SET LOW = SY-DATUM

(.. or use offset sy-datum +0(4) andcan pass the values)

WHERE NAME = 'FROMDATE'.

Please check the link below

b) For standard reports (STANDARD VARIANT) like FBL3N general legder line item display there are specific tcode

TCODE - FS00 -- > GO TO LINE ITEMS TAB --> G/L ACCOUNT LAYOUT.

Thanks,

Rajat Kumar Sharma

Read only

0 Likes
1,325

Hi,

it's a custom report, I can see the following after saving the variant:

http://imageshack.us/photo/my-images/5/immagineku.png/

http://imageshack.us/photo/my-images/821/immaginelfc.png/

Read only

0 Likes
1,325

Hi,

I solved using the date instead of the year thanks for your help

Read only

Former Member
0 Likes
1,325

You can refer below thread

and for dynamic variants with TVARV

http://wiki.sdn.sap.com/wiki/display/ABAP/Creatingdynamicvariantusingtable+TVARV

Thanks,

Pawan

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,325

Using TVARV (TVARVC)

First create a periodic (daily) job (or ask basis to) that executes standard report RVSETDAT, this report will update some values in TVARV (and TVARVC on more recent versions) (*)

Then in your variant use variable RV_ACTUAL_YEAR (Read [Using Variables for Date Calculations|http://help.sap.com/saphelp_nw04s/helpdata/en/c0/98039be58611d194cc00a0c94260a5/frameset.htm] in [Variable Values in Variants|http://help.sap.com/saphelp_nw04s/helpdata/en/c0/980398e58611d194cc00a0c94260a5/frameset.htm])

Other solution

Fill the field with SY-DATUM(4) in INITIALIZATION block, and in the variant definition, check the box "Save field without values" (Read [Variant Attributes|http://help.sap.com/saphelp_nw04s/helpdata/en/c0/98038ce58611d194cc00a0c94260a5/frameset.htm] in [Variable Values in Variants|http://help.sap.com/saphelp_nw04s/helpdata/en/c0/980398e58611d194cc00a0c94260a5/frameset.htm])

Regards,

Raymond

(*) You could also create a copy of the program in your namespace (Zxxx, Yxxx, etc.) and maintain your own variable