cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

All,

I have seen this come up as a question on the Forums before but I haven't been able to find any answers.

My texts table (/BI0/TCALMONTH) for 0CALMONTH is empty. I need to know how to fill it so that I can use month text variables in my queries.

Table T247 is populated, which appears to contain the descriptions I need, but how do I load these entries over to the text table of 0CALMONTH? Is there a standard extractor or function module I should be using?

We are on BI 7.0, SP17.

Thanks for your help!

Mischa

0 Likes
View Entire Topic
timo_litzbarski
Participant
0 Likes

I wrote a little report, maybe this could be helpfull:

   DATA: lv_year TYPE int4,
      lv_yearc(4) TYPE c,
      lv_monthc(2) TYPE c,
      lv_langu TYPE sy-langu,
      ls_calmontht TYPE /bi0/tcalmonth,
      lt_calmontht TYPE TABLE OF /bi0/tcalmonth,
      lt_montht TYPE TABLE OF t247,
      ls_montht TYPE t247.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS p_year type int4.
PARAMETERS p_langu type sy-langu.
SELECTION-SCREEN END OF BLOCK block1.

START-OF-SELECTION.

  lv_year = p_year.
  lv_langu = p_langu.

* get all month of current language
  SELECT * FROM t247 INTO CORRESPONDING FIELDS OF TABLE lt_montht WHERE spras EQ lv_langu.

loop at lt_montht into ls_montht.
  CLEAR ls_calmontht.
  lv_yearc = lv_year.
  lv_monthc = ls_montht-mnr.

  CONCATENATE lv_yearc lv_monthc INTO ls_calmontht-calmonth.
  ls_calmontht-langu = lv_langu.

  CONCATENATE ls_montht-ktx lv_yearc INTO ls_calmontht-txtsh SEPARATED BY space.
  CONCATENATE ls_montht-ltx lv_yearc INTO ls_calmontht-txtmd SEPARATED BY space.
  CONCATENATE ls_montht-ltx lv_yearc INTO ls_calmontht-txtlg SEPARATED BY space.

  APPEND ls_calmontht to lt_calmontht.
ENDLOOP.

modify /bi0/tcalmonth FROM TABLE lt_calmontht.

write: 'finished'.