Hi Experts,
I have ABAP code in Field routine of transformation for deriving calmonth from Fiscal perios and Fiscal year variant .If I try to debug in DTP it is not going to debug mode.The code is as below.I dont know where it is going wrong .It is not fetching any values for Cal month from fiscal period and Fiscal variant.the code is as below
IF SOURCE_FIELDS-fiscvarnt = 'V3'.
CASE SOURCE_FIELDS-fiscper+4(3).
WHEN '001' OR '002' OR '003' OR '004' OR '005' OR '006' OR '007'
OR '008' OR '009'
.
zcalyear = SOURCE_FIELDS-fiscper+0(4).
zmonth = SOURCE_FIELDS-fiscper+5(2) + 3.
CONCATENATE zcalyear zmonth INTO zcalmonth.
RESULT = zcalmonth.
WHEN '010'.
zcalyear = SOURCE_FIELDS-fiscper+0(4) + 1.
zmonth = '01'.
CONCATENATE zcalyear zmonth INTO zcalmonth.
RESULT = zcalmonth.
WHEN '011'.
zcalyear = SOURCE_FIELDS-fiscper+0(4) + 1.
zmonth = '02'.
CONCATENATE zcalyear zmonth INTO zcalmonth.
RESULT = zcalmonth.
WHEN '012'.
zcalyear = SOURCE_FIELDS-fiscper+0(4) + 1.
zmonth = '03'.
CONCATENATE zcalyear zmonth INTO zcalmonth.
RESULT = zcalmonth.
ENDCASE.
ENDIF.
Please suggest where it is going worng.Is there any better way to write the code using any FM
Regards
Prasad