cancel
Showing results for 
Search instead for 
Did you mean: 

another dump message "GETWA_NOT_ASSIGNED"

Former Member
0 Kudos

hi

I have an end routine where I have added som new code that are going to fill three infoobjects (that is a part of the cube). When I add the code, and check the code, nothing is looking wrong. But when I try to run the DTP, and get this dump message. The code that I have added is marked in red (it looks like it is the red code in the end of the end routine that create the problem). can someone please give me any tips on what I have done wrong and why this is happening?

Thanks

Here is the code:

 

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

 

DATA lt_result LIKE RESULT_PACKAGE.

DATA lv_source_record TYPE rsarecord.

DATA ls_result LIKE LINE OF RESULT_PACKAGE.

DATA lv_sel_date TYPE datum.

DATA lt_ds02 TYPE REF TO data.

DATA lv_ds02_tabname TYPE tabname.

DATA ls_employee TYPE /bi0/memployee.

DATA ls_person TYPE /bi0/mperson.

CONSTANTS lc_ds02 TYPE rsdodsobject VALUE '0TMC_DS02'.

CONSTANTS lc_class TYPE seoclname VALUE 'CL_RSBCT_XSA_TRANSFER_LIB'.

FIELD-SYMBOLS <ls_ds02> TYPE ANY.

FIELD-SYMBOLS <lt_ds02> TYPE STANDARD TABLE.

FIELD-SYMBOLS <lv_ds02_succontext> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_suc_reason> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_suc_status> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_pers_are> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_pers_sar> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_emp_grp> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_emp_sgrp> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_com_code> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_scountryid> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_ethn_org> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_gender> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_nation> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_age> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_jobten> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_emp_stat> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_tal_cont> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_tal_stat> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_tal_reas> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_srvclen> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_successorn> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_s_tal_grp> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_ranking> TYPE ANY.

FIELD-SYMBOLS <lv_ds02_readinessn> TYPE ANY.

 

*Succession Band - added by HEOV in C202286

 

FIELD-SYMBOLS <lv_ds02_shrband> TYPE ANY.

 

*Succession Process network - added by HEOV in C202286

 

FIELD-SYMBOLS <lv_ds02_sfagomkod> TYPE ANY.

 

*Succession Discipline - added by HEOV in C202286

 

FIELD-SYMBOLS <lv_ds02_sfagomko2> TYPE ANY.

CALL METHOD (lc_class)=>debughelp.

 

***********************************************************

 

* 0TCM_DS02

 

CALL METHOD (lc_class)=>get_dso_tech

EXPORTING

i_odsobject = lc_ds02

IMPORTING

e_tablnm = lv_ds02_tabname

EXCEPTIONS

no_ods = 1

OTHERS = 2.

IF sy-subrc = 0.

CREATE DATA lt_ds02 TYPE TABLE OF (lv_ds02_tabname).

 

* ASSIGN lt_ds02->* TO <lt_ds02>.

 

ENDIF.

 

***********************************************************

 

lt_result = RESULT_PACKAGE.

CLEAR RESULT_PACKAGE.

LOOP AT lt_result INTO ls_result.

lv_source_record = ls_result-record.

 

*** START removed from Business Content due to error - HEOV - C202286

****

* CONCATENATE ls_result-hrposition ls_result-employee

* ls_result-calday INTO ls_result-agghlp_pos.

*** END removed from Business Content due to error - HEOV - C202286 ***

 

 

 

* selection dates.

 

lv_sel_date = ls_result-calday.

 

*** Change from qemployee to memployee to get this towork - HEOV -

*C202286 ***

 

SELECT SINGLE *

FROM /bi0/memployee

INTO ls_employee

WHERE employee = ls_result-employee

AND objvers = 'A'

AND dateto >= lv_sel_date

AND datefrom <= lv_sel_date.

IF NOT ls_employee-entrydate IS INITIAL.

ls_result-srvclen = lv_sel_date+0(4) -

ls_employee-entrydate+0(4).

IF lv_sel_date+4(4) LT ls_employee-entrydate+4(4).

ls_result-srvclen = ls_result-srvclen - 1.

