Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Timed Out Error

Hi,

I am getting Timeout error while appending the itab3 into itab4.

Below is the code which iam facing the problem.

   data: l_flg.
   refresh: itab3.
   select vbak~ernam vbak~vbeln vbap~posnr
         vbap~matnr vbap~arktx vbap~kwmeng
         vbap~erdat  vbap~prodh
         vbap~netwr vbap~wavwr vbak~knumv
         vbak~auart vbak~vkbur
         vbap~knuma_pi vbap~knuma_ag
  into corresponding fields of table itab3
  from vbak inner join vbap
  on vbak~vbeln = vbap~vbeln
   where vbak~erdat in s_date
     and vbak~auart in s_type
     and vbap~prodh in s_hier
     and vbap~ernam in s_name
     and vbak~kunnr in s_soldto
     and vbak~vkorg in s_org
     and vbak~vtweg in s_dist
     and vbak~spart in s_div
     and vbak~vkbur in s_slsoff
     and vbap~knuma_pi in s_slspmo
     and vbap~knuma_ag in s_slsdl.
 

 if not itab3[] is initial.
     select  knumv
            kposn
            kappl
            kschl
            kwert  from konv
             into table tab_kwert
             for all entries in itab3
            where konv~knumv = itab3-knumv
              and konv~kposn = itab3-posnr
              and konv~kappl = 'V'
              and konv~kschl in s_ctype.

     sort tab_kwert by knumv kposn.

  endif.
    clear itab4.
  refresh itab4.
  loop at itab3 assigning <fs_tab3>.
     clear: l_flg.
      loop at tab_kwert where knumv = <fs_tab3>-knumv
                        and kposn = <fs_tab3>-posnr
                        and kappl = 'V'.
       l_flg = 'X'.
      <fs_tab3>-kschl = tab_kwert-kschl.
      <fs_tab3>-kwert = tab_kwert-kwert.
       select single * from vbkd where vbeln eq <fs_tab3>-vbeln.
      if sy-subrc = 0.
        <fs_tab3>-prsdt = vbkd-prsdt.
      endif.
      itab4 = itab3.
      append itab4.
      clear  itab4.
 
      commit work.
 
    endloop.
     if l_flg is initial.
      delete itab3.
    endif.
  endloop.

Provide me some tips to avoid this problem

Thanks

Tags:
Not what you were looking for? View more on this topic or Ask a question