Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Logic in Transformations-Start or Field Routine Error

Former Member
0 Likes
472

Hi,

Below is the field routine in transformations that will calculacte No of Years between 2 dates (Source Field & System Date)

It is showing me no systex Error but when i started data load ,Load is failing due to below mentioned error

Routine:

IF NOT SOURCE_FIELDS-/BIC/ZCYB_DOB IS INITIAL.

CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

EXPORTING

I_DATE_FROM = SOURCE_FIELDS-/BIC/ZCYB_DOB

I_KEY_DAY_FROM = 00

I_DATE_TO = SYST-DATUM

I_KEY_DAY_TO = 00

I_FLAG_SEPERATE = 'X'

IMPORTING

E_YEARS = RESULT.

ENDIF.

Error:

The exception CX_STATIC_CHECK is neither caught nor is it declared in

the RAISING clause of "EXECUTE".

Please update me where i was doing wrong

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
425

It must have something to do with your input variables - I ran this FM locally using my DOB and today's date and it worked fine.

make sure your input date types are in the correct format for the FM.

Hi,

Below is the field routine in transformations that will calculacte No of Years between 2 dates (Source Field & System Date)

It is showing me no systex Error but when i started data load ,Load is failing due to below mentioned error

Routine:

IF NOT SOURCE_FIELDS-/BIC/ZCYB_DOB IS INITIAL.

CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

EXPORTING

I_DATE_FROM = SOURCE_FIELDS-/BIC/ZCYB_DOB

I_KEY_DAY_FROM = 00

I_DATE_TO = SYST-DATUM

I_KEY_DAY_TO = 00

I_FLAG_SEPERATE = 'X'

IMPORTING

E_YEARS = RESULT.

ENDIF.

Error:

The exception CX_STATIC_CHECK is neither caught nor is it declared in

the RAISING clause of "EXECUTE".

Please update me where i was doing wrong

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
426

It must have something to do with your input variables - I ran this FM locally using my DOB and today's date and it worked fine.

make sure your input date types are in the correct format for the FM.

Read only

Former Member
0 Likes
425

Hi

I am getting a similar error when i use function module, it would be great if you could post the solution for this error.

Thanks

Rav