cancel
Showing results for 
Search instead for 
Did you mean: 

Using BC Budgets extractor Z_SADERPBUDGETS in SPM generates dump.

Former Member
0 Kudos

Hi All,

Generating the extractor for the BUDGET object in z_sa_depd through the standard method, without modification generates Z_SADERPBUDGETS.

When testing this in RSA3, a dump is generated.

This is caused by the function module TXW_CALENDARYEAR_MONTH not being present. This function module belongs to the Function Group "DART: Utilities."

I don't know anything about DART (Data Retention Tool). Is this standard ECC content? Is the data retention tool therefore considered a pre-requisite to SPM?

Has anyone else encountered this error? Or is the FM TXW_CALENDARYEAR_MONTH found almost ubiquitously on ECC installations?

Many thanks for any help

Neil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Neil,

I havent seen this error in past so I think most of the customers do have Data Retention tool which is why we never got tis error. This FM is used here to convert fiscal year to calendar year. You can change the code to use any other generic function for this conversion or you can create your own FM for the purpose.

Thanks,

Divyesh

Former Member
0 Kudos

Hi,

I'm am having the exact same issue, and was just wondering if you were able to use another function to supplement for the missing one? if so what was the name of it, and if you created your own, could you please share the code?

Regards,

Amit

Former Member
0 Kudos

Hi Amit,

We ended up developing on another box that had the FM present.

The FM stated above has the following code:

This should give you most of the information you need to make your own.

Hope this helps

Kind regards,

Neil

FUNCTION TXW_CALENDARYEAR_MONTH.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(YEAR) LIKE BKPF-GJAHR

*" VALUE(PERIOD) LIKE BKPF-MONAT

*" VALUE(COCD) LIKE BKPF-BUKRS

*" TABLES

*" R_DJAMON

*"----


  • this FM is for converting fiscal year and period to calendar year

  • and month.

  • this FM does not take into account

  • 1. Change of fiscal year variant inbetween year

DATA: fiscalyear_variant like T001-PERIV,

MONTH LIKE T009B-BUMON,

CALENDAR_YEAR LIKE BKPF-GJAHR,

XJABH like T009-XJABH,

ANZBP like T009-ANZBP,

XKALE like T009-XKALE,

yearshift like T009B-RELJR,

t_poper like t009b-poper,

counter type i,

t_t009b like t009b occurs 99 with header line.

DATA: BEGIN OF year_month,

wyear like bkpf-gjahr,

wmonth like t009b-bumon,

END OF year_month.

RANGES:

w_djamon for VIOB05-DJAMON.

w_djamon-option = 'EQ'.

w_djamon-sign = 'I'.

SELECT PERIV INTO fiscalyear_variant

FROM T001

WHERE BUKRS = COCD.

ENDSELECT.

SELECT count(*) INTO counter

FROM T009Y

WHERE PERIV = fiscalyear_variant

AND GJAHR = YEAR.

IF sy-subrc <> 0.

SELECT XJABH ANZBP XKALE INTO (XJABH, ANZBP, XKALE)

FROM T009

WHERE PERIV = fiscalyear_variant.

ENDSELECT.

IF XKALE IS INITIAL.

IF ANZBP > 99.

EXIT.

ELSE.

IF PERIOD > ANZBP.

SELECT * INTO table t_t009b

FROM T009B

WHERE PERIV = fiscalyear_variant.

SORT t_t009b ascending by poper.

t_poper = 000.

LOOP AT t_t009b.

IF t_t009b-POPER > t_poper.

t_poper = t_t009b-POPER.

ENDIF.

ENDLOOP.

PERIOD = t_poper+0(*).

ENDIF.

IF XJABH is INITIAL.

SELECT BUMON RELJR INTO (MONTH, yearshift)

FROM T009B

WHERE PERIV = fiscalyear_variant

AND POPER = PERIOD.

ENDSELECT.

ELSE.

SELECT BUMON RELJR INTO (MONTH, yearshift)

FROM T009B

WHERE PERIV = fiscalyear_variant

AND BDATJ = YEAR

AND POPER = PERIOD.

ENDSELECT.

ENDIF.

ENDIF.

CALENDAR_YEAR = year - ( yearshift ).

ELSE.

CALENDAR_YEAR = year.

MONTH = PERIOD.

IF PERIOD GE 12.

MONTH = 12.

ENDIF.

ENDIF.

concatenate CALENDAR_YEAR MONTH into w_djamon-low.

append w_djamon.

ELSE.

  • shortened fiscal year variant

SELECT BUMON INTO MONTH

FROM T009B

WHERE PERIV = fiscalyear_variant

AND POPER = PERIOD.

concatenate year MONTH into w_djamon-low.

append w_djamon.

ENDSELECT.

ENDIF.

  • move w_djamon to r_djamon.

loop at w_djamon.

move w_djamon-low to r_djamon.

append r_djamon.

endloop.

ENDFUNCTION.