‎2009 Oct 26 1:46 PM
Hi,
I am having 2 parameters in TVARVC Table.
1. Fiscal year - "SAP_SCMA_FISC_YEAR"
2. Period - "SAP_SCMA_PERIOD"
Do we have any program to update these 2 parameters with system defaults.
Today's date is 26/10/2009
Ex : Fiscal Year should be 2009
Period 09
It should be update on starting of every month?
Thanks
Bhuvana
‎2009 Oct 27 2:49 AM
Try creating a program which does BDC for SM30 of the table and you can update the values in the table.
Thanks,
Aravind
‎2009 Oct 27 10:55 AM
Hi,
Use FM 'RS_VARIANT_CHANGE',
The varaints related function modules can be found in Function group: SVAR.
Regards,
Praveen
‎2009 Oct 28 6:34 AM
Hi ,
You can use function module 'RS_CHANGE_CREATED_VARIANT' .
Regards
Satish
‎2009 Oct 28 6:36 AM
Hi,
Try using the Fm "RS_CREATE_VARIANT".
please close the thread, if solved
Regards,
Aditya
‎2009 Nov 10 3:47 PM
Hello,
You can wrote a progam like this exemple
SELECT * FROM TVARVC WHERE NAME = 'SAP_SCMA_FISC_YEAR'.
TVARV-LOW = new_value .
UPDATE TVARV.
ENDSELECT.
And you create a job wich start at the beginin of the month
Thierry
‎2009 Nov 11 1:32 PM
Hi,
Updating of table TVARVC Dynamically can be done by writing a program and scheduling the same as batch job to run at fixed interval as starting of the month.
Thanks,
Vengal Rao.
‎2009 Nov 13 12:19 PM
‎2010 Jan 22 6:42 AM
Hi Bhuvaneswari ,
Could you please post how you resolved the issue to update TVARVC table with system defaults.
As I have a similar reqt. where I wud be passing values from selection screen to update the TVARVC values.
Regards,
Gaurav
‎2010 Jan 22 10:07 AM
Hi,
Please check the below code.
INITIALIZATION.
p_date = sy-datum.
START-OF-SELECTION.
PERFORM fiscal_period_determine.
PERFORM update_tvarvc_table.
FORM fiscal_period_determine .
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
i_budat = p_date
i_bukrs = gc_bukrs
IMPORTING
e_gjahr = gv_year
e_poper = gv_period.
ENDFORM.
UPDATE tvarvc SET sign = gc_i opti = gc_eq low = gv_year WHERE name = 'SAP_SCMA_FISC_YEAR'.
IF sy-subrc = 0.
gv_flag1 = gc_x.
ENDIF.
UPDATE tvarvc SET sign = gc_i opti = gc_eq low = gv_period WHERE name = 'SAP_SCMA_PERIOD'.
IF sy-subrc = 0.
gv_flag2 = gc_x.
ENDIF.
IF gv_flag1 = gc_x AND gv_flag2 = gc_x.
MESSAGE 'TVARVC Table is Successfully Updated'(002) TYPE 'S'.
ELSE.
MESSAGE 'Error in Updating TVARVC Table'(003) TYPE 'E'.
ENDIF.
Thanks
Bhuvana
‎2010 Nov 18 9:48 PM