on 07-12-2012 6:46 AM
Hi!
Am am installing Business Content "Talent Management and Talent Deployment" and I have come into a error in end routine for DSO "0TMC_DS02". The message it give are:
"The type of the database table and work area (or internal table) "LS_EMPLOYEE" are not Unicode convertible. Unicode Convertible". Can someone help me solve this with a suggestion? Thanks!
Here are the code:
*$*$ begin of routine - insert your code only below this line *-*
DATA:
ls_employee TYPE /bi0/memployee,
ls_person TYPE /bi0/mperson,
lv_last_date TYPE sydatum,
lv_tmp_date TYPE sydatum,
lv_calyear TYPE /bi0/scalyear-calyear,
lv_calday TYPE /bi0/oicalday,
lv_calmonth TYPE /bi0/scalmonth-calmonth.
DATA lt_result LIKE RESULT_PACKAGE.
DATA ls_result LIKE LINE OF RESULT_PACKAGE.
DATA lt_ds01 TYPE REF TO data.
DATA lt_ds03 TYPE REF TO data.
DATA lv_ds01_tabname TYPE tabname.
DATA lv_ds03_tabname TYPE tabname.
DATA lv_source_record TYPE rsarecord.
CONSTANTS lc_class TYPE seoclname VALUE 'CL_RSBCT_XSA_TRANSFER_LIB'.
CONSTANTS lc_ds01 TYPE rsdodsobject VALUE '0TMC_DS01'.
CONSTANTS lc_ds03 TYPE rsdodsobject VALUE '0TMC_DS03'.
FIELD-SYMBOLS <ls_ds01> TYPE ANY.
FIELD-SYMBOLS <lt_ds01> TYPE STANDARD TABLE.
FIELD-SYMBOLS <ls_ds03> TYPE ANY.
FIELD-SYMBOLS <lt_ds03> TYPE STANDARD TABLE.
FIELD-SYMBOLS <lv_ds01_s_tal_grp> TYPE ANY.
FIELD-SYMBOLS <lv_ds01_s_tal_stat> TYPE ANY.
FIELD-SYMBOLS <lv_ds01_s_tal_reas> TYPE ANY.
FIELD-SYMBOLS <lv_ds03_status_key> TYPE ANY.
FIELD-SYMBOLS <lv_ds03_reason_key> TYPE ANY.
FIELD-SYMBOLS <lv_ds03_careertype> TYPE ANY.
FIELD-SYMBOLS <lv_ds03_careerlvl> TYPE ANY.
FIELD-SYMBOLS <lv_ds03_sbs> TYPE ANY.
CALL METHOD (lc_class)=>debughelp.
CALL METHOD (lc_class)=>get_dso_tech
EXPORTING
i_odsobject = lc_ds01
IMPORTING
e_tablnm = lv_ds01_tabname
EXCEPTIONS
no_ods = 1
OTHERS = 2.
IF sy-subrc = 0.
CREATE DATA lt_ds01 TYPE TABLE OF (lv_ds01_tabname).
ENDIF.
CALL METHOD (lc_class)=>get_dso_tech
EXPORTING
i_odsobject = lc_ds03
IMPORTING
e_tablnm = lv_ds03_tabname
EXCEPTIONS
no_ods = 1
OTHERS = 2.
IF sy-subrc = 0.
CREATE DATA lt_ds03 TYPE TABLE OF (lv_ds03_tabname).
ENDIF.
lt_result = RESULT_PACKAGE.
CLEAR RESULT_PACKAGE.
LOOP AT lt_result INTO ls_result.
lv_source_record = ls_result-record.
**********************************************************
*determine employee attributes
**********************************************************
lv_calmonth = ls_result-calmonth.
IF lv_calmonth+4(2) BETWEEN '01' AND '11'.
lv_calmonth = lv_calmonth + 1.
CONCATENATE lv_calmonth '01' INTO lv_tmp_date.
ELSE.
lv_calyear = lv_calmonth+0(4) + 1.
CONCATENATE lv_calyear '0101' INTO lv_tmp_date.
ENDIF.
lv_last_date = lv_tmp_date - 1.
SELECT SINGLE *
FROM /bi0/qemployee
INTO ls_employee
WHERE employee = ls_result-successorn
AND objvers = 'A'
AND dateto >= lv_last_date
AND datefrom <= lv_last_date.
IF ls_result-calmonth+4(2) > '12'.
lv_calmonth+4(2) = '01'.
lv_calmonth+0(4) = lv_calmonth+0(4) + 1.
ENDIF.
CONCATENATE lv_calmonth '01' INTO lv_calday.
IF NOT ls_employee-entrydate IS INITIAL.
ls_result-entrydate = ls_employee-entrydate.
ls_result-s_srvclen = lv_calday+0(4) -
ls_employee-entrydate+0(4).
IF lv_calday+4(4) LT ls_employee-entrydate+4(4).
ls_result-s_srvclen = ls_result-s_srvclen - 1.
ENDIF.
ENDIF.
IF NOT ls_result-pos_entry IS INITIAL.
ls_result-s_jobten = lv_calday+0(4) -
ls_result-pos_entry+0(4).
IF lv_calday+4(4) LT ls_result-pos_entry+4(4).
ls_result-s_jobten = ls_result-s_jobten - 1.
ENDIF.
ENDIF.
IF NOT ls_employee-pers_area IS INITIAL.
ls_result-s_pers_are = ls_employee-pers_area.
ENDIF.
IF NOT ls_employee-pers_sarea IS INITIAL.
ls_result-s_pers_sar = ls_employee-pers_sarea.
ENDIF.
IF NOT ls_employee-emplgroup IS INITIAL.
ls_result-s_emp_grp = ls_employee-emplgroup.
ENDIF.
IF NOT ls_employee-emplsgroup IS INITIAL.
ls_result-s_emp_sgrp = ls_employee-emplsgroup.
ENDIF.
IF NOT ls_employee-emplstatus IS INITIAL.
ls_result-s_emp_stat = ls_employee-emplstatus.
ENDIF.
IF NOT ls_employee-comp_code IS INITIAL.
ls_result-s_com_code = ls_employee-comp_code.
ENDIF.
IF NOT ls_employee-ethn_orig IS INITIAL.
ls_result-s_ethn_org = ls_employee-ethn_orig.
ENDIF.
IF NOT ls_employee-country_id IS INITIAL.
ls_result-scountryid = ls_employee-country_id.
ENDIF.
IF NOT ls_employee-person IS INITIAL.
ls_result-person = ls_employee-person.
SELECT SINGLE *
FROM /bi0/qperson
INTO ls_person
WHERE person = ls_employee-person
AND objvers = 'A'
AND dateto >= lv_last_date
AND datefrom <= lv_last_date.
IF NOT ls_person-datebirth IS INITIAL.
ls_result-datebirth = ls_person-datebirth.
ls_result-s_age = lv_calday+0(4) -
ls_person-datebirth+0(4).
IF lv_calday+4(4) LT ls_person-datebirth+4(4).
ls_result-s_age = ls_result-s_age - 1.
ENDIF.
ENDIF.
IF NOT ls_person-nation IS INITIAL.
ls_result-s_nation = ls_person-nation.
ENDIF.
IF NOT ls_person-gender IS INITIAL.
ls_result-s_gender = ls_person-gender.
ENDIF.
ENDIF.
CALL METHOD cl_hrtmc_bi_tools=>get_talentgroups
EXPORTING
iv_calmonth = ls_result-calmonth
iv_employee = ls_result-successorn
iv_tabname = lv_ds01_tabname
RECEIVING
et_talentgroups = lt_ds01.
CALL METHOD cl_hrtmc_bi_tools=>get_key_status_and_career
EXPORTING
iv_calmonth = ls_result-calmonth
iv_hrposition = ls_result-hrposition
iv_tabname = lv_ds03_tabname
RECEIVING
et_key_status_and_career = lt_ds03.
IF lt_ds01 IS NOT INITIAL.
ASSIGN lt_ds01->* TO <lt_ds01>.
LOOP AT <lt_ds01> ASSIGNING <ls_ds01>.
ASSIGN COMPONENT:
'TALENTGRP' OF STRUCTURE <ls_ds01> TO <lv_ds01_s_tal_grp>,
'NOM_STATUS' OF STRUCTURE <ls_ds01> TO <lv_ds01_s_tal_stat>,
'NOM_REASON' OF STRUCTURE <ls_ds01> TO <lv_ds01_s_tal_reas>.
IF <lv_ds01_s_tal_grp> IS NOT INITIAL.
ls_result-s_tal_grp = <lv_ds01_s_tal_grp>.
ENDIF.
IF <lv_ds01_s_tal_stat> IS NOT INITIAL.
ls_result-s_tal_stat = <lv_ds01_s_tal_stat>.
ENDIF.
IF <lv_ds01_s_tal_reas> IS NOT INITIAL.
ls_result-s_tal_reas = <lv_ds01_s_tal_reas>.
ENDIF.
IF lt_ds03 IS NOT INITIAL.
ASSIGN lt_ds03->* TO <lt_ds03>.
LOOP AT <lt_ds03> ASSIGNING <ls_ds03>.
ASSIGN COMPONENT:
'STATUS_KEY' OF STRUCTURE <ls_ds03> TO
<lv_ds03_status_key>,
'REASON_KEY' OF STRUCTURE <ls_ds03> TO
<lv_ds03_reason_key>,
'CAREERTYPE' OF STRUCTURE <ls_ds03> TO
<lv_ds03_careertype>,
'CAREERLVL' OF STRUCTURE <ls_ds03> TO
<lv_ds03_careerlvl>,
'SBS' OF STRUCTURE <ls_ds03> TO <lv_ds03_sbs>.
IF <lv_ds03_status_key> IS NOT INITIAL.
ls_result-status_key = <lv_ds03_status_key>.
ENDIF.
IF <lv_ds03_reason_key> IS NOT INITIAL.
ls_result-reason_key = <lv_ds03_reason_key>.
ENDIF.
IF <lv_ds03_careertype> IS NOT INITIAL.
ls_result-careertype = <lv_ds03_careertype>.
ENDIF.
IF <lv_ds03_careerlvl> IS NOT INITIAL.
ls_result-careerlvl = <lv_ds03_careerlvl>.
ENDIF.
IF <lv_ds03_sbs> IS NOT INITIAL.
ls_result-sbs = <lv_ds03_sbs>.
ENDIF.
CALL METHOD me->new_record__end_routine
EXPORTING
source_segid = 1
source_record = lv_source_record
IMPORTING
record_new = ls_result-record.
APPEND ls_result TO RESULT_PACKAGE.
ENDLOOP.
ELSE.
CALL METHOD me->new_record__end_routine
EXPORTING
source_segid = 1
source_record = lv_source_record
IMPORTING
record_new = ls_result-record.
APPEND ls_result TO RESULT_PACKAGE.
ENDIF.
ENDLOOP.
ELSE.
IF lt_ds03 IS NOT INITIAL.
ASSIGN lt_ds03->* TO <lt_ds03>.
LOOP AT <lt_ds03> ASSIGNING <ls_ds03>.
ASSIGN COMPONENT:
'STATUS_KEY' OF STRUCTURE <ls_ds03> TO
<lv_ds03_status_key>,
'REASON_KEY' OF STRUCTURE <ls_ds03> TO
<lv_ds03_reason_key>,
'CAREERTYPE' OF STRUCTURE <ls_ds03> TO
<lv_ds03_careertype>,
'CAREERLVL' OF STRUCTURE <ls_ds03> TO
<lv_ds03_careerlvl>,
'SBS' OF STRUCTURE <ls_ds03> TO <lv_ds03_sbs>.
IF <lv_ds03_status_key> IS NOT INITIAL.
ls_result-status_key = <lv_ds03_status_key>.
ENDIF.
IF <lv_ds03_reason_key> IS NOT INITIAL.
ls_result-reason_key = <lv_ds03_reason_key>.
ENDIF.
IF <lv_ds03_careertype> IS NOT INITIAL.
ls_result-careertype = <lv_ds03_careertype>.
ENDIF.
IF <lv_ds03_careerlvl> IS NOT INITIAL.
ls_result-careerlvl = <lv_ds03_careerlvl>.
ENDIF.
IF <lv_ds03_sbs> IS NOT INITIAL.
ls_result-sbs = <lv_ds03_sbs>.
ENDIF.
CALL METHOD me->new_record__end_routine
EXPORTING
source_segid = 1
source_record = lv_source_record
IMPORTING
record_new = ls_result-record.
APPEND ls_result TO RESULT_PACKAGE.
ENDLOOP.
ELSE.
CALL METHOD me->new_record__end_routine
EXPORTING
source_segid = 1
source_record = lv_source_record
IMPORTING
record_new = ls_result-record.
APPEND ls_result TO RESULT_PACKAGE.
ENDIF.
ENDIF.
ENDLOOP.
*$*$ end of routine - insert your code only before this line *-*
Hi!
I found the solution for this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.