Friday, 26 October 2012

Object Activation Error

Object Activation Error Post New Installation of SAP BI 7.3

Applies to:
The Following Article is relevant for SAP BI 7.3

Summary:
After a new installation is done for BI 7.3 there are activation errors for Info Objects and data Sources due to corrupt entries in table. This article explains the root cause of the issue and provides the code to resolve the issue.

Issue in Object Activation and Data Source Replication:
After new installation of BI 7.3 , when you try to install BI Content Objects or try to create new Info Objects or try to activate data sources there is a error related to syntax error of Program. This also causes the Technical Content Objects to be delivered in an inactive state.

Symptoms:

1. When you try to activate a Info Object ( Both Custom and Standard from BI Content ) you get the following syntax error in program RSTMPLTLOGO_FORMS_IOBJ.
Syntax error in RSTMPLTLOGO_FORMS_IOBJ, row 287 (-> long text)
Message no. RG102

2. When you try to activate a Data Source after replicating you get a similar syntax error as above in program RSTMPLTLOGO_FORMS_RSDS.

3. Technical Content Objects like Info Cubes and Info Objects in inactive state.

Root Cause:

This is due to corrupt data in the table REPOSRC in the field VERN. The last character of the six digit NUMC field is not a valid NUMC value; instead it is a '\0' character. When you display a REPOSRC line using transaction SE16, the system displays a value '00000#'.
This is a program error. During the transport of REPOSRC entries, a corrupt entry is written to the field REPOSRC.VERN during the import of R3trans.
This problem occurs if the following R3trans version is used for the import:09.05.12 - 15:26:00.The problem is corrected with the following R3trans version: 17.07.12 - 16:12:42

Solution:

1. Re-import with corrected R3trans

2. Try to fix REPOSRC-VERN

The infoobject activation failure may caused by the corrupted entry in
field VERN.

The attached report "Z_RESOLVE_VERN" may help you to resolve the issue by fixing the corrupt entry in VERN field of
table REPOSRC.

The Z ABAP report needs to be created in the SAP BI system and run. This will resolve the issue.

This is an example of a code sample:

report  z_resolve_vern line-size 200.

parameters fix type c as checkbox.

constants:
  other type i value -1,
  todo  type i value -2.

data:
  g_wa       type d010sinf,
  g_ok_cnt   type i,
  g_err_cnt  type i,
  g_todo_cnt type i,
  g_cmp      type c length 4 value '0000',
  g_len_x    type i,
  g_len_c    type i,
  g_offs     type i,

  c          type cursor,
  rc         type sy-subrc,
  cx         type ref to cx_root,
  dummy      type i.

field-symbols:
  <x> type x.

start-of-selection.
  perform init.

  open cursor with hold c for select * from d010sinf.

  do.

    fetch next cursor c into g_wa.
    if sy-subrc = 4.
      exit.
    endif.

*   Exclude '<nr> <nr>' VERN values: space in the 4th char is the
*   common sign for these values.
    check g_wa-vern+3(1) ne space.

    try.

        dummy = g_wa-vern.

      catch cx_sy_conversion_no_number into cx.

        assign g_wa-vern to <x> casting.
*       Check whether the last byte (or 2 bytes in an Unicode system)
*       is 0x00
        rc = other.
        if <x>+g_offs(g_len_x) = g_cmp(g_len_c).
          if fix = 'X'.
            perform repair changing rc.
          else.
            rc = todo. add 1 to g_todo_cnt.
          endif.
        endif.
        perform log using rc.

    endtry.

  enddo.

  perform summary.

*&---------------------------------------------------------------------*
*&      Form  repair
*&---------------------------------------------------------------------*
*       Update VERN to 000001 using the data in global variable g_wa.
*       Commit every 10000 ok updates.
*----------------------------------------------------------------------*
*      -->P_RC       0 in case the update was successful, 4 otherwise.
*----------------------------------------------------------------------*
form repair changing p_rc type sy-subrc.
  data:
    commit type i.

  check  fix = 'X'.
  clear p_rc.

  exec sql.
    update "REPOSRC" set "VERN" = '000001' where "PROGNAME" = :g_wa-prog and "R3STATE" = :g_wa-r3state
  endexec.
  p_rc = sy-subrc.
  if p_rc eq 0.
    add 1 to g_ok_cnt.
  else.
    add 1 to g_err_cnt.
  endif.
  commit = g_ok_cnt mod 10000.
  if commit = 0.
    call function 'DB_COMMIT'.
  endif.

endform.                    "repair

*&---------------------------------------------------------------------*
*&      Form  log
*&---------------------------------------------------------------------*
form log using rc.
  write: / g_wa-prog, g_wa-r3state, g_wa-vern, <x>, 'UDAT:', g_wa-udat.
  case rc.
    when other.
      write: '=> not considered by this report'.
    when todo.
      write: '=> value to be fixed'.
    when 0.
      write: '=> null value fixed' color col_positive.
    when 4.
      write: '=> error during update' color col_negative.
  endcase.
endform.                    "log

*&---------------------------------------------------------------------*
*&      Form  init
*&---------------------------------------------------------------------*
form init.
  if cl_abap_char_utilities=>charsize = 1.
    g_offs  = 5.
    g_len_x = 1.
    g_len_c = 2.
  elseif cl_abap_char_utilities=>charsize = 2.
    g_offs  = 10.
    g_len_x = 2.
    g_len_c = 4.
  else.
    message 'Got invalid value for the length of a character' type 'A'.
  endif.
endform.                    "init

*&---------------------------------------------------------------------*
*&      Form  summary
*&---------------------------------------------------------------------*
form summary.
  uline.
  write: / 'Summary' color col_group.

  if g_todo_cnt = 0 and g_ok_cnt = 0 and g_err_cnt = 0.
    write: / 'No problems found' color col_positive.
  else.
    if fix = 'X'.
      write: / 'VERN values corrected:', g_ok_cnt.
      write: / 'VERN values with update errors:', g_err_cnt.
    else.
      write: / 'VERN values to be corrected:', g_todo_cnt.
    endif.
  endif.
endform.                    "summary

No comments:

Post a Comment