‎2011 Oct 04 9:23 AM
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
‎2011 Oct 04 10:46 AM
For system will update automatically the value of the year
Use SY-datum+0(4)
regards
Ajit
‎2011 Oct 04 10:46 AM
For system will update automatically the value of the year
Use SY-datum+0(4)
regards
Ajit
‎2011 Oct 04 10:48 AM
‎2011 Oct 04 11:50 AM
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
‎2011 Oct 04 1:43 PM
Hi,
it's a custom report, I can see the following after saving the variant:
‎2011 Oct 04 3:16 PM
Hi,
I solved using the date instead of the year thanks for your help
‎2011 Oct 04 1:06 PM
You can refer below thread
and for dynamic variants with TVARV
http://wiki.sdn.sap.com/wiki/display/ABAP/Creatingdynamicvariantusingtable+TVARV
Thanks,
Pawan
‎2011 Oct 04 1:42 PM
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