ENDIF.

ENDIF.

IF NOT ls_employee-pers_area IS INITIAL.

ls_result-pers_area = ls_employee-pers_area.

ENDIF.

IF NOT ls_employee-pers_sarea IS INITIAL.

ls_result-pers_sarea = ls_employee-pers_sarea.

ENDIF.

IF NOT ls_employee-emplgroup IS INITIAL.

ls_result-emplgroup = ls_employee-emplgroup.

ENDIF.

IF NOT ls_employee-emplsgroup IS INITIAL.

ls_result-emplsgroup = ls_employee-emplsgroup.

ENDIF.

IF NOT ls_employee-emplstatus IS INITIAL.

ls_result-emplstatus = ls_employee-emplstatus.

ENDIF.

IF NOT ls_employee-comp_code IS INITIAL.

ls_result-comp_code = ls_employee-comp_code.

ENDIF.

IF NOT ls_employee-country_id IS INITIAL.

ls_result-country_id = ls_employee-country_id.

ENDIF.

 

***************************START****************************************

*** Code that is needed to get BAND, DISCIPLINE and "PROCESS NETWORK ***

*** Code added by HEOV 22.08.2012 through change C202286****************

************************************************************************

 

 

 

*BAND

 

IF NOT ls_employee-/bic/hrband IS INITIAL.

ls_result-/bic/hrband = ls_employee-/bic/hrband.

ENDIF.

 

*PROCESS NETWORK

 

IF NOT ls_employee-/bic/zfagomkod IS INITIAL.

ls_result-/bic/zfagomkod = ls_employee-/bic/zfagomkod.

ENDIF.

 

* DISCIPLINE

 

IF NOT ls_employee-/bic/zfagomko2 IS INITIAL.

ls_result-/bic/zfagomko2 = ls_employee-/bic/zfagomko2.

ENDIF.

 

***************************END******************************************

*** Code that is needed to get BAND, DISCIPLINE and "PROCESS NETWORK ***

*** Code added by HEOV 22.08.2012 through change C202286****************

************************************************************************

 

 

 

*** START removed from Business Content due to error - HEOV - C202286

****

* IF NOT ls_employee-ethn_orig IS INITIAL.

* ls_result-ethn_orig = ls_employee-ethn_orig.

* ENDIF.

*** END removed from Business Content due to error - HEOV - C202286 ***

 

 

IF NOT ls_employee-person IS INITIAL.

SELECT SINGLE *

FROM /bi0/qperson

INTO ls_person

WHERE person = ls_employee-person

AND objvers = 'A'

AND dateto >= lv_sel_date

AND datefrom <= lv_sel_date.

IF NOT ls_person-datebirth IS INITIAL.

ls_result-age = lv_sel_date+0(4) -

ls_person-datebirth+0(4).

IF lv_sel_date+4(4) LT ls_person-datebirth+4(4).

ls_result-age = ls_result-age - 1.

ENDIF.

ENDIF.

IF NOT ls_person-nation IS INITIAL.

ls_result-nation = ls_person-nation.

ENDIF.

IF NOT ls_person-gender IS INITIAL.

ls_result-gender = ls_person-gender.

ENDIF.

ENDIF.

CALL METHOD cl_hrtmc_bi_tools=>get_position_successors

EXPORTING

iv_calmonth = ls_result-calmonth

iv_position = ls_result-hrposition

RECEIVING

et_position_successors = lt_ds02.

ASSIGN lt_ds02->* TO <lt_ds02>.

IF lt_ds02 IS NOT INITIAL.

LOOP AT <lt_ds02> ASSIGNING <ls_ds02>.

ASSIGN COMPONENT:

'SUCCONTEXT' OF STRUCTURE <ls_ds02> TO <lv_ds02_succontext>,

'SUC_REASON' OF STRUCTURE <ls_ds02> TO <lv_ds02_suc_reason>,

'SUC_STATUS' OF STRUCTURE <ls_ds02> TO <lv_ds02_suc_status>,

'S_PERS_ARE' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_pers_are>,

'S_PERS_SAR' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_pers_sar>,

'S_EMP_GRP' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_emp_grp>,

