cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module 'DATE_TO_PERIOD_CONVERT' for 0FISCPER

Former Member
0 Kudos

hello All,

I have a date field / infoobject ST_UP_DTE in the Transfer Rules of 2LIS_11_VAITM.

I want write a routine for 0FISCPER to get the data from this Date Field,

i have written code below ,

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

i_date = COMM_STRUCTURE-ST_UP_DTE

i_periv = COMM_STRUCTURE-fiscvarnt

IMPORTING

e_buper = RESULT+4(3).

But when I start data loading , the data is not loaded to infocube.

The request is Yellow all the time.

Please correct me if anything is wrong in this code.

regards ,

Amol K.

Accepted Solutions (1)

Accepted Solutions (1)

former_member205352
Active Contributor
0 Kudos
data : zperiod like T009B-POPER,
         zyear like T009B-BDATJ.
 
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = COMM_STRUCTURE-ST_UP_DTE
i_periv = COMM_STRUCTURE-fiscvarnt
IMPORTING
e_buper = zperiod
E_GJAHR = zyear.
 
Concatenate zyear zperiod into RESULT.
Former Member
0 Kudos

Hello Praveen ,

I copied the code given by you and started loading data ,

It seems data is not getting loaded to infocube 0SD_C03 .

It is somewhere struct in update rules.

The request is Yellow and do not get finsihed to either red or green.

regards ,

Amol K.

former_member205352
Active Contributor
0 Kudos

First of all check if you have V3 variant maintained in OB29 transaction.

If yes,

Then try doing simulation and see where its going to error.

Former Member
0 Kudos

Hello Praveen ,

I made a slight modification to your code as below ,

I made Fiscal year Variant = V3 as constant in the code itself.

And now its working.

data : zperiod like T009B-POPER,

zyear like T009B-BDATJ.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

i_date = COMM_STRUCTURE-ST_UP_DTE

i_periv = 'V3'

IMPORTING

e_buper = zperiod

E_GJAHR = zyear.

Concatenate zyear zperiod into RESULT.

Thanks for help. full ponits to you.

regards ,

Amol k.

Answers (0)