2018 Apr 24 10:39 AM
Hello Experts,
Anyone help me on how to set as default the current year and period in variant. I want to do a background job for our program using save variants. But I need the period and year to always be assigned what ever is the current year and period.
Please help me on this.2018 Apr 25 4:15 AM
Hi Satish,
you can use the initialization Event to calculate the year like 2018-3 and assigned to the Parameter/select-options .
Hello Experts,
Anyone help me on how to set as default the current year and period in variant. I want to do a background job for our program using save variants. But I need the period and year to always be assigned what ever is the current year and period.
Please help me on this.2018 Apr 24 12:08 PM
Hi Sathish,
"I need the period and year to always be assigned what ever is the current year and period
If current period is required, instead of using variant concept, you can default the values in program level itself like
"Declaration
PARAMETER: P_PERIOD TYPE PERIOD DEFAULT SY-DATUM+0(6).
"Else assign like below too
p_period = sy-datum+0(6).
Regards
Rajkumar Narasimman
2018 Apr 24 1:50 PM
Thanks for quick response.
I want to display current year - 3 years, for ex 2018-3 = 2015.
How can achieve this. Please help me on this.
2018 Apr 24 2:34 PM
"I want to display current year - 3 years, for ex 2018-3 = 2015.
Please do not share the requirement as it is, always do write the problem which you faced it when you tried the requirement.
Coming to the above issue, for calculation in the year, check whether any period variable is maintained already in TVARVC table, if it is available, use the same. If variable not available, create newly. Also, make sure that the period value in TVARVC table is updated by some background job monthly wise.
Regards
Rajkumar Narasimman
2018 Apr 24 7:32 PM
Hi Satish,
Following steps to consider setting up it.
1. Fill selection screen data and save the data as variant.
2. Define a Variant name and in "Field attributes" select the check box for "Selection variable".
3. Select 😧 Dynamic date calculation and choose corresponding date calculation (attached print).
Regards,
2018 Apr 25 4:15 AM
Hi Satish,
you can use the initialization Event to calculate the year like 2018-3 and assigned to the Parameter/select-options .
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |