cancel
Showing results for 
Search instead for 
Did you mean: 

How to create "M_FISCAL_CALENDAR" in SAP HANA database?

shiromani_soni1
Active Participant
0 Kudos

I had generated time data using fiscal year and since table was not showing correct data, I thought to refresh data from "M_FISCAL_CALENDAR" table and therefore used drop table "M_FISCAL_CALENDAR", which has deleted the entire table from database.

Is there any way to revert it back?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Please drop the public synonym and try to  re-create the M_FISCAL_YEAR_CALENDAR table.

Former Member
0 Kudos

Hi Shiromani,

     If you drop a table, it will be an auto commit and you will not be able to revert the changes. You can create another m_fiscal_calendar table.

Go to the quick launch in modeler tab and click on "Generate Time Data" under Data.

Use the calendar type as Fiscal along with the years to be populated for and generate.

The new table M_Fiscal_Calendar with values will be visible in the _SYS_BI schema.

shiromani_soni1
Active Participant
0 Kudos

Hi Shrinivas/Sanjog,

Thanks for your reply, when I logged in to HANA system it was auto created, seems I didn't refresh so it was giving error.

Regards,

Shiromani Soni

0 Kudos

Hi Shiromani,

In this situation you can try to create it with below query.

Run it at your SQL Prompt.

CREATE COLUMN TABLE "_SYS_BI"."M_TIME_DIMENSION" ("DATETIMESTAMP" LONGDATE CS_LONGDATE NOT NULL ,

  "DATE_SQL" DAYDATE CS_DAYDATE,

  "DATETIME_SAP" VARCHAR(14),

  "DATE_SAP" VARCHAR(8),

  "YEAR" VARCHAR(4),

  "QUARTER" VARCHAR(2),

  "MONTH" VARCHAR(2),

  "WEEK" VARCHAR(2),

  "WEEK_YEAR" VARCHAR(4),

  "DAY_OF_WEEK" VARCHAR(2),

  "DAY" VARCHAR(2),

  "HOUR" VARCHAR(2),

  "MINUTE" VARCHAR(2),

  "SECOND" VARCHAR(2),

  "CALQUARTER" VARCHAR(5),

  "CALMONTH" VARCHAR(6),

  "CALWEEK" VARCHAR(6),

  "YEAR_INT" INTEGER CS_INT,

  "QUARTER_INT" TINYINT CS_INT,

  "MONTH_INT" TINYINT CS_INT,

  "WEEK_INT" TINYINT CS_INT,

  "WEEK_YEAR_INT" INTEGER CS_INT,

  "DAY_OF_WEEK_INT" TINYINT CS_INT,

  "DAY_INT" TINYINT CS_INT,

  "HOUR_INT" TINYINT CS_INT,

  "MINUTE_INT" TINYINT CS_INT,

  "SECOND_INT" TINYINT CS_INT,

  "MONTH_LAST_DAY" TINYINT CS_INT,

  PRIMARY KEY ("DATETIMESTAMP")) UNLOAD PRIORITY 0 AUTO MERGE

Hope this will work.

Thanks,

Shriniwas

shiromani_soni1
Active Participant
0 Kudos

Hi Shrinivas,

Thanks for your reply however I am getting error "cannot create duplicate table name".

Regards,

Shiromani Soni