Skip to Content
0
Former Member
Jul 23, 2007 at 09:56 AM

Routine syntax error

68 Views

Hi Gurus,

I am trying to to write a routine which will look into masterdata table and populate one keyfigure.

Here is the code:

TYPES:

BEGIN OF tys_SC_1_full,

ZFTE TYPE /BIC/OIZFTE,

END OF tys_TG_1_full.

TYPES:

BEGIN OF tys_SC_1__RULE_81,

  • InfoObject: 0CALMONTH Calendar Year/Month.

CALMONTH TYPE /BI0/OICALMONTH,

  • InfoObject: 0EMPLOYEE Employee.

EMPLOYEE TYPE /BIC/OIZEMPLOYEE,

*InfoObject: ZFTE FTE Benefits.

ZFTE TYPE /BIC/OIZFTE,

END OF tys_SC_1__RULE_81.

  • Additional types for start routine interface

TYPES:

data_package_structure type tys_SC_1_full.

  • Additional declaration for update rule interface

DATA:

MONITOR type standard table of rsmonitor WITH HEADER LINE,

MONITOR_RECNO type standard table of rsmonitors WITH HEADER LINE,

RECORD_NO LIKE SY-TABIX,

RECORD_ALL LIKE SY-TABIX,

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS.

  • global definitions from update rules

DATA:

*employee_md LIKE /bi0/memployee,

  • employee_wa LIKE /bi0/memployee,

  • person_md LIKE /bi0/mperson,

  • person_wa LIKE /bi0/mperson.

employee_md LIKE /bic/mzemployee,

employee_wa LIKE /bi0/memployee,

person_md LIKE /bi0/mperson,

person_wa LIKE /bi0/mperson.

FORM routine_0060

USING

COMM_STRUCTURE type tys_SC_1__RULE_81

CHANGING

RESULT TYPE tys_TG_1_full-ZFTE

RETURNCODE LIKE sy-subrc

ABORT LIKE sy-subrc

RAISING

cx_sy_arithmetic_error

cx_sy_conversion_error.

  • init variables

IF G_RECORD_NO <> RECORD_NO.

G_RECORD_NO = RECORD_NO.

CLEAR: EMPLOYEE_MD, PERSON_MD.

CLEAR: EMPLOYEE_WA, PERSON_WA.

ENDIF.

PERFORM READ_MD_EMPLOYEE.

using COMM_STRUCTURE-employee

COMM_STRUCTURE-calmonth

RECORD_NO

RECORD_ALL

SOURCE_SYSTEM

changing employee_wa1

RETURNCODE.

employee_md = employee_wa.

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

  • result value of the routine

RESULT = employee_md-/BIC/ZFTE.

  • 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.

ENDFORM. "routine_0060

$$ begin of routine - insert your code only below this line -

Data:

*--

COMM_STRUCTURE type tys_SC_1__RULE_81,

l_subrc type sy-tabix,

l_abort type sy-tabix,

ls_monitor TYPE rsmonitor,

ls_monitor_recno TYPE rsmonitors.

REFRESH:

MONITOR.

  • Runtime attributs

SOURCE_SYSTEM = p_r_request->get_logsys( ).

MOVE-CORRESPONDING SOURCE_FIELDS to COMM_STRUCTURE.

  • Migrated update rule call

Perform routine_0060

USING

COMM_STRUCTURE

CHANGING

RESULT

l_subrc

l_abort.

*-- Convert Messages in Transformation format

LOOP AT MONITOR INTO ls_monitor.

move-CORRESPONDING ls_monitor to MONITOR_REC.

append monitor_rec to MONITOR.

ENDLOOP.

IF l_subrc <> 0.

RAISE EXCEPTION TYPE cx_rsrout_skip_val.

ENDIF.

IF l_abort <> 0.

RAISE EXCEPTION TYPE CX_RSROUT_ABORT.

ENDIF.

$$ end of routine - insert your code only before this line -

The syntax error : E:Different number of parameters in FORM and PERFORM (routine:

READ_MD_EMPLOYEE, number of formal parameters: 7, number of actual

parameters: 0).

I haven't understood this. What is formal parameters and actual parameters.

Best Regards,

Reddy.