Skip to Content
0
Former Member
Feb 09, 2009 at 04:52 PM

"CX_SY_OPEN_SQL_DB" ERROR when modifying a custom table

98 Views

Dear friends,

I get this runtime error "DBIF_RSQL_SQL_ERROR"

"CX_SY_OPEN_SQL_DB" excpetion raised while am trying to modify a custome table . says deadlock detected while waiting for resourcebelow is the code snippet please suggest solution on how to avoid the error. thanks for the help in advance.

kathy


*Get all packspec levels
  lt_levels                            =  iv_packspec_content-levels.

  loop at lt_levels into ls_levels.
    if ls_levels-hutyp is not initial.

      ls_zpackspec-guid                =  ls_levels-guid.
      ls_zpackspec-aennr               =  ls_levels-aennr.
      ls_zpackspec-total_quan          =  ls_levels-total_quan.
      ls_zpackspec-level_type          =  ls_levels-level_type.
      ls_zpackspec-/cfscmx/nest_fc     =  ls_levels-/cfscmx/nest_fc.
      ls_zpackspec-maxstack            =  ls_levels-maxstack.
      ls_zpackspec-unit_tw             =  ls_levels-unit_tw.
      ls_zpackspec-g_weight            =  ls_levels-g_weight.
      ls_zpackspec-unit_tv             =  ls_levels-unit_tv.
      ls_zpackspec-g_volume            =  ls_levels-g_volume.
      ls_zpackspec-trgqty              =  ls_levels-trgqty.
      ls_zpackspec-flg_minimum_ps      =  ls_levels-flg_minimum_ps.
      ls_zpackspec-creadat             =  sy-datum.
      ls_zpackspec-matid               =  iv_packspec_content-content-matid.
      ls_zpackspec-hu_create           =  ls_levels-hu_create.
      ls_zpackspec-unit_gw             =  ls_levels-unit_gw.
      ls_zpackspec-g_capa              =  ls_levels-g_capa.
      ls_zpackspec-unit_gv             =  ls_levels-unit_gv.
      ls_zpackspec-hutyp               =  ls_levels-hutyp.
      ls_zpackspec-block               =  ls_levels-block.
      ls_zpackspec-length              =  ls_levels-length.
      ls_zpackspec-width               =  ls_levels-width.
      ls_zpackspec-height              =  ls_levels-height.
      ls_zpackspec-unit_lwh            =  ls_levels-unit_lwh.
      ls_zpackspec-nest_ftr            =  ls_levels-nest_ftr.

      if not ls_elementgroup is initial.

        sort ls_elementgroup by guid.
        read table ls_elementgroup assigning <ps_el_group>
                                    with key guid = ls_levels-elementgroup
                               binary search.

        if <ps_el_group> is assigned.
          ls_elemgroup = <ps_el_group>-elements.
        endif.

        sort ls_elemgroup by hurelevant.
        read table ls_elemgroup assigning <ps_elem>
                                 with key hurelevant = 1
                            binary search.

        if sy-subrc eq 0.
          ls_zpackspec-hurelevant      =  <ps_elem>-hurelevant.
        endif.

      endif.

      append ls_zpackspec  to  lt_zpackspec.
      clear  ls_zpackspec.

    endif.
  endloop.


**Update Packspec data for each level in the table ZPACKSPEC.*

  *if not lt_zpackspec is initial.*
    *modify zpackspec from table lt_zpackspec.*
    *ev_zpackspec  =   lt_zpackspec.*
  *endif.*