cancel
Showing results for 
Search instead for 
Did you mean: 

0FIAR_C03 data flow migration transformation filed level routine syntax error

Former Member
0 Kudos

Dear Experts,

0FI_AR_4 data source data model migrating 3.x to 7.x, DSO FIAR_O03 to CUBE FIAR_C03 transformation field level routine errors

E:Field "COMM_STRUCTURE-FI_DOCSTAT" is unknown. It is neither in one of

the specified tables nor defined by a "DATA" statement. "DATA"

statement.

please advice how resolve the issue, treat this most urgent.

Thanks

Ramesh G

Accepted Solutions (0)

Answers (2)

Answers (2)

ccc_ccc
Active Contributor
0 Kudos

Hi Ramesh,

When migrating 3.x to 7.x , you have change code as like below.

3.x Code

IF COMM_STRUCTURE-FI_DOCSTAT EQ 'C'.

     RESULT = COMM_STRUCTURE-CLEAR_DATE - COMM_STRUCTURE-NETDUEDATE.

  ELSE.

     RESULT = 0.

  endif.

7.x Code

1 Right lick on field for which you want update data , result of CLEAR_DATE-NETDUEDATE in 7.x transformation

2 By clicking add(+) two fields CLEAR_DATE and NETDUEDATE

3 Select Rule type "Routine"

4 Paste below code.

IF SOURCE_FIELDS-FI_DOCSTAT EQ 'C'.

     RESULT = SOURCE_FIELDS-CLEAR_DATE - SOURCE_FIELDS-NETDUEDATE.

  ELSE.

     RESULT = 0.

  endif.

in similar way , you have to do for other objects.

Thank you,

Nanda

RamanKorrapati
Active Contributor
0 Kudos

Hi Ramesh,

Based on 3.x routine, you need change or write the same routine by using bw 7.x concepts.

COMM_STRUCTURE - its 3.x statement. so its not useful in 7.x


What kind of routine is that ? is it start or end routine or field routine.


if its start routine - You need to use "SOURCE_PACKAGE" instead of that statement

for end routine - Use statement "RESULT_PACKAGE."


Thanks

Former Member
0 Kudos

Hi Ram,

It's Field Level Routine, interest calculation fields.

thanks

RamanKorrapati
Active Contributor
0 Kudos

take abaper help and write the same routine in the form of bw 7.x.

in field level routine you need to use statement "SOURCE_FIELDS".

Former Member
0 Kudos

Hi,

ABAP'r new for BI Routines pls help 7.x format  field level routines, sample code or your suggestions

Thanks

Ramesh G

RamanKorrapati
Active Contributor
0 Kudos

please search on Google by using search term "Routines in sap bi 7.0".

You will get some sample code and explanation. will be helpful.

Former Member
0 Kudos

Hi Rama,

After applied SOURCE_FIELDS we got different error.

E:Field "SOURCE_FIELDS-FI_DOCSTAT" is unknown. It is neither in one of

the specified tables nor defined by a "DATA" statement. "DATA"

statement.

Thanks

Ramesh G

Former Member
0 Kudos

Hi Ramesh,

Can you post code of your field routine? we can then better resolve it. Ideally it should work with   SOURCE_FIELDS.

Thanks

Amit

Former Member
0 Kudos

Hi Amit,

entire field level routine for interest calculation.

  IF COMM_STRUCTURE-FI_DOCSTAT EQ 'C'.

     RESULT = COMM_STRUCTURE-CLEAR_DATE - COMM_STRUCTURE-NETDUEDATE.

  ELSE.

     RESULT = 0.

  endif.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

* if abort is not equal zero, the update process will be canceled

  ABORT = 0.

  p_monitor[] = MONITOR[].

  CLEAR:

    MONITOR[].

ENDFORM.                    "routine_0001

FORM routine_0002

  TABLES

   P_MONITOR         structure rsmonitor

  USING

    COMM_STRUCTURE type _ty_s_SC_1__RULE_47

  CHANGING

    RESULT         TYPE _ty_s_TG_1_full-INT_CALC_1

    RETURNCODE     LIKE sy-subrc

    ABORT          LIKE sy-subrc

  RAISING

    cx_sy_arithmetic_error

    cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine

  RESULT = COMM_STRUCTURE-DEB_CRE_LC * COMM_STRUCTURE-DSCT_DAYS1 / 100.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

* if abort is not equal zero, the update process will be canceled

  ABORT = 0.

  p_monitor[] = MONITOR[].

  CLEAR:

    MONITOR[].

ENDFORM.                    "routine_0002

FORM routine_0003

  TABLES

   P_MONITOR         structure rsmonitor

  USING

    COMM_STRUCTURE type _ty_s_SC_1__RULE_48

  CHANGING

    RESULT         TYPE _ty_s_TG_1_full-INT_CALC_2

    RETURNCODE     LIKE sy-subrc

    ABORT          LIKE sy-subrc

  RAISING

    cx_sy_arithmetic_error

    cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine

  RESULT = COMM_STRUCTURE-DEB_CRE_LC * COMM_STRUCTURE-DSCT_DAYS2 / 100.

*  UNIT = COMM_STRUCTURE-LOC_CURRCY.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