'S_EMP_SGRP' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_emp_sgrp>,

'S_COM_CODE' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_com_code>,

'SCOUNTRYID' OF STRUCTURE <ls_ds02> TO <lv_ds02_scountryid>,

'S_ETHN_ORG' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_ethn_org>,

'S_GENDER' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_gender>,

'S_NATION' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_nation>,

'S_AGE' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_age>,

'S_JOBTEN' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_jobten>,

'S_EMP_STAT' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_emp_stat>,

'S_TAL_CONT' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_tal_cont>,

'S_TAL_STAT' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_tal_stat>,

'S_TAL_REAS' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_tal_reas>,

'S_SRVCLEN' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_srvclen>,

'SUCCESSORN' OF STRUCTURE <ls_ds02> TO <lv_ds02_successorn>,

'S_TAL_GRP' OF STRUCTURE <ls_ds02> TO <lv_ds02_s_tal_grp>,

'RANKING' OF STRUCTURE <ls_ds02> TO <lv_ds02_ranking>,

'READINESSN' OF STRUCTURE <ls_ds02> TO <lv_ds02_readinessn>,

 

*Succession Band - added by HEOV in C202286

 

'SHRBAND' OF STRUCTURE <ls_ds02> TO <lv_ds02_shrband>,

 

*Succession Process Network - added by HEOV in C202286

 

'SFAGOMKOD' OF STRUCTURE <ls_ds02> TO <lv_ds02_sfagomkod>,

 

*Succession Discipline - added by HEOV in C202286

 

'SFAGOMKO2' OF STRUCTURE <ls_ds02> TO <lv_ds02_sfagomko2>.

IF <lv_ds02_succontext> IS NOT INITIAL.

ls_result-succontext = <lv_ds02_succontext>.

ENDIF.

IF <lv_ds02_suc_reason> IS NOT INITIAL.

ls_result-suc_reason = <lv_ds02_suc_reason>.

ENDIF.

IF <lv_ds02_suc_status> IS NOT INITIAL.

ls_result-suc_status = <lv_ds02_suc_status>.

ENDIF.

IF <lv_ds02_s_pers_are> IS NOT INITIAL.

ls_result-s_pers_are = <lv_ds02_s_pers_are>.

ENDIF.

IF <lv_ds02_s_pers_sar> IS NOT INITIAL.

ls_result-s_pers_sar = <lv_ds02_s_pers_sar>.

ENDIF.

IF <lv_ds02_s_emp_grp> IS NOT INITIAL.

ls_result-s_emp_grp = <lv_ds02_s_emp_grp>.

ENDIF.

IF <lv_ds02_s_emp_sgrp> IS NOT INITIAL.

ls_result-s_emp_sgrp = <lv_ds02_s_emp_sgrp>.

ENDIF.

IF <lv_ds02_s_com_code> IS NOT INITIAL.

ls_result-s_com_code = <lv_ds02_s_com_code>.

ENDIF.

IF <lv_ds02_scountryid> IS NOT INITIAL.

ls_result-scountryid = <lv_ds02_scountryid>.

ENDIF.

IF <lv_ds02_s_ethn_org> IS NOT INITIAL.

ls_result-s_ethn_org = <lv_ds02_s_ethn_org>.

ENDIF.

IF <lv_ds02_s_gender> IS NOT INITIAL.

ls_result-s_gender = <lv_ds02_s_gender>.

ENDIF.

IF <lv_ds02_s_nation> IS NOT INITIAL.

ls_result-s_nation = <lv_ds02_s_nation>.

ENDIF.

IF <lv_ds02_s_age> IS NOT INITIAL.

ls_result-s_age = <lv_ds02_s_age>.

ENDIF.

IF <lv_ds02_s_jobten> IS NOT INITIAL.

ls_result-s_jobten = <lv_ds02_s_jobten>.

ENDIF.

IF <lv_ds02_s_emp_stat> IS NOT INITIAL.

ls_result-s_emp_stat = <lv_ds02_s_emp_stat>.

ENDIF.

IF <lv_ds02_s_tal_cont> IS NOT INITIAL.

ls_result-s_tal_cont = <lv_ds02_s_tal_cont>.

ENDIF.

IF <lv_ds02_s_tal_stat> IS NOT INITIAL.

ls_result-s_tal_stat = <lv_ds02_s_tal_stat>.

ENDIF.

IF <lv_ds02_s_tal_reas> IS NOT INITIAL.

ls_result-s_tal_reas = <lv_ds02_s_tal_reas>.

ENDIF.

IF <lv_ds02_s_srvclen> IS NOT INITIAL.

ls_result-s_srvclen = <lv_ds02_s_srvclen>.

ENDIF.

IF <lv_ds02_successorn> IS NOT INITIAL.

ls_result-successorn = <lv_ds02_successorn>.

ENDIF.

IF <lv_ds02_s_tal_grp> IS NOT INITIAL.

ls_result-s_tal_grp = <lv_ds02_s_tal_grp>.

ENDIF.

IF <lv_ds02_ranking> IS NOT INITIAL.

ls_result-ranking = <lv_ds02_ranking>.

ENDIF.

IF <lv_ds02_readinessn> IS NOT INITIAL.

ls_result-readinessn = <lv_ds02_readinessn>.

ENDIF.

 

*Succession Band - added by HEOV in C202286

 

IF <lv_ds02_shrband> IS NOT INITIAL.

ls_result-/bic/shrband = <lv_ds02_shrband>.

ENDIF.

 

*Succession Process Network - added by HEOV in C202286

 

IF <lv_ds02_sfagomko2> IS NOT INITIAL.

ls_result-/bic/sfagomko2 = <lv_ds02_sfagomko2>.

ENDIF.

 

*Succession Discipline - added by HEOV in C202286

 

IF <lv_ds02_sfagomkod> IS NOT INITIAL.

ls_result-/bic/sfagomkod = <lv_ds02_sfagomkod>.

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. "no successor found

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.

 

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

Accepted Solutions (0)

Answers (3)

Answers (3)

matt
Active Contributor
0 Kudos

Even though I'm an ABAP developer who does a lot of BW work, I entirely agree with Ethan. ABAP should be the last resort.

Now, you've got

ASSIGN COMPONENT 'SHRBAND' OF STRUCTURE <ls_ds02> TO <lv_ds02_shrband>.

Then later, you have

IF <lv_ds02_shrband> IS NOT INITIAL.

  ls_result-/bic/shrband = <lv_ds02_shrband>.

ENDIF.

I'm assuming this is where your getting your "not assigned" error. Now - what do you think will happen if the field "SHRBAND" doesn't exist in <ls_ds02>?

esjewett
Active Contributor
0 Kudos

Hi Helge,

When you get this error message I think it is always going to be for the same reason: You are trying to access a field-symbol that is not assigned. You'll have to look in ST22 and find out where the dump actually occurs, which should give you a better idea of why the problem is happening.

Like in your last thread, I'm really curious why you're not using built-in functions to do a lot of this work. The way this ABAP is written (multiple select statements inside of a loop) is very very inefficient. The standard functions would be much faster, at least for the master data lookup. I would recommend making a real effort to use standard BW functionality instead of ABAP. I can't stress enough how important this principle is while working in BW or in any SAP application.

Best regards,

Ethan

Former Member
0 Kudos

ok, first of all, this code is pretty hard to read... don't be affraid of the Pretty Print button

apart from the zillion field-symbols, here's another thing I don't quite understand:

CALL METHOD cl_hrtmc_bi_tools=>get_position_successors

  EXPORTING

     iv_calmonth = ls_result-calmonth

     iv_position = ls_result-hrposition

  RECEIVING

     et_position_successors = lt_ds02.

ASSIGN lt_ds02->* TO <lt_ds02>.

IF lt_ds02 IS NOT INITIAL.

you assign the internal table lt_ds02 to a field-symbol and only after that you check whether it's not empty?

I would do that check before assigning the field-symbol...

additionally you keep creating records in the result_package even though there are no new records... (the CALL METHOD me->new_record__end_routine after the last ELSE is doing that)

in that case you should "modify" your record instead of creating a new one (at least, that's what I assume)