* if abort is not equal zero, the update process will be canceled

  ABORT = 0.

  p_monitor[] = MONITOR[].

  CLEAR:

    MONITOR[].

ENDFORM.                    "routine_0003

FORM routine_0004

  TABLES

   P_MONITOR         structure rsmonitor

  USING

    COMM_STRUCTURE type _ty_s_SC_1__RULE_49

  CHANGING

    RESULT         TYPE _ty_s_TG_1_full-INT_CALC_N

    RETURNCODE     LIKE sy-subrc

    ABORT          LIKE sy-subrc

  RAISING

    cx_sy_arithmetic_error

    cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine

  RESULT = COMM_STRUCTURE-DEB_CRE_LC * COMM_STRUCTURE-NETTERMS / 100.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

* if abort is not equal zero, the update process will be canceled

  ABORT = 0.

  p_monitor[] = MONITOR[].

  CLEAR:

    MONITOR[].

ENDFORM.                    "routine_0004

FORM routine_0005

  TABLES

   P_MONITOR         structure rsmonitor

  USING

    COMM_STRUCTURE type _ty_s_SC_1__RULE_50

  CHANGING

    RESULT         TYPE _ty_s_TG_1_full-INT_CALCT1

    RETURNCODE     LIKE sy-subrc

    ABORT          LIKE sy-subrc

  RAISING

    cx_sy_arithmetic_error

    cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine

  DATA:    DSCT1 LIKE COMM_STRUCTURE-DEB_CRE_LC.

  DSCT1 = COMM_STRUCTURE-DSCT_PCT1 * COMM_STRUCTURE-DEB_CRE_LC / 100.

  DSCT1 = DSCT1 / 10 * 9.

  IF COMM_STRUCTURE-DSC_AMT_LC >= DSCT1 AND

     COMM_STRUCTURE-FI_DOCSTAT EQ 'C'.

    RESULT = ( COMM_STRUCTURE-CLEAR_DATE - COMM_STRUCTURE-DSCT_DATE1 ).

    RESULT = RESULT * COMM_STRUCTURE-DEB_CRE_LC / 100.

  ELSE.

    RESULT = 0.

  ENDIF.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

* if abort is not equal zero, the update process will be canceled

  ABORT = 0.

  p_monitor[] = MONITOR[].

  CLEAR:

    MONITOR[].

ENDFORM.                    "routine_0005

FORM routine_0006

  TABLES

   P_MONITOR         structure rsmonitor

  USING

    COMM_STRUCTURE type _ty_s_SC_1__RULE_51

  CHANGING

    RESULT         TYPE _ty_s_TG_1_full-INT_CALCT2

    RETURNCODE     LIKE sy-subrc

    ABORT          LIKE sy-subrc

  RAISING

    cx_sy_arithmetic_error

    cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine

  DATA:    DSCT1 LIKE COMM_STRUCTURE-DEB_CRE_LC.

  DSCT1 = COMM_STRUCTURE-DSCT_PCT1 * COMM_STRUCTURE-DEB_CRE_LC / 100.

  DSCT1 = DSCT1 / 10 * 9.

  IF COMM_STRUCTURE-DSC_AMT_LC < DSCT1 AND

     COMM_STRUCTURE-DSC_AMT_LC > 0     AND

     COMM_STRUCTURE-FI_DOCSTAT = 'C'.

     RESULT = ( COMM_STRUCTURE-CLEAR_DATE - COMM_STRUCTURE-DSCT_DATE2 ).

     RESULT = RESULT * COMM_STRUCTURE-DEB_CRE_LC / 100.

  ELSE.

     RESULT = 0.

  ENDIF.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

* if abort is not equal zero, the update process will be canceled

  ABORT = 0.

  p_monitor[] = MONITOR[].

  CLEAR:

    MONITOR[].

ENDFORM.                    "routine_0006

FORM routine_0007

  TABLES

   P_MONITOR         structure rsmonitor

  USING

    COMM_STRUCTURE type _ty_s_SC_1__RULE_52

  CHANGING

    RESULT         TYPE _ty_s_TG_1_full-INT_CALCTN

    RETURNCODE     LIKE sy-subrc

    ABORT          LIKE sy-subrc

  RAISING

    cx_sy_arithmetic_error

    cx_sy_conversion_error.

* init variables

* fill the internal table "MONITOR", to make monitor entries

* result value of the routine

  IF COMM_STRUCTURE-DSC_AMT_LC = 0 AND

     COMM_STRUCTURE-FI_DOCSTAT = 'C'.

     RESULT = ( COMM_STRUCTURE-CLEAR_DATE - COMM_STRUCTURE-NETDUEDATE ).

     RESULT = RESULT * COMM_STRUCTURE-DEB_CRE_LC / 100.

  ELSE.

     RESULT = 0.

  ENDIF.

* if the returncode is not equal zero, the result will not be updated

  RETURNCODE = 0.

thanks

Ramesh G

Former Member
0 Kudos

If you are migrating the transformation from 3.5 to 7.x then you can use RSMIGRATE tcode for this. this looks like you have not migrated correctly. Go to transformation and right click and migrate data flow.

Can you tell us how you are migrating the transformation?

Thanks

Amit