Abap program causing MEMORY_NO_MORE_PAGING

Please help me to crack the code, which is causing the dump MEMORY_NO_MORE_PAGING.
============================================================
report AQA0ZFINAPP=====ZFINAPP_ARINV=
   line-size 255 no standard page heading line-count 000(001).
include <symbol>.
include <icon>.
selection-screen: begin of block prog
                           with frame title text-f58.
tables BKPF.
data %count-BKPF(4) type x.
data %linr-BKPF(2).
tables BSEG.
data %count-BSEG(4) type x.
data %linr-BSEG(2).
tables T001.
data %count-T001(4) type x.
data %linr-T001(2).
tables aqldb.
include rsaqexcd.
data: begin of %st_liste occurs 100,
          head(1),
          tab(3),
          line(6) type n,
          cont(1) type n,
          fint(1),
          finv(1),
          fcol(1) type n,
          text(0255),
      end of %st_liste.
data %data_selected(1).
data %glframe(1)  value 'X' .
data %uflag(1).
data %ustflag(1).
data %grst_text(255).
data %glline type i.
data %tabix like sy-tabix.
data %prflag(1) type x value '02'.
data: %textpool_read(1),
      %textpool_langu type textpool occurs 0,
      %textpool_langu_line type textpool.
data: %txt1        type textpool-entry,
       %txt2        type textpool-entry,
       %txt3        type textpool-entry,
       %txtkey      type textpool-key,
       %txt_unknown type textpool-entry value 'UNKNOWN TEXT'.
data TEXT_BKPF_BLART like T003T-LTEXT.
data TEXT_BKPF_BUKRS like T001-BUTXT.
data TEXT_BKPF_USNAM like ADDR3_VAL-NAME_TEXT.
data TEXT_BSEG_BUKRS like T001-BUTXT.
data TEXT_BSEG_KUNNR like KNA1-NAME1.
data TEXT_BSEG_SEGMENT like FAGL_SEGMT-NAME.
data TEXT_BSEG_SHKZG like DD07D-DDTEXT.
data TEXT_BSEG_ZZCOMM_CD like ZCOMMODITY-ZZCOMM_DS.
data TEXT_BSEG_ZZMFG_CD like ZMFG-ZZMFG_DS.
data TEXT_EKKO_LIFNR like LFA1-NAME1.
data %perc(4) type p decimals 3.
data %p100(4) type p decimals 3 value '100.000'.
data %rangct type i.
data %rangcc(8).
select-options SP$00001 for BKPF-BLART memory id BAR.
select-options SP$00002 for BKPF-BLDAT.
select-options SP$00003 for BKPF-BUDAT.
select-options SP$00005 for BKPF-BUKRS memory id BUK.
select-options SP$00004 for BKPF-GJAHR memory id GJR.
selection-screen skip 1.
selection-screen: begin of block direct
                  with frame title text-f59.
selection-screen: begin of line.
*selection-screen: comment 1(12) text-f57.
selection-screen: pushbutton 75(18) pb%exco user-command expcol
                                   modif id new.
selection-screen: end of line.
selection-screen: begin of line.
parameters:       %alv radiobutton group func user-command outbut
                                modif id new  default 'X' .
selection-screen: comment 4(26) text-f72 for field %alv
                                modif id new.
parameters:       %alvl type slis_vari modif id new.
selection-screen: end of line.
selection-screen: begin of line.
parameters:       %nofunc radiobutton group func modif id old.
selection-screen: comment 4(26) text-f66 for field %nofunc
                                         modif id old.
parameters:       %tview radiobutton group func modif id old.
selection-screen: comment 34(26) text-f68 for field %tview
                                          modif id old,
                  end of line.
selection-screen: begin of line.
parameters:       %graph radiobutton group func modif id old.
selection-screen: comment 4(26) text-f61 for field %graph
                                         modif id old.
parameters:       %text radiobutton group func modif id old.
selection-screen: comment 34(26) text-f69 for field %text
                                          modif id old,
                  end of line.
selection-screen: begin of line.
parameters:       %abc radiobutton group func modif id old.
selection-screen: comment 4(26) text-f70 for field %abc
                                         modif id old.
parameters:       %excel radiobutton group func modif id old.
selection-screen: comment 34(26) text-f60 for field %excel
                                         modif id old,
                  end of line.
selection-screen: begin of line.
selection-screen: end of line.
selection-screen: begin of line.
parameters:       %xint radiobutton group func modif id xin.
selection-screen: comment 4(26) text-f73 for field %xint
                                         modif id xin.
parameters:       %xintk like AQXINT-XIKEY lower case modif id xin.
selection-screen: end of line.
selection-screen: begin of line.
parameters:       %down radiobutton group func modif id old.
selection-screen: comment 4(26) text-f64 for field %down
                                         modif id old.
parameters:       %path type AQ_FILENAME lower case modif id old.
selection-screen: end of line.
selection-screen: begin of line.
parameters:       %save radiobutton group func modif id lis.
selection-screen: comment 4(26) text-f62 for field %save
                                         modif id lis.
parameters:       %listid like AQCAQL-TEXT visible length 40
                  lower case modif id lis.
selection-screen: end of line.
selection-screen: end of block direct.
selection-screen: end of block prog.
data: begin of %g00 occurs 100,
            BKPF-BUKRS like BKPF-BUKRS,
            BKPF-BELNR like BKPF-BELNR,
            BKPF-BLART like BKPF-BLART,
            BKPF-BLDAT like BKPF-BLDAT,
            BKPF-BUDAT like BKPF-BUDAT,
            BKPF-WWERT like BKPF-WWERT,
            BKPF-XBLNR like BKPF-XBLNR,
            BKPF-BKTXT like BKPF-BKTXT,
            BKPF-AWKEY like BKPF-AWKEY,
            BSEG-XREF1 like BSEG-XREF1,
            BSEG-XREF2 like BSEG-XREF2,
            BSEG-BUKRS like BSEG-BUKRS,
            BSEG-BUZEI like BSEG-BUZEI,
            BSEG-HKONT like BSEG-HKONT,
            BSEG-SEGMENT like BSEG-SEGMENT,
            BSEG-PRCTR like BSEG-PRCTR,
            BSEG-KOSTL like BSEG-KOSTL,
            BSEG-ZZCOMM_CD like BSEG-ZZCOMM_CD,
            BSEG-ZZMFG_CD like BSEG-ZZMFG_CD,
            TEXT_BSEG_SHKZG like TEXT_BSEG_SHKZG,
            BSEG-WRBTR like BSEG-WRBTR,
            BKPF-WAERS-0121 like BKPF-WAERS,
            BSEG-DMBTR like BSEG-DMBTR,
            T001-WAERS-0122 like T001-WAERS,
            BSEG-DMBE2 like BSEG-DMBE2,
            BKPF-HWAE2-0123 like BKPF-HWAE2,
            BSEG-DMBE3 like BSEG-DMBE3,
            BKPF-HWAE3-0124 like BKPF-HWAE3,
            BSEG-KUNNR like BSEG-KUNNR,
            TEXT_BSEG_KUNNR like TEXT_BSEG_KUNNR,
      end of %g00.
data: begin of %%g00,
            BKPF-BUKRS(004),
            BKPF-BELNR(010),
            BKPF-BLART(002),
            BKPF-BLDAT(010),
            BKPF-BUDAT(010),
            BKPF-WWERT(010),
            BKPF-XBLNR(016),
            BKPF-BKTXT(025),
            BKPF-AWKEY(020),
            BSEG-XREF1(012),
            BSEG-XREF2(012),
            BSEG-BUKRS(004),
            BSEG-BUZEI(003),
            BSEG-HKONT(010),
            BSEG-SEGMENT(010),
            BSEG-PRCTR(010),
            BSEG-KOSTL(010),
            BSEG-ZZCOMM_CD(003),
            BSEG-ZZMFG_CD(004),
            TEXT_BSEG_SHKZG(060),
            BSEG-WRBTR(016),
            BKPF-WAERS-0121 like BKPF-WAERS,
            BSEG-DMBTR(016),
            T001-WAERS-0122 like T001-WAERS,
            BSEG-DMBE2(016),
            BKPF-HWAE2-0123 like BKPF-HWAE2,
            BSEG-DMBE3(016),
            BKPF-HWAE3-0124 like BKPF-HWAE3,
            BSEG-KUNNR(010),
            TEXT_BSEG_KUNNR(035),
      end of %%g00.
data %znr type i.
data %lznr type i value 99999.
field-groups header.
field-groups %fg01.
data %any-01.
controls tview100 type tableview using screen 100.
AT SELECTION-SCREEN.
perform alvl_check(rsaqexce) using %alvl 'G00'.
perform testmode(rsaqexce).
perform check_expcol(rsaqexce) using %alv.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR %ALVL.
perform alvl_value_request(rsaqexce) using %alvl 'G00'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR %XINTK.
perform xint_value_request(rsaqexce).
AT SELECTION-SCREEN OUTPUT.
perform save_initial_sscr(rsaqexce).
perform rinit(rsaqbrst).
perform set_expcol(rsaqexce) using %alv pb%exco.
perform alvl_set_invisible(rsaqexce).
perform set_xint_params(rsaqexce).
INITIALIZATION.
perform init_xint(rsaqexce).
perform set_www_flags(rsaqexce).
perform init_print_params(rsaqexce).
if %textpool_read is initial.
  read textpool sy-repid into %textpool_langu language sy-langu.
  %textpool_read = 'X'.
endif.
START-OF-SELECTION.
insert %count-BKPF into header.
insert %linr-BKPF into header.
insert %count-BSEG into header.
insert %linr-BSEG into header.
insert BKPF-BUKRS into %fg01.
insert BKPF-BELNR into %fg01.
insert BKPF-BLART into %fg01.
insert BKPF-BLDAT into %fg01.
insert BKPF-BUDAT into %fg01.
insert BKPF-WWERT into %fg01.
insert BKPF-XBLNR into %fg01.
insert BKPF-BKTXT into %fg01.
insert BKPF-AWKEY into %fg01.
insert BSEG-XREF1 into %fg01.
insert BSEG-XREF2 into %fg01.
insert BSEG-BUKRS into %fg01.
insert BSEG-BUZEI into %fg01.
insert BSEG-HKONT into %fg01.
insert BSEG-SEGMENT into %fg01.
insert BSEG-PRCTR into %fg01.
insert BSEG-KOSTL into %fg01.
insert BSEG-ZZCOMM_CD into %fg01.
insert BSEG-ZZMFG_CD into %fg01.
insert TEXT_BSEG_SHKZG into %fg01.
insert BSEG-WRBTR into %fg01.
insert BKPF-WAERS into %fg01.
insert BSEG-DMBTR into %fg01.
insert T001-WAERS into %fg01.
insert BSEG-DMBE2 into %fg01.
insert BKPF-HWAE2 into %fg01.
insert BSEG-DMBE3 into %fg01.
insert BKPF-HWAE3 into %fg01.
insert BSEG-KUNNR into %fg01.
insert TEXT_BSEG_KUNNR into %fg01.
perform init_texthandling(rsaqexce) using 'CL_TEXT_IDENTIFIER' ' ' 'ZFINAPP_BRM'.
"webgui
data: %ret type i.
  if sy-subrc is initial and %excel is not initial.
    perform check_wingui(rsaqsyst) using %ret.
    if %ret <> 0.
      message e842(aq).
    endif.
  endif.
"webgui
perform %comp_ldesc.
GET BKPF .
  %dbacc = %dbacc - 1.
  if %dbacc = 0.
    stop.
  endif.
  check SP$00001.
  check SP$00002.
  check SP$00003.
  check SP$00005.
  check SP$00004.
  add 1 to %count-BKPF.
  %linr-BKPF = '99'.
GET BSEG .
  %dbacc = %dbacc - 1.
  if %dbacc = 0.
    perform %_get_BKPF_late in program (sy-cprog) if found
            using %selected BKPF.
    stop.
  endif.
  perform textfield_refresh(rsaqexce).
  perform textfield_context(rsaqexce) using 'BSEG' BSEG.
  perform textfield_context(rsaqexce) using 'BKPF' BKPF.
  perform textfield_call(rsaqexce) using BSEG 'BSEG' 'KUNNR' TEXT_BSEG_KUNNR.
  perform textfield_call(rsaqexce) using BSEG 'BSEG' 'SHKZG' TEXT_BSEG_SHKZG.
  add 1 to %count-BSEG.
  %linr-BSEG = '01'.
  extract %fg01.
  %linr-BSEG = '99'.
END-OF-SELECTION.
sort as text.
%diact = space.
%printon = space.
%batch = sy-batch.
if %batch <> space.
  if %alv <> space.
    %diact = 'V'.
    %printon = 'X'.
    %alv_layout = %alvl.
    new-page print on destination 'NULL' no dialog
             line-size 0255 line-count 0065.
  endif.
  if %save <> space.
    %diact = 'S'.
    %printon = 'X'.
    new-page print on destination 'NULL' no dialog
             line-size 0255 line-count 0065.
  endif.
elseif %called_by_www <> space.
  %diact = space.
elseif %called_by_www_alv <> space.
  %diact = 'V'.
else.
  perform init_print_params(rsaqexce).
  if %save  <> space. %diact = 'S'. endif.
  if %xint  <> space. %diact = 'I'. endif.
  if %tview <> space. %diact = 'T'. endif.
  if %alv   <> space. %diact = 'V'. endif.
  if %down  <> space. %diact = 'D'. endif.
  if %graph <> space. %diact = 'G'. endif.
  if %excel <> space. %diact = 'X'. endif.
  if %text  <> space. %diact = 'W'. endif.
  if %abc   <> space. %diact = 'A'. endif.
  if %diact <> space and %diact <> 'S' and %diact <> 'W'.
    %printon = 'X'.
    new-page print on destination 'NULL' no dialog
             line-size 0255 line-count 0065.
  endif.
  %pathname = %path.
  if %diact = 'I'.
    %functionkey = %xintk.
  endif.
  if %diact = 'V'.
    %alv_layout = %alvl.
  endif.
endif.
free memory id 'AQLISTDATA'.
if %memmode <> space.
  if %batch <> space and %printon = space.
    %printon = 'X'.
    new-page print on destination 'NULL' no dialog
             line-size 0255 line-count 0065.
  endif.
  %diact = '1'.
endif.
%titel = ' '.
if sy-subty o %prflag and %titel = space.
  new-page with-title.
endif.
%tvsize = 0200.
%pline = 1.
%pzgr  = 1.
%first = 'X'.
perform %output.
%first = space.
if %diact <> space and %diact <> 'S'.
  if %batch = space.
    new-page print off.
    if not ( %diact = 'V' and %ucomm = 'PRIN' ).
      new-page no-heading no-title.
      write space.
    endif.
  endif.
else.
  perform pf-status(rsaqexce) using 'XX    '.
endif.
clear: %tab, %line, %cont.
if %data_selected = space.
  if %diact = '1'.
    export empty from %empty to memory id 'AQLISTDATA'.
    leave.
  else.
    if %batch = space and
       %called_by_www = space and
       %called_by_www_alv = space.
      message s260(aq).
      leave list-processing.
    else.
      if %called_by_www_alv = space.
        %diact = space.
      endif.
    endif.
  endif.
endif.
if %diact = 'S'.
  perform %save_list.
  leave list-processing.
endif.
if %diact = 'V' and %batch <> space.
  new-page print off.
  perform set_print_params(rsaqexce).
  perform %download using 'ALV'.
  leave.
endif.
if %diact = 'V' and %called_by_www_alv <> space.
  perform %download using 'ALV'.
  leave.
endif.
*if %diact = 'V' and ( %ucomm = 'PRIN' or sy-subty = '07' ).
data %is_submit_to_spool type c.
if %diact = 'V'.
  CALL FUNCTION 'IS_SUBMIT_TO_SPOOL'
    IMPORTING FLAG = %is_submit_to_spool.
  if ( %ucomm = 'PRIN' or %is_submit_to_spool = 'X' ).
    perform set_print_params(rsaqexce).
    perform %download using 'ALV'.
    set parameter id 'SPI' field sy-spono.
    leave list-processing.
  endif.
endif.
if %diact = 'P' and %batch <> space.
  perform %download using '+DAT'.
  leave list-processing.
endif.
if %diact = 'E' and %batch <> space.
  perform %download using 'EIS'.
  leave list-processing.
endif.
if %diact = '1'.
  perform %download using '+MEM'.
  leave.
endif.
if %diact = 'X'.
  set user-command 'XXL'.
elseif %diact = 'W'.
  set user-command 'TEXT'.
elseif %diact = 'V'.
  set user-command 'ALV'.
elseif %diact = 'T'.
  set user-command 'VIEW'.
elseif %diact = 'G'.
  set user-command 'GRAF'.
elseif %diact = 'A'.
  set user-command 'ABCA'.
elseif %diact = 'E'.
  set user-command 'EIS'.
elseif %diact = 'D'.
  set user-command 'DOWN'.
elseif %diact = 'I'.
  set user-command 'XINT'.
elseif %diact = 'P'.
  set user-command '+DAT'.
endif.
TOP-OF-PAGE.
perform %top-of-page.
END-OF-PAGE.
perform page_foot(rsaqexce).
perform %save_page.
TOP-OF-PAGE DURING LINE-SELECTION.
perform %top-of-page.
AT USER-COMMAND.
case sy-ucomm.
when 'EXIT'.
  leave program.
when 'RETN'.
  perform return(rsaqexce).
when 'CANC'.
  perform return(rsaqexce).
when 'WEIT'.
  perform return(rsaqexce).
when 'INHA'.
  perform catalogue(rsaqexce).
when 'AUSL'.
  perform pickup(rsaqexce).
when 'AUSW'.
  perform pickup(rsaqexce).
when 'RCAA'.
  perform rchain(rsaqbrst).
when 'RCAL'.
  perform rcall(rsaqbrst).
when 'VGLI'.
  perform change(rsaqexce).
when 'VGLE'.
  perform change(rsaqexce).
when 'TOTO'.
  perform change(rsaqexce).
when 'VSTA'.
  perform change(rsaqexce).
when 'VSTE'.
  perform return(rsaqexce).
when 'SAVL'.
  perform %save_list.
when 'ODRU'.
  perform print_list(rsaqexce).
when 'COPA'.
  perform print_cover_page(rsaqexce).
when 'TEXT'.
  perform %download using 'TEXT'.
when 'ALV'.
  perform %download using 'ALV'.
when 'VIEW'.
  perform %view.
when 'XXL'.
  perform %download using 'XXL'.
when 'GRAF'.
  perform %download using 'GRAF'.
when 'ABCA'.
  perform %download using 'ABCA'.
when 'DOWN'.
  perform %download using 'DOWN'.
when 'XINT'.
  perform %download using 'XINT'.
endcase.
clear: %cline, %zgr.
clear: %tab, %line, %cont.
if %diact <> space.
  leave list-processing.
endif.
form %comp_ldesc.
  refresh %ldesc.
  refresh %gdesc.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A00'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B00'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00010000X004       00  01'
    %txt1 %txt2 %txt3 'BKPF-BUKRS' BKPF-BUKRS 'BKPF-BUKRS'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A01'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B01'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00020000X010       00  01'
    %txt1 %txt2 %txt3 'BKPF-BELNR' BKPF-BELNR 'BKPF-BELNR'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A02'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B02'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00030000X002       00  01'
    %txt1 %txt2 %txt3 'BKPF-BLART' BKPF-BLART 'BKPF-BLART'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A03'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B03'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00040000X010       00  01'
    %txt1 %txt2 %txt3 'BKPF-BLDAT' BKPF-BLDAT 'BKPF-BLDAT'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A04'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B04'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00050000X010       00  01'
    %txt1 %txt2 %txt3 'BKPF-BUDAT' BKPF-BUDAT 'BKPF-BUDAT'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A05'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B05'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00060000X010       00  01'
    %txt1 %txt2 %txt3 'BKPF-WWERT' BKPF-WWERT 'BKPF-WWERT'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A06'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B06'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00070000X016       00  01'
    %txt1 %txt2 %txt3 'BKPF-XBLNR' BKPF-XBLNR 'BKPF-XBLNR'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A07'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B07'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00080000X025       00  01'
    %txt1 %txt2 %txt3 'BKPF-BKTXT' BKPF-BKTXT 'BKPF-BKTXT'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A08'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B08'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00090000X020       00  01'
    %txt1 %txt2 %txt3 'BKPF-AWKEY' BKPF-AWKEY 'BKPF-AWKEY'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A09'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B09'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00100000X012       00  01'
    %txt1 %txt2 %txt3 'BSEG-XREF1' BSEG-XREF1 'BSEG-XREF1'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A10'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B10'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H00'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00110000X012       00  01'
    %txt1 %txt2 %txt3 'BSEG-XREF2' BSEG-XREF2 'BSEG-XREF2'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A11'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B11'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00120000X004       00  02'
    %txt1 %txt2 %txt3 'BSEG-BUKRS' BSEG-BUKRS 'BSEG-BUKRS'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A12'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B12'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00130000X003       00  02'
    %txt1 %txt2 %txt3 'BSEG-BUZEI' BSEG-BUZEI 'BSEG-BUZEI'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A13'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B13'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00140000X010       00  02'
    %txt1 %txt2 %txt3 'BSEG-HKONT' BSEG-HKONT 'BSEG-HKONT'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A14'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B14'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00150000X010       00  02'
    %txt1 %txt2 %txt3 'BSEG-SEGMENT' BSEG-SEGMENT 'BSEG-SEGMENT'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A15'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B15'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00160000X010       00  02'
    %txt1 %txt2 %txt3 'BSEG-PRCTR' BSEG-PRCTR 'BSEG-PRCTR'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A16'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B16'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00170000X010       00  02'
    %txt1 %txt2 %txt3 'BSEG-KOSTL' BSEG-KOSTL 'BSEG-KOSTL'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A17'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B17'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00180000X003       00  02'
    %txt1 %txt2 %txt3 'BSEG-ZZCOMM_CD' BSEG-ZZCOMM_CD 'BSEG-ZZCOMM_CD'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A18'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B18'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00190000X004       00  02'
    %txt1 %txt2 %txt3 'BSEG-ZZMFG_CD' BSEG-ZZMFG_CD 'BSEG-ZZMFG_CD'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A19'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B19'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00201000X060       00  02'
    %txt1 %txt2 %txt3 'TEXT_BSEG_SHKZG' TEXT_BSEG_SHKZG 'TEXT_BSEG_SHKZG'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A20'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B20'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00211063 016F      00  02'
    %txt1 %txt2 %txt3 'BSEG-WRBTR' BSEG-WRBTR 'BSEG-WRBTR'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A21'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B21'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00221000 005W      00  02'
    %txt1 %txt2 %txt3 'BKPF-WAERS' BKPF-WAERS 'BKPF-WAERS-0121'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A22'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B22'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00231086 016F      00  02'
    %txt1 %txt2 %txt3 'BSEG-DMBTR' BSEG-DMBTR 'BSEG-DMBTR'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A23'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B23'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00241000 005W      00  02'
    %txt1 %txt2 %txt3 'T001-WAERS' T001-WAERS 'T001-WAERS-0122'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A24'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B24'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00251109 016F      00  02'
    %txt1 %txt2 %txt3 'BSEG-DMBE2' BSEG-DMBE2 'BSEG-DMBE2'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A25'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B25'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00261000 005W      00  02'
    %txt1 %txt2 %txt3 'BKPF-HWAE2' BKPF-HWAE2 'BKPF-HWAE2-0123'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A26'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B26'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00271132 016F      00  02'
    %txt1 %txt2 %txt3 'BSEG-DMBE3' BSEG-DMBE3 'BSEG-DMBE3'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A27'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B27'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00281000 005W      00  02'
    %txt1 %txt2 %txt3 'BKPF-HWAE3' BKPF-HWAE3 'BKPF-HWAE3-0124'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A28'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B28'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00291000X010       00  02'
    %txt1 %txt2 %txt3 'BSEG-KUNNR' BSEG-KUNNR 'BSEG-KUNNR'.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'A29'.
  if sy-subrc is initial. %txt1 = %textpool_langu_line-entry.
  else. %txt1 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'B29'.
  if sy-subrc is initial. %txt2 = %textpool_langu_line-entry.
  else. %txt2 = %txt_unknown.
  endif.
  read table %textpool_langu into %textpool_langu_line
                             with key key = 'H01'.
  if sy-subrc is initial. %txt3 = %textpool_langu_line-entry.
  else. %txt3 = %txt_unknown.
  endif.
  perform ldesc(rsaqexce) using 'G00301000X035       00  02'
    %txt1 %txt2 %txt3 'TEXT_BSEG_KUNNR' TEXT_BSEG_KUNNR 'TEXT_BSEG_KUNNR'.
  perform gdesc(rsaqexce) using 'G00' 1 20 ' ' ' ' 'X'.
  perform complete_ldesc(rsaqexce) tables %ldesc.
endform.
form %read_ldesc using p_lid   type aql_lid
                       p_ldesc type rsaqtldesc.
  p_lid = 'G00'.
  perform %comp_ldesc.
  p_ldesc[] = %ldesc[].
endform.
form %output.
describe table %prlist lines %max_prlist.
%head = 'AAA'.
%keyempty = space.
new-page.
perform %output_gl.
perform complete_page(rsaqexce).
%head = 'ZZZ'.
perform last_ptab_entry(rsaqexce).
new-page.
if %keyempty <> space.
  message s894(aq).
endif.
endform.
form %top-of-page.
if sy-ucomm = 'INHA'. exit. endif.
if sy-ucomm = 'COPA'. exit. endif.
if %head    = space.  exit. endif.
if %head = 'DDD'.
  perform tviewpage(rsaqexce).
  exit.
endif.
if %head = 'GGG'.
  perform page(rsaqexce) using 'G00' text-grl 205 %glframe 001.
  set left scroll-boundary column 002.
  perform set_scroll_boundary(rsaqexce) using 002.
  if %toto <> space. exit. endif.
else.
  case %head.
  when others.
  endcase.
endif.
endform.
form %newline.
data: %llen type i.
  %llen = 205.
  %uflag = space.
  new-line.
  write: '|', 205 '|'.
  position 2.
endform.
form %skip using count.
  if sy-linno > 1.
    %uflag = space.
    do count times.
      new-line.
      format reset.
      write: '|', 205 '|'.
    enddo.
  endif.
endform.
form %uline.
  if %uflag = space.
    if sy-linno > 1.
      uline /1(205).
    endif.
    %uflag = 'X'.
  endif.
endform.
form %hide.
  if %batch <> space and %diact = 'S'.
    perform hide(rsaqexce).
  else.
    hide: %tab, %line, %cont.
  endif.
endform.
form %hide_color.
  if %batch <> space and %diact = 'S'.
    perform hide_color(rsaqexce).
  else.
    hide: %fint, %fcol.
  endif.
endform.
form %rcall using name value.
field-symbols <field>.
  assign (name) to <field>.
  if sy-subrc <> 0.
    value = space.
    exit.
  endif.
  read current line field value <field> into value.
  if value = space and %tab = 'G00' and %ldesc-fcur na 'FM'.
    read table %g00 index %line.
    if sy-subrc = 0.
      assign component %ldesc-fnameint of structure %g00
                                       to <field>.
      if sy-subrc = 0.
        write <field> to value(%ldesc-folen).
      endif.
    endif.
  endif.
endform.
form %save_page.
  if %batch <> space and %diact = 'S'.
    perform save_page(rsaqexce) tables %st_liste.
  endif.
endform.
form %replace_var using text.
field-symbols <var>.
  assign text+1(*) to <var>.
endform.
form %save_list.
data: %sflag,
      qreport like sy-repid.
  if %diact = 'S'. %sflag = 'X'. endif.
  qreport = sy-repid.
  perform save_list(rsaqexce) tables %st_liste
                              using qreport %sflag %listid.
  if %ql_id <> space.
    %dlflag = 'X'.
    %listsize = 0255.
    perform comp_selection_screen(rsaqexce).
    export %st_liste %ptab %ldesc %gdesc %dlflag %listsize
           %selections
           %g00
           to database aqldb(aq) id %ql_id.
  endif.
endform.
form %refresh.
  case %tab.
  when 'G00'.
    import %g00 from database aqldb(aq) id %ql_id.
  endcase.
endform.
form %download using code.
data: qreport like sy-repid.
  perform init_download(rsaqexce).
  qreport = sy-repid.
  case %tab.
  when 'G00'.
    perform download(rsaqexce)
            tables %g00 using code qreport text-grl.
  when others.
    message s860(aq).
  endcase.
endform.
form %set_data changing l_lines type i.
  import ldata to %g00 from memory id 'AQLISTDATA'.
  describe table %g00 lines l_lines.
  free memory id 'AQLISTDATA'.
endform.
form %get_data tables datatab structure %g00
               using  first type i
                      last  type i.
  append lines of %g00 from first to last to datatab.
endform.
form %get_ref_to_table using lid         like rsaqldesc-lid
                             ref_to_itab type ref to data
                             subrc       like sy-subrc.
  subrc = 0.
  case lid.
  when 'G00'.
    create data ref_to_itab like %g00[].
  when others.
    subrc = 4.
    message s860(aq).
  endcase.
endform.
form %view.
data: ret type i.
  perform check_wingui(rsaqsyst) using ret.
  if ret <> 0.
    message s841(aq).
    perform %download using 'ALV'.
    exit.
  endif.
data: anz type i,
      prog like sy-repid.
  prog = sy-repid.
  perform init_download(rsaqexce).
  case %tab.
  when 'G00'.
    perform generate_view_dynpro(rsaqexce)
            using prog text-grl.
    describe table %g00 lines anz.
    tview100-lines = anz.
    perform init_view(rsaqexce) tables %g00 using tview100.
    call screen 100.
    perform reset_view_dynpro(rsaqexce).
  when others.
    message s860(aq).
  endcase.
endform.
form %colhead_print changing lines like sy-linno
                             hflag type c.
data: l_text(255).
  if %textpool_read is initial.
    read textpool sy-cprog into %textpool_langu language sy-langu.
    %textpool_read = 'X'.
  endif.
  lines = lines +  2.
  if  2 = 0. clear hflag. else. hflag = 'X'. endif.
  write at (1) '|' no-gap.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'B001'.
  if sy-subrc is initial.
    l_text = %textpool_langu_line-entry.
  else.
    clear l_text.
  endif.
  perform replace_vars(rsaqexce) using l_text 'X'.
  write at 000(004) l_text(004)  no-gap.
  write at (1) '|' no-gap.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'B011'.
  if sy-subrc is initial.
    l_text = %textpool_langu_line-entry.
  else.
    clear l_text.
  endif.
  perform replace_vars(rsaqexce) using l_text 'X'.
  write at 000(010) l_text(010)  no-gap.
  write at (1) '|' no-gap.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'B021'.
  if sy-subrc is initial.
    l_text = %textpool_langu_line-entry.
  else.
    clear l_text.
  endif.
  perform replace_vars(rsaqexce) using l_text 'X'.
  write at 000(002) l_text(002)  no-gap.
  write at (1) '|' no-gap.
  read table %textpool_langu into %textpool_langu_line
                             with key ID = 'I' key = 'B031'.
 

Hi Vijay,
The code is not developed, this is automatically generated code, when you create a SAP query using SQ01 this code get generated. There is no need to change the code. When you execute this program, then on selection screen give less entries to select.
Regards,
Atish

Similar Messages

  • Termination occurred in the ABAP program "RK2APA00_POST" - in

    Hi everybody...I have a cancelled job when run only in applications servers , I see a dump "message typeX" , but when job run in Central Instance not cancelled and finish ok.
    The name Job is Zcupon and attach to continue dump info , sorry for extended but I want send all information possible.
    know if you can add a file with the abstract and not have to paste the text of the dump, thanks for the help they can deliver.
    Regards....Freddy Solar....
    Errores tiempo ejec.   MESSAGE_TYPE_X
    Fecha y hora           18.11.2008 06:35:30
    Texto breve
    The current application triggered a termination with a short dump.
    ¿Qué ha sucedido?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    Anál.errores
    Short text of error message:
    RFC_ERROR 4 Conversation 93690218 not found / CPIC-CALL: 'ThSA
    Technical information about the message:
    Message classe...... "KE"
    Number.............. 628
    Variable 1.......... "RFC_ERROR"
    Variable 2.......... 4
    Variable 3.......... "Conversation 93690218 not found / CPIC-CALL: 'ThSA"
    Variable 4.......... " "
    Last error logged in SAP kernel
    Component............ "SAP-Gateway"
    Place................ "SAP-Gateway on host SCPAPP1 / sapgw03"
    Version.............. 2
    Error code........... 728
    Error text........... "Conversation 93690218 not found"
    Description.......... " "
    System call.......... " "
    Module............... "gwxxrd.c"
    Line................. 6156
    The error reported by the operating system is:
    Error number..... " "
    Error text....... " "
    Notas para corregir errores
    Probably the only way to eliminate the error is to correct the program.
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    please use the following search criteria:
    "RK2APA00_POST" "MESSAGE_TYPE_X"
    If you cannot solve the problem yourself, please send the
    following documents to SAP:
    1. A hard copy print describing the problem.
    To obtain this, select the "Print" function on the current screen.
    2. A suitable hardcopy prinout of the system log.
    To obtain this, call the system log with Transaction SM21
    and select the "Print" function to print out the relevant
    part.
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, you can either use the "PRINT" command in the editor or
    print the programs using the report RSINCL00.
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    Entorno sistema
    SAP-Release 700
    Application server... "SCPAPP1"
    Network address...... "10.1.40.130"
    Operating system..... "Windows NT"
    Release.............. "5.2"
    Hardware type........ "4x AMD64 Level"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 3
    Shortdump setting.... "full"
    Database server... "BALTICO"
    Database type..... "DB400"
    Database name..... "SCP"
    Database user ID.. "R3SCPDATA"
    Char.set.... "C"
    SAP kernel....... 700
    created (date)... "Jun 30 2008 00:10:07"
    create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
    Database version. "DB4_53"
    Patch level. 167
    Patch text.. " "
    Database............. "V5R3, V5R4, V6R1"
    SAP database version. 700
    Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
    NT 6.0"
    Memory consumption
    Roll.... 16192
    EM...... 159213920
    Heap.... 0
    Page.... 5660672
    MM Used. 145143664
    MM Free. 5680112
    Usuario y transacción
    Client.............. 400
    User................ "ZUSRTARJETAS"
    Language key........ "S"
    Transaction......... " "
    Program............. "RK2APA00_POST"
    Screen.............. "SAPMSSY0 1000"
    Screen line......... 6
    Info posición de cancelación
    Termination occurred in the ABAP program "RK2APA00_POST" - in
    "INSERT_CE4_FLUSH_BUFFERS".
    The main program was "ZVI_CUPON ".
    In the source code you have the termination point in line 100
    of the (Include) program "RKEVRK2A_POST_COMMIT__FIX".
    The program "RK2APA00_POST" was started as a background job.
    Job Name....... "ZCUPON"
    Job Initiator.. "ZUSRTARJETAS"
    Job Number..... 02044200
    Detalle código fuente
    Lín.
    Txt.fte.
    70
    subrc = sy-subrc.
    71
    CLEAR: g_t_ce4a_dbbuf[], g_t_ce4_dbbuf[].
    72
    73
    case subrc.
    74
    when 1.
    75
        Records were to be inserted into the acct.ref. table CE4xxxx_ACCT
    76
        but the acct. reference numbers were already occupied. Most likely
    77
        This problem is due to a explicit or implicit change to the
    78
        number range COPA_OBJ (subobject is the operating concern)
    79
        e.g. caused by illegally transporting the contents of CO-PA
    80
        transaction data table contents (CE4xxxx / CE4xxxx_ACCT).
    81
        Please check OSS for notes with keywords RKEVRK2A_POST, KF216
    82
        and CE4XXXX_ACCT. If you do not find any applicable notes please
    83
        log an OSS message.
    84
    MESSAGE x216(kf) WITH gc_ce4acct_name.
    85
    86
    when 2.
    87
        Records were to be inserted into the segment table CE4xxxx
    88
        but the segment numbers were already occupied. Most likely
    89
        This problem is due to a explicit or implicit change to the
    90
        number range COPA_OBJ (subobject is the operating concern)
    91
        e.g. caused by illegally transporting the contents of CO-PA
    92
        transaction data table contents (CE4xxxx).
    93
        Please check OSS for notes with keywords RKEVRK2A_POST, KF203
    94
        and CE4XXXX. If you do not find any applicable notes please
    95
        log an OSS message.
    96
    MESSAGE x203(kf).
    97
    98
    when 3 or 4.
    99
        Communication error in RFC-Call
    >>>>>
    message x628(ke) with 'RFC_ERROR' subrc msg_text.
    101
    102
    endcase.
    103
    104
    ENDFORM.
    105
    Edited by: freddy solar on Jan 2, 2009 8:39 PM

    Hi,
    it looks like you have some problem with RFC. It stopped on the following line:
    * Communication error in RFC-Call
    message x628(ke) with 'RFC_ERROR' subrc msg_text.
    Ask your basis guy to check it. The job on application server tried to connect to the central instance and it failed. The job run on central instance does not need to make any RFC call. Hence there is no problem in this case.
    Regards

  • ABAP Program using Selection Screen in Process Chain

    Hi,
    I have included an ABAP Program in the Process Chain.
    The ABAP Program takes a selection screen value from user before execution.
    I have created a variant for both the ABAP Process (YPV_ABC) and a variant for the Selection Screen (YPV_XYZ).
    The ABAP Program executes perfectly well in SE 38.
    I get the following message when I execute the Process Chain.
    "Status Change of Process ABAP YPV_ABC.
    Save Status and Trigger Events if Appropriate "
    When I click Yes, the ABAP Process becomes red.
    These are error messages in the log
    516 -  Job started     
    550 -  Step 001 started (program RSPROCESS, variant &0000000012961, user ID ALEREMOTE)
    25 -    Could not ascertain code page     
    546 -  Job cancelled after system exception ERROR_MESSAGE     
    My questions are:
    1) Is it possible to use an  ABAP Program which has a user input screen in Process Chain?
    2) Could you please help  with the above error?

    1) Is it possible to use an ABAP Program which has a user input screen in Process Chain?
    ABAP programs, with variants established for selection screens, are possible. We use them quite extensively for setting triggers to allow Process Chain to continue after an Interrupt Process has been hit.
    2) Could you please help with the above error?
    I'm not quite sure what could be causing this. When you tested this program in SE38, did you test it with the same variant for the selection screen and did you execute it in background?

  • ABAP programming standards for SELECT...ORDER BY....

    I recently saw a set of programming standards that stated it was better not to use an ORDER BY clause on a SELECT statement. Instead SELECT into an internal table and use SORT. The actual statement was....."In most cases it is preferable to do the sorting within the ABAP program instead of on the database server.  That means: fill the internal table via a SELECT statement and then sort via the SORT statement instead of coding a SELECT u2026 ORDER BY.  The sorting of large amounts of data on the database server affects the performance of all users on the system, whereas the sorting within the ABAP program u2018onlyu2019 affects the application server.  However, if an index exists on the table that can be used for the sorting then the SELECT u2026 ORDER BY doesnu2019t cause any undue strains on the system."
    I think this is no longer correct particularily with regards to Systemi/iSeries which we normally run in 2 tier mode.
    What are people opinion on this?

    Peter,
    the correct answer for DB2 on IBM i is "it depends". To implement "ORDER BY", the optimizer has basically these choices:
    - If an index with the columns of the "ORDER BY" clause exists, the database can access the data through this index, which returns them in the desired order. However, the data needs to be fetched row by row, so for each returned row you need one I/O request.
    - If such an index does not exist, the database can choose to perform a sequential read into a temporary storage and sort the temporary result set before returning the data to the caller. This is basically the same as reading the data into an internal table and let ABAP do the sort. Even if an index exist, reading the whole table into memory and sorting it there may be faster, because on a sequential read, the database can execute a "blocked" fetch rather than many individual I/O operations. You may see this if the table is relatively small.
    - If such an index does not exist, the database could also choose to create a temporary index and access the data through the temporary index. For the first execution, you don't gain much, but subsequent executions may perform much better. However, after an IPL you loose all temporary indexes, so the index needs to be built again on the first execution after the IPL.
    If you code your ABAP to read the table sequentially and sort it in memory, you are forcing the second implementation. If you code ABAP with the ORDER BY in the SELECT statement, you allow the database optimizer to choose the best possible implementation depending on the size of the table, the size of the result set, and the available indexes.
    If your table is relatively large but the result set (based on the WHERE clause) is relatively small, make sure to have an index that combines the WHERE clause elements returning only one value with the ORDER BY clause elements.
    For example, if you have a query like:
    SELECT * FROM T
    WHERE A = ? AND B = ? AND C IN (?, ?, ?)
    ORDER BY D, E
    you should have an index over columns A, B, D, and E for the best possible performance. A and B in the index can be used to limit the result set without any influence on the sort order D, E, but C cannot.
    Kind regards,
    Christian Bartels.

  • ABAP program "SAPLCNTL" in "CHECK_OO": MESSAGE_TYPE_X

    Hi,
    I have a problem with a program with ALV-list. Sometimes it terminates with a dump. I can not reproduce the dumps and I can not find the reason for it. I do not know, if it only terminates on some clients.
    In the program the alv table is refreshed with CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY. After this there is also a statement CALL METHOD cl_gui_cfw=>flush.
    Can anyone help?
    Kindly regards
    Frank
    Runtime Error          MESSAGE_TYPE_X                                                              
    Date and Time          11.11.2008 11:24:28                                                                               
    ShrtText                                                                               
    The current application triggered a termination with a short dump.                            
    What happened?                                                                               
    The current application program detected a situation which really                             
        should not occur. Therefore, a termination with a short dump was                              
        triggered on purpose by the key word MESSAGE (type X).                                        
    What can you do?                                                                               
    Print out the error message (using the "Print" function)                                      
        and make a note of the actions and input that caused the                                      
        error.                                                                               
    To resolve the problem, contact your SAP system administrator.                                
        You can use transaction ST22 (ABAP Dump Analysis) to view and administer                      
         termination messages, especially those beyond their normal deletion                          
        date.                                                                               
    is especially useful if you want to keep a particular message.                                
    Error analysis                                                                               
    Short text of error message:                                                                  
        Control Framework: Invalid Processing of ABAP Object Control                                                                               
    Technical information about the message:                                                      
         Diagnosis                                                                               
    You want to edit a control created with ABAP objects techniques                          
             (class-based Control Framework) using a function module (function                        
             module-based Control Framework). The system does not support this.                       
             The Class ID of the control is SAP.DataProvider.1.                                       
         System response                                                                               
    The transaction is terminated.                                                           
         Procedure                                                                               
    Contact the person responsible for the SAP System.                                       
        Message classe...... "DC"                                                                     
        Number.............. 007                                                                      
        Variable 1.......... "SAP.DataProvider.1"                                                     
        Variable 2.......... " "                                                                      
        Variable 3.......... " "                                                                      
        Variable 4.......... " "                                                                      
        Variable 3.......... " "                                                                      
        Variable 4.......... " "                                                                      
    How to correct the error                                                                               
    Probably the only way to eliminate the error is to correct the program.                                                                               
    You may able to find an interim solution to the problem                                       
        in the SAP note system. If you have access to the note system yourself,                       
        use the following search criteria:                                                                               
    "MESSAGE_TYPE_X" C                                                                               
    "SAPLCNTL" or "LCNTLF01"                                                                      
        "CHECK_OO"                                                                               
    If you cannot solve the problem yourself and you wish to send                                 
        an error message to SAP, include the following documents:                                                                               
    1. A printout of the problem description (short dump)                                         
           To obtain this, select in the current display "System->List->                              
           Save->Local File (unconverted)".                                                                               
    2. A suitable printout of the system log                                                      
           To obtain this, call the system log through transaction SM21.                              
           Limit the time interval to 10 minutes before and 5 minutes                                 
           after the short dump. In the display, then select the function                             
           "System->List->Save->Local File (unconverted)".                                                                               
    3. If the programs are your own programs or modified SAP programs,                            
           supply the source code.                                                                    
           To do this, select the Editor function "Further Utilities->                                
           Upload/Download->Download".                                                                               
    4. Details regarding the conditions under which the error occurred                            
           or which actions and input led to the error.                                               
    System environment                                                                               
    SAP Release.............. "640"                                                                               
    Application server....... "gl3ap4"                                                            
        Network address.......... "194.69.46.206"                                                     
        Operating system......... "AIX"                                                               
        Release.................. "5.3"                                                               
        Hardware type............ "00C2809E4C00"                                                      
        Character length......... 16 Bits                                                             
        Pointer length........... 64 Bits                                                             
        Work process number...... 8                                                                   
        Short dump setting....... "full"                                                                               
    Database server.......... "glince215"                                                         
        Database type............ "ORACLE"                                                            
        Database name............ "GL3"                                                               
        Database owner........... "SAPSR3"                                                                               
    Character set............ "C"                                                                               
    SAP kernel............... "640"                                                               
        Created on............... "Feb 18 2008 23:36:16"                                              
        Created in............... "AIX 1 5 00538A4A4C00"                                              
        Database version......... "OCI_920 "                                                                               
    Patch level.............. "221"                                                               
        Patch text............... " "                                                                               
    Supported environment....                                                                     
        Database................. "ORACLE 9.2.0.*.*, ORACLE 10.1.0.*.*, ORACLE                        
         10.2.0.*.*"                                                                               
    SAP database version..... "640"                                                               
        Operating system......... "AIX 1 5, AIX 2 5, AIX 3 5, AIX 1 6"                                                                               
    Memory usage.............                                                                     
        Roll..................... 16192                                                               
        EM....................... 16759424                                                            
        Heap..................... 0                                                                   
        Page..................... 139264                                                              
        MM Used.................. 4672968                                                             
        MM Free.................. 3703952                                                             
        SAP Release.............. "640"                                                                               
    User and Transaction                                                                               
    Client.............. 001                                                                      
        User................ "PB754"                                                                  
        Language key........ "D"                                                                      
        Transaction......... "ZVLA "                                                                  
        Program............. "SAPLCNTL"                                                               
        Screen.............. "ZTCOCKPT 2000"                                                          
        Screen line......... 4                                                                        
    Information on where terminated                                                                   
        The termination occurred in the ABAP program "SAPLCNTL" in "CHECK_OO".                        
        The main program was "ZTCOCKPT ".                                                                               
    The termination occurred in line 178 of the source code of the (Include)                      
         program "LCNTLF01"                                                                               
    of the source code of program "LCNTLF01" (when calling the editor 1780).                      
    Source Code Extract                                                                               
    Line  SourceCde                                                                               
    148 *---------------------------------------------------------------------*                     
      149 *       FORM %_CONTROL_DISPATCH                                       *                     
      150 *---------------------------------------------------------------------*                     
      151 *                                                                               
    152 *---------------------------------------------------------------------*                     
      153 *  -->  OKCODE                                                        *                     
      154 *---------------------------------------------------------------------*                     
      155 FORM %_CONTROL_DISPATCH.                                                                    
      156 * CALL FUNCTION 'CONTROL_DISPATCH'                                                          
      157 *      EXPORTING                                                                               
    158 *           FCODE        = SY-UCOMM                                                         
      159 *      EXCEPTIONS                                                                           
      160 *           CB_NOT_FOUND = 1                                                                
      161 *           OTHERS       = 2.                                                               
      162 ENDFORM.                                                                               
    163                                                                               
    164 FORM REGISTERGLOBALOCXEVENT                                                                 
      165 USING SHELLID TYPE I EVENT TYPE I.                                                          
      166     CALL METHOD OF CL_GUI_OBJECT=>H_GUI 'RegisterGlobalOCXevent'                            
      167       NO FLUSH                                                                               
    168       EXPORTING #1 = SHELLID                                                                
      169                 #2 = EVENT.                                                                 
      170 ENDFORM.                                                                               
    171                                                                               
    172 form check_OO using p_handle type cntl_handle.                                              
      173 *  check sy-uname = 'KSCHMIDT'.                                                             
      174   call method cl_gui_cfw=>get_subscriber_by_id                                              
      175        exporting shellid = p_handle-shellid                                                 
      176        exceptions others = 1.                                                               
      177   if sy-subrc = 0.                                                                          
    >>>>>     message X007 with p_handle-clsid.                                                       
      179   endif.                                                                               
    180                                                                               
    181 endform.                                                                               
    182                                                                               
    183 form check_oo_2 using p_shellid type i.                                                     
      184   data l_handle type cntl_handle.                                                           
      185 *  check sy-uname = 'KSCHMIDT'.                                                             
      186   call method cl_gui_cfw=>get_subscriber_by_id                                              
      187        exporting shellid = p_shellid                                                        
      188        exceptions others = 1.                                                               
      189   if sy-subrc = 0.                                                                          
      190     call function 'CNTH_HANDLE_BY_SHELLID'                                                  
      191          exporting shellid = p_shellid                                                      
      192          importing h_control = l_handle                                                     
      193          exceptions others = 1.                                                             
      194     message X007 with l_handle-clsid.                                                       
      195   endif.                                                                               
    196 endform.                                                                               
    Contents of system fields                                                                         
    Name     Val.                                                                               
    SY-SUBRC 0                                                                               
    SY-INDEX 0                                                                               
    SY-TABIX 12                                                                               
    SY-DBCNT 1                                                                               
    SY-FDPOS 1                                                                               
    SY-LSIND 0                                                                               
    SY-PAGNO 0                                                                               
    SY-LINNO 1                                                                               
    SY-COLNO 1                                                                               
    SY-PFKEY STAT2000                                                                               
    SY-UCOMM NSEL                                                                               
    SY-TITLE ZTCOCKPT Cockpit: Transporte Aufträge Lieferungen                                        
    SY-MSGTY X                                                                               
    SY-MSGID DC                                                                               
    SY-MSGNO 007                                                                               
    SY-MSGV1 SAP.DataProvider.1                                                                       
    SY-MSGV2                                                                               
    SY-MSGV3                                                                               
    SY-MSGV4                                                                               
    Active Calls/Events                                                                               
    No.   Ty.          Program                             Include                             Line   
          Name                                                                               
    11 FORM         SAPLCNTL                            LCNTLF01                              178  
          CHECK_OO                                                                               
    10 FUNCTION     SAPLCNTL                            LCNTLU13                               16  
          CONTROL_DESTROY                                                                               
    9 FUNCTION     SAPLCNDP                            LCNDPU07                               22  
          DP_DESTROY                                                                               
    8 FUNCTION     SAPLCNDP                            LCNDPU10                              103  
          DP_CONTROL_ASSIGN_TABLE                                                                     
        7 METHOD       CL_GUI_ALV_GRID_BASE==========CP    CL_GUI_ALV_GRID_BASE==========CM01U    37  
          CL_GUI_ALV_GRID_BASE=>SET_TOOLBAR_BUTTONS                                                   
        6 METHOD       CL_GUI_ALV_GRID===============CP    CL_GUI_ALV_GRID===============CM01M    52  
          CL_GUI_ALV_GRID=>SET_TOOLBAR                                                                
        5 METHOD       CL_GUI_ALV_GRID===============CP    CL_GUI_ALV_GRID===============CM01P   432  
          CL_GUI_ALV_GRID=>SOFT_REFRESH_TABLE_DISPLAY                                                 
        4 METHOD       CL_GUI_ALV_GRID===============CP    CL_GUI_ALV_GRID===============CM00T   116  
          CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY                                                      
        3 MODULE (PBO) ZTCOCKPT                            ZTCOCKPT                              652  
          PBO_ALV_2000                                                                               
    2 FORM         ZTCOCKPT                            ZTCOCKPT                              167  
          ALVAUSGABE                                                                               
    1 EVENT        ZTCOCKPT                            ZTCOCKPT_INC                          213  
          START-OF-SELECTION                                                                          
    Chosen variables                                                                               
    Name                                                                               
    Val.                                                                               
    No.      11 Ty.          FORM                                                                     
    Name  CHECK_OO                                                                               
    SY-REPID                                                                               
    SAPLCNTL                                                                               
    0000000000000000000000000000000000000000                                                      
        0000000000000000000000000000000000000000                                                      
        5454445422222222222222222222222222222222                                                      
        310C3E4C00000000000000000000000000000000                                                      
    %_VIASELSCR                                                                               
    0                                                                               
    4                                                                               
    P_HANDLE-SHELLID                                                                               
    128                                                                               
    0008                                                                               
    0000                                                                               
    BS_CENTER                                                                               
    768                                                                               
    0000                                                                               
    0030                                                                               
    %_DUMMY$$                                                                               
    0000                                                                               
    0000                                                                               
    2222                                                                               
    0000                                                                               
    FONT_ITALIC                                                                               
    1                                                                               
    0000                                                                               
    0001                                                                               
    SY-SUBRC                                                                               
    0                                                                               
    0000                                                                               
    0000                                                                               
    SY-XFORM                                                                               
    XAB_READ                                                                               
    000000000000000000000000000000                                                                
        000000000000000000000000000000                                                                
        544554442222222222222222222222                                                                
        812F25140000000000000000000000                                                                
    SY-MSGID                                                                               
    DC                                                                               
    00000000000000000000                                                                               
    00000000000000000000                                                                               
    44222222222222222222                                                                               
    43000000000000000000                                                                          
    SS_SIMPLE                                                                               
    11                                                                               
    0000                                                                               
    000B                                                                               
    SS_BLACKRECT                                                                               
    4                                                                               
    0000                                                                               
    0004                                                                               
    SPACE                                                                               
    0                                                                               
    0                                                                               
    2                                                                               
    0                                                                               
    SY-MSGNO                                                                               
    007                                                                               
    000                                                                               
    000                                                                               
    333                                                                               
    007                                                                               
    SY-MSGV1                                                                               
    SAP.DataProvider.1                                                                               
    00000000000000000000000000000000000000000000000000                                            
        00000000000000000000000000000000000000000000000000                                            
        54524676576766672322222222222222222222222222222222                                            
        310E414102F69452E100000000000000000000000000000000                                            
    P_HANDLE-CLSID                                                                               
    SAP.DataProvider.1                                                                               
    0000000000000000000000000000000000000000000000000000000000000000000000                        
        0000000000000000000000000000000000000000000000000000000000000000000000                        
        5452467657676667232222222222222222222222222222222222222222222222222222                        
        310E414102F69452E10000000000000000000000000000000000000000000000000000                        
    SY-MSGV2                                                                               
    00000000000000000000000000000000000000000000000000                                            
        00000000000000000000000000000000000000000000000000                                            
        22222222222222222222222222222222222222222222222222                                            
        00000000000000000000000000000000000000000000000000                                            
    SY-MSGV3                                                                               
    00000000000000000000000000000000000000000000000000                                            
        00000000000000000000000000000000000000000000000000                                            
        22222222222222222222222222222222222222222222222222                                            
        00000000000000000000000000000000000000000000000000                                            
    SY-MSGV4                                                                               
    00000000000000000000000000000000000000000000000000                                            
        00000000000000000000000000000000000000000000000000                                            
        22222222222222222222222222222222222222222222222222                                            
        00000000000000000000000000000000000000000000000000                                            
    No.      10 Ty.          FUNCTION                                                                 
    Name  CONTROL_DESTROY                                                                             
    NO_FLUSH                                                                               
    X                                                                               
    0                                                                               
    0                                                                               
    5                                                                               
    8                                                                               
    H_CONTROL                                                                               
    OBJHOLE2##                                   7263                                       ####  
        00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        44444443FF222222222222222222222222222222222223333222222222222222222222222222222222222222080022
        F2A8FC52FF000000000000000000000000000000000007263000000000000000000000000000000000000000000A00
    BS_DEFPUSHBUTTON                                                                               
    1                                                                               
    0000                                                                               
    0001                                                                               
    BS_LEFT                                                                               
    256                                                                               
    0000                                                                               
    0010                                                                               
    THIS_DUMMY_VALUE                                                                               
    0                                                                               
    0000                                                                               
    0000                                                                               
    BS_PUSHBUTTON                                                                               
    0                                                                               
    0000                                                                               
    0000                                                                               
    H_CONTROL-OBJ+16(4)                                                                               
    -1                                                                               
    FFFF                                                                               
    FFFF                                                                               
    SYST-REPID                                                                               
    SAPLCNTL                                                                               
    0000000000000000000000000000000000000000                                                      
        0000000000000000000000000000000000000000                                                      
        5454445422222222222222222222222222222222                                                      
        310C3E4C00000000000000000000000000000000                                                      
    H_CONTROL-HANDLE_TYPE                                                                               
    NO_OC                                                                               
    0000000000                                                                               
    0000000000                                                                               
    4454422222                                                                               
    EFFF300000                                                                               
    CNTL_TYPE_OCX                                                                               
    OCX                                                                               
    0000000000                                                                               
    0000000000                                                                               
    4452222222                                                                               
    F380000000                                                                               
    CNTL_TRUE                                                                               
    1                                                                               
    0000                                                                               
    0001                                                                               
    IS_ITSAC_767A497173BF11D28BB                                                                               
    0                                                                               
    0                                                                               
    2                                                                               
    0                                                                               
    AC_EXPORTS_4E238C5273BF11D28BB                                                                    
        Table[initial]                                                                               
    AC_EXPO_WA_4E238C5273BF11D28BB                                                                               
    000000000                                                     
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        2222222222222222222222222222222233333333322222222222222222222222222222222222222222222222222222
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    No.       9 Ty.          FUNCTION                                                                 
    Name  DP_DESTROY                                                                               
    H_DP                                                                               
    OBJHOLE2##                                   7263                                       ####  
        00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        00000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        44444443FF222222222222222222222222222222222223333222222222222222222222222222222222222222080022
        F2A8FC52FF000000000000000000000000000000000007263000000000000000000000000000000000000000000A00
    G_STRETCH_UNICODE_COLS_VALID                                                                      
        X                                                                               
    0                                                                               
    0                                                                               
    5                                                                               
    8                                                                               
    %_DUMMY$$                                                                               
    0000                                                                               
    0000                                                                               
    2222                                                                               
    0000                                                                               
    SY-SUBRC                                                                               
    0                                                                               
    0000                                                                               
    0000                                                                               
    SYST-REPID                                                                               
    SAPLCNDP                                                                               
    0000000000000000000000000000000000000000                                                      
        0000000000000000000000000000000000000000                                                      
        5454444522222222222222222222222222222222                                                      
        310C3E4000000000000000000000000000000000   

    Hi Frank,
    I doubt it is related to function 'LVC_FIELDCATALOG_MERGE' since the current SAP help documentation talks about using this function for the purpose that I'm sure you are using it.  The short dump states that the problem is caused by the use of an "old" function-module-based control framework function combined with the class-based OO CFW. 
         Diagnosis                                                                               
    You want to edit a control created with ABAP objects techniques                          
             (class-based Control Framework) using a function module (function                        
             module-based Control Framework). The system does not support this.
    If you look at the call sequence in the short dump, function module 'CONTROL_DESTROY' is being called (which then calls function 'CHECK_OO' from which the error is sent).  Function module 'CONTROL_DESTROY' is in function group CNTL which is part of the "old" function-module-based CFW. 
    Since the 'CONTROL_DESTROY' function is ultimately called as a result of your Z-program legitimately calling the standard SAP method CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY, I'd say you might want to consider opening a customer message with SAP providing as much detail and background as possible.  But before you bother to do that (or while you are waiting to hear back from SAP) you may want to double-check your Z-program to make sure you aren't calling some other function modules from function groups CNTL or CNT0 (the "old" CFW function modules).
    I've included just the call sequence from your short dump here for easier reference.  Notice the order of the calls from 1 to 11, ending with functions 'CONTROL_DESTROY' and 'CHECK_OO'.  I think 'CONTROL_DESTROY' may be causing the problem (??):
    Active Calls/Events                                                                               
    No.   Ty.          Program                             Include                             Line   
          Name                                                                               
    11 FORM         SAPLCNTL                            LCNTLF01                              178  
          CHECK_OO                                                                               
    10 FUNCTION     SAPLCNTL                            LCNTLU13                               16  
          CONTROL_DESTROY                                                                               
    9 FUNCTION     SAPLCNDP                            LCNDPU07                               22  
          DP_DESTROY                                                                               
    8 FUNCTION     SAPLCNDP                            LCNDPU10                              103  
          DP_CONTROL_ASSIGN_TABLE                                                                     
        7 METHOD       CL_GUI_ALV_GRID_BASE==========CP    CL_GUI_ALV_GRID_BASE==========CM01U    37  
          CL_GUI_ALV_GRID_BASE=>SET_TOOLBAR_BUTTONS                                                   
        6 METHOD       CL_GUI_ALV_GRID===============CP    CL_GUI_ALV_GRID===============CM01M    52  
          CL_GUI_ALV_GRID=>SET_TOOLBAR                                                                
        5 METHOD       CL_GUI_ALV_GRID===============CP    CL_GUI_ALV_GRID===============CM01P   432  
          CL_GUI_ALV_GRID=>SOFT_REFRESH_TABLE_DISPLAY                                                 
        4 METHOD       CL_GUI_ALV_GRID===============CP    CL_GUI_ALV_GRID===============CM00T   116  
          CL_GUI_ALV_GRID=>REFRESH_TABLE_DISPLAY                                                      
        3 MODULE (PBO) ZTCOCKPT                            ZTCOCKPT                              652  
          PBO_ALV_2000                                                                               
    2 FORM         ZTCOCKPT                            ZTCOCKPT                              167  
          ALVAUSGABE                                                                               
    1 EVENT        ZTCOCKPT                            ZTCOCKPT_INC                          213  
          START-OF-SELECTION
    Regards,
    Jamie
    P.S. Please report back here if you find a solution (or if SAP finds one as a result of your customer message).

  • ABAP Program in process chain

    Hi All,
    We have ABAP Porgram(PROCESS TYPE)  in our porcess chain.
    It was failed today with following message in Job log
    " Table Locked.Data currently being processed by user ALEREMOTE " .But when i check in SM12 there was no locks I found there. and i have checked in sm21 also there also i didn't find anylogs at that time and date.
    So i tried by repeating the load of "ABAP Process "  the program went successful now.
    But client is asking which PROCESS CHAIN caused locks for this program.
    Is there any way to find out any other process chain is using the same " PROCESS TYPE (ABAP Program)"  in their process chain?.
    so that i can identify that process chain and inform to the client.

    First :
    The lock need not be due to another ABAP program...
    What you are seeing here is a table lock due to a conflicting process... for instance - lets say your program is reading 0MATERIAL and updating specific values in the P Table of 0MATERIAL. At the same time - if there is a data load happening to thi table - then your program or the data load whichever runs later - will face the locking issue.
    What you need to do is :
    1. Find out which tables are being UPDATED by the ABAp program - find out when these tables are being updated by other process chains - and then change the schedule for the same.

  • Runtime Errors         ITAB_DUPLICATE_KEY ABAP Program           CL_BSP_WD_REPOSITORY==========CP

    We are doing the CRM Upgrade from EHp1 to EHp3
    after running the TC: WCF_CC as post upgrade activity
    Enhancement Set      ZXXX  and UI Component BP_ADDR  i got a short dump while trying to open the views in the component workbench as following
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_BSP_WD_REPOSITORY==========CP" had to be
         terminated because it has    come across a statement that unfortunately cannot be executed.
    Error analysis
        An attempt was made to insert an entry into table
         "\CLASS=CL_BSP_WD_REPOSITORY\METHOD=CREATE_INSTANCE_FROM_XML\DATA=LT_VIEWS".
         Updating
        unique table key "PRIMARY_KEY" resulted in a duplicate entry however. The key
         in
        question could be either the primary key or a secondary key.
        The key components of the duplicate entry have the values "{BP_A;X}" " " " "
        With primary keys, termination can occur during block insert
        operations. The can affect numerious statements, for example
        (1) MOVE
        (2) INSERT/APPEND ... LINES OF ... INTO/TO
        (3) SELECT ... INTO/APPENDING ...
        With secondary keys, termination can also occur due to a single record
        insert operation. In particular, the following modifying statements can
        cause the system to terminate due to duplicate key values as soon as
        the key is used again (delayed update):
     Please advice me how to solve it

    Hello Madhuri,
    Can you please deactivate your enhancement via setting user parameter WCF_IGNORE_ENHANCEMT =A using transaction code SU3? Then retest the issue? If it's works, then the error is happening due to your enhancement.
    If the error persist please check if note 1941320 can be applied in your system.
    thanks
    Willie

  • ABAP Program is not working when we integrate to portal

    Hi,
    We created an ABAP program and created a transaction for that program.
    we integrated that porgram into portal and we are using SAP gui for HTML for displaying that in portal.
    we have a field with f4 help on the program and when we click the f4 on that field it shows a blank screen with letter M.
    But when we change the f4 help option to structure search insearch of search term it shows f4 values and program executes fine .But client doesnot want structured search on the field
    How do we resolve this
    Thanks
    Bala Duvvuri

    You need to go back to basics and figure out why they are failing.
    The simple answer is to implement exception handling and decide whether to bail out of the program or go into some kind of loop hoping the link will fix itself or be fixed. That simple answer can cause a lot of pain and suffering.
    My preference in your situation would be to fix the underlying networking issue that causes the failures.
    One additional thought ... your code, though likely incomplete, never commits. Make sure it does and make sure it doesn't do it inside of a loop.

  • ABAP Program and Execution Caching?

    Hi All
    We have a strange problem with custom ABAP program possibily caching a SQL statement. Here is the problem:
    Transaction: ZTRANS_C1
    This transaction is about 4 years old and we have noticed a problem with a SQL statement withing the program which is causing a timeout and shorts dumps (runs for 600ms). We managed to fix the statement and change the program but it is still taking 600ms and timing out.
    So we created a new transaction ZTRANS_C2 which is an exact copy of ZTRANS_C1 and ran it. This took only 65ms.
    So is there any way in SAP or SQL where we can stop it caching the statements or is this some other problem?
    Thanks
    Phil

    Hi Arnold,
    First you need a table type with a structure like follows:
    operation
    groupid
    context
    identifier
    agency
    scheme
    (corresponding to the Interface ValueMappingReplication)
    All used data elements should have type string or charXX
    for example: operation - char10, groupid - char32, rest - char120
    Next you create a function module with attribute 'remote-enabled module'.
    The import parameter is your new table structure.
    Next you create an ABAP program. Here an example:
    report z_value_mapping .
    tables mvke.
    data:
    p_value_mapping type zvalue_mapping,
    p_value_mapping_table type zvalue_mapping_table.
    p_value_mapping-operation = 'Insert'.
    p_value_mapping-context = 'http://xi.com/Material'.
    select * from mvke where matnr between '170' and '501'.
    check not mvke-prodh is initial.
    * Create a value mapping group to join two entries.
    * use a unique 32 digit number.
    concatenate '00000000000000' mvke-prodh into p_value_mapping-groupid.
    translate p_value_mapping-groupid using ' 0'.
    * Store the mapping source as first entry to the group
    p_value_mapping-identifier = mvke-matnr.
    p_value_mapping-agency = 'SenderAgency'.
    p_value_mapping-scheme = 'MATNR'.
    append p_value_mapping to p_value_mapping_table.
    * Store the mapping target as second entry to the group
    p_value_mapping-identifier = mvke-prodh.
    p_value_mapping-agency = 'ReceiverAgency'.
    p_value_mapping-scheme = 'PRODH'.
    append p_value_mapping to p_value_mapping_table.
    endselect.
    * Push data to XI
    call function 'Z_VALUE_MAPPING' in background task
      destination 'IS_XID'
      exporting
        value_mapping       = p_value_mapping_table.
        commit work.
    Import the RFC to the Integration Builder, create a mapping between your RFC and the interface ValueMappingReplication.
    Check this Blog for additional steps:
    /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
    Choose names for context, agency and scheme which are useful your scenario.
    Regards
    Stefan

  • Termination occured in ABAP Program in  "/SAPAPO/SAPLOM_DELTA_BASIS"

    Information on where terminated                                                                   
        Termination occurred in the ABAP program "/SAPAPO/SAPLOM_DELTA_BASIS" - in                    
         "/SAPAPO/OMB_DELT_REMOVE_TRGUID".                                                            
        The main program was "/SAPAPO/ATP_DELTALIST_DISPLAY ".                                                                               
    In the source code you have the termination point in line 42                                  
        of the (Include) program "/SAPAPO/LOM_DELTA_BASISU05".                                        
        The termination is caused because exception "CX_SY_NATIVE_SQL_ERROR" occurred                 
         in                                                                               
    procedure "/SAPAPO/OMB_DELT_REMOVE_TRGUID" "(FUNCTION)", but it was neither                   
         handled locally nor declared                                                                 
        in the RAISING clause of its signature.                                                                               
    The procedure is in program "/SAPAPO/SAPLOM_DELTA_BASIS "; its source code                    
         begins in line                                                                               
    1 of the (Include program "/SAPAPO/LOM_DELTA_BASISU05 ".
    Edited by: Wilian Segatto on Jan 19, 2010 2:07 PM

    Hi,
    I think the only solution for this problem is to upgrade the LCA build to the latest version. The LC upgrade should solve the dump on the program
    "/SAPAPO/SAPLOM_DELTA_BASIS".                
    Please have a look at note 1032677 for more information about the upgrade.
    Regards,
    Tibor

  • ABAP program is terminated with error Function ROLLBACK on connection R/3

    Hi,
    We are reading a DB table A and matching with table B and placing into a internal table and further looping at the internal table.
    Table A has 3- 5 million records
    Table B has 2-4 million records
    When the program run in batch or dialog process, it stops without apparently reason, it don not trace any log in ST22 transaction. When we trace it in SM21 trace the following log:
    22:18:33 BTC  014 100                BZ  Y Unexpected return value 1 when calling up DbSlR
    22:18:33 BTC  014 100                BY  J Function ROLLBACK on connection R/3 failed
    22:18:33 BTC  014 100                R3  9 Error in DB rollback/SyFlush, return code 016384
    22:18:33 BTC  014 100                Q0  2 Stop Workproc14, PID 729286
    22:18:33 BTC  014 100                F3  T Invalid object name for TemSe object: " "
    22:18:33 BTC  014 100                EC  F Failed to create log for job BIDTPR_291659_1 22085900%_IMMEDIATE %NEWSTEP/
    22:18:33 BTC  014 100                F2  0 Calling program reports invalid handle for TemSe object (magic==X'NULL-ptr'
    22:18:33 BTC  014 100                R4  7 Delete session 001 after error 023
    The tables and ABAP program are in a BW system.
    Any idea what would be the cause. I found  a similar problem in the forum but no solution provided there..
    Regards
    Rob

    Hi Rob,
    Please check the entries in the work process trace file from this time (dev_wp14 from the work directory)
    Error in DB rollback/SyFlush, return code 016384
    usually has a preceding entry in the wp log of
    SHO: Could not allocate SHO segment of ..... bytes (rc=1)
    Usually this is a result of a SELECT statement that returns a very large result set is executed.             
    While the result set is fetched the ABAP heap is exhausted. Since no             
    more memory is available the ABAP engine abruptly cancels the execution          
    and begins error handling. The database interface rejects to execute a           
    ROLLBACK statement while the SELECT statement is still active. As the            
    rollback fails the task handler restarts the SAP work process and no             
    ABAP short dump or job log entries can be written.                                                                               
    The rejected ROLLBACK is a direct result of the lack of ABAP heap memory         
    and does not represent an error in itself.                                                                               
    The solution here is to increase the memory areas "extended memory" and          
    / or "heap". Please check/adjust your SAP memory settings!
    As mentioned, Similar issues have been resolved with the note #741864.                     
    The key is that the abap/shared_object_size_MB is too small for the          
    system and the operation performed, please increase this to 100MB to         
    start from the default of 20MB and then increase further if the dump         
    persists as more maybe needed of course. There is no problem increasing      
    this parameter since you have a 64bit system and SAP kernel.                                                                               
    Similar issues have been resolved with the note #741864 and note #986790     
    along with the increase in abap/shared_object_size_MB. These notes may       
    not be necessary just the increase but this issue frequently occurs in       
    these areas so perhaps they can help.                                        
    Hope this helps,
    Paul

  • Running abap programs using the macros

    In our DP implementation we have faced several issues in the extraction of the data from the demand planning to one of the legacy system. We have written the ABAP program and would be using the read planning book bapi. I wanted to run the ABAP program using the macro could some one please let me know what is the structure of the macro builder that is used to fire the ABAP program. this is being fired from the macros as some comparison is to be done to run the macro.

    Hi,
    Some more information on macro function
    REPORT_SUBMIT()
    REPORT_SUBMIT( 'program_name' ;  <'job_name'> ; <'job_number'>; <'newmode'>) causes the specified program to be executed. Use the optional arguments, job name and job number, if you wish the program to run in the background. If you set the argument 'newmode', the results are displayed in a new window.
    Hope this will helps you.
    Regards,
    Sunitha.

  • Is a save step neccessary in a Process Chain when loading hierarchies with an ABAP program?

    We are loading hierarchies using the ABAP routine found here in the SDN. 
    We have come accross the issue where the process chain loads successfully, but does not update the hierarchy (this problem is documented in the SDN).  It is not a consistent issue, but it causes problems when it does occur.
    OSS note 652856 points out that a SAVE HIERARCHY step is needed after the load and before the Change Attribute run.
    We have added the step to the process chain, which leads me to the question.
         In using the ABAP program to load hierarchies is the addition of the Save Hierarchy step necessary?
         Will that resolve the issue with hierarchies not updating?

    Hi Bill,
    Yes, SAVE HIERARCHY step is required when hierarchies are loaded as part of process chain. This step ensures that the hierarchy data loaded to BW has been saved. Then we have to run ACR so that these hierarchies will be activated and adjusted.
    This is the reason why even the hierarchy data loaded using infopackage needs this step. This step is not required if the Infopackage is triggered manually.
    This link will help you in better understanding
    http://help.sap.com/saphelp_nw04/helpdata/en/3d/320e3d89195c59e10000000a114084/content.htm
    Regards
    Chandu

  • Error ABAP program "SAPLKKBL"

    Hello,
    I have a report that gives me the following DUMP when I run it through a JOB, I want an expert to help me see why the error:
                                                                                    ¿Qué ha sucedido?                                                          
        Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLKKBL" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.         
    ¿Qué puede hacer?                                              
        Note down which actions and inputs caused the error.                                                                               
    To process the problem further, contact you SAP system     
        administrator.                                                                               
    Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also       
        keep them for a long time.                                 
    Anál.errores                                                     
        You attempted to access an unassigned field symbol           
        (data segment 121).                                                                               
    This error may occur if                                      
        - You address a typed field symbol before it has been set with
          ASSIGN                                                     
        - You address a field symbol that pointed to the line of an  
          internal table that was deleted                            
        - You address a field symbol that was previously reset using 
          UNASSIGN or that pointed to a local field that no          
          longer exists                                              
        - You address a global function interface, although the      
          respective function module is not active - that is, is     
          not in the list of active calls. The list of active calls  
          can be taken from this short dump.                                                                               
    Notas para corregir errores                                                                               
    If the error occures in a non-modified SAP program, you may be able to  
        find an interim solution in an SAP Note.                                
        If you have access to SAP Notes, carry out a search with the following  
        keywords:                                                                               
    "GETWA_NOT_ASSIGNED" " "                                                
        "SAPLKKBL" or "LKKBLF99"                                                
        "GEN_FIELD_OUT2"                                                                               
    If you cannot solve the problem yourself and want to send an error      
        notification to SAP, include the following information:                                                                               
    1. The description of the current problem (short dump)                                                                               
    To save the description, choose "System->List->Save->Local File      
        (Unconverted)".                                                                               
    2. Corresponding system log                                                                               
    Display the system log by calling transaction SM21.                  
           Restrict the time interval to 10 minutes before and five minutes     
        after the short dump. Then choose "System->List->Save->Local File       
        (Unconverted)".                                                                               
    3. If the problem occurs in a problem of your own or a modified SAP     
        program: The source code of the program                                 
           In the editor, choose "Utilities->More                               
        Utilities->Upload/Download->Download".                                                                               
    4. Details about the conditions under which the error occurred or which 
        actions and input led to the error.                                                                               
    The line gives me the error is:
       when 030.
          if gs_out_flags-slave ne 'X'.
            assign .
            gs_fc = gs_mfc30.
          else.
    Thank you...

    Hello,
    The program when run on line no problem, runs fine, the problem is when running in the background ...
    And if Z is a program...
    Thank

  • Downloading and Uploading ABAP programs

    I need to move a new GUI program (including all screens, include, subroutines, etc.) that was developed on our SAP 4.5 system to our new, upgraded, ECC 6.0 system.
    There is an old ABAP program that we use to use called ZSABAPUPDOWNLOAD, but it no longer seem to work between these two SAP versions.
    Because of the version differences between these tow systems, our BASIS group does not want us to use a transport to move this code.
    Other than completely recreating this program on the ECC60 system, does anyone know of a program (like the old ZSABAPUPDOWNLOAD) or utility that I could use to transfer this program to the new system?

    welcome to SDN.
    is this the program do u have.
    if not check it with this.
    REPORT ZUPDOWNPROGRAMS LINE-SIZE 132 LINE-COUNT 62 NO STANDARD PAGE HEADING.
      This program up / downloads from / to a local dataset
      all the components of an ABAP - i.e TEXTS, the entire CUA
      including statuses and menus, DYNPROS and source code.
      Program documentation and variants are not handled.
      INCLUDED programs are automatically handled both on upload
      or download. INCLUDE selection can be excluded or generic
      e.g only handle INCLUDES starting with ZIN*
      INCLUDES within INCLUDES also handled.
      The only restriction is on UPLOAD the INCLUDED programs must come
      from the same directory as the main program.
      On Download of course the ABAP must exist in the library.
         Note for LINUX and BATCH users
      This program was originally designed as a one off tool for
      getting ABAPS etc from a SAP R2 (IBM MVS mainframe system) into
      an R3 test system minimising the need for a large amount of
      mainframe sysprogs (anybody remember what they were !!) time
      and support to say nothing of access problems from TSO /JES2 /
      SAP R2. At that time network connections were patchy and the
      transport systems largely incompatable and not very reliable.
      This program was originally designed as a one off tool for
      Must run on Windows front end ---- If you are running SAP with
      LINUX on your work station you will have to change the WS_UPLOAD
      and WS_DOWNLOAD functions to reflect the Linux file system. The
      contents of the data sets themseleves do not need to be changed
      Program can easily be modified to run in batch and store
      the data on a UNIX host. Change the WS_UPLOAD and WS_DOWNLOAD
      to read from and write to UNIX data sets (OPEN FILE etc).
      You will also need to modify the parts of the program that get
      the DOS directory and display the Windows file paths.
      The actual abap data sets do not need to be changed.
    Rel 4.0   names can now be up to 40 bytes long
              Dynpros and CUA have changed from rel 3.1
              Tabstrips now loaded and unloaded in dynpros
       Please note restriction on 4.6 systems for users who
       have ABAP names which include '/'s in their names.
    Rel 4.6b, 4.6c Abap names can include the '/' in their names
    e.g /CUST1/CUST2/ORDER
    This causes problems when storing to a local file.
    a solution is to change the name to %CUST1%CUST2%ORDER i.e / will
    be changed to %. On upload the % should be changed back to /
    again.    This change still needs to be implemented.
    If you don't use the / in the abap name then this is not a problem.
    If file to be uploaded is in rel 3 format then names are only 8
    bytes long.
      program uses 3 datasets per abap
         1) abapname.eee     source, dynpr logic, texts, CUA stuff
         2) abapname.hhh     dynpr header
         3) abapname.fff     dynpro fields.
    because of varying lengths and contents 3 data sets are used. The
    complexity of combining all these to 1 data set would make the
    program far too complex.
      NOTE: This version of the program can only be used on
            release 4.0 or higher. Once an ABAP has been converted
            to rel 4.0 it cannot be converted back to rel 3.0
            on a release 3/3.1 system. Release 4 CUA tables
            are different.  Use release 3 version of this program
           for releases 3.0 and 3.1. Available on SAPFANS website.
      Note that data to be uploaded must have been previously downloaded
      by this program (any version since rel 2.0) - except for Initial
      Load -- see end of these comments.
             Dynpros and CUA statuses have changed since rel 3.1
       This program will handle rel 3.1 format on upload but will
       download in rel 4.0 format. To upload 3.1 format specify an 'X'
       in the rel3 parameter.
       If you have downloaded components in rel 4.0 format and you
       want to re-load to a 3.1 system  you will have to load
       the source via standard upload and re-create dynpros and the CUA
       manually.
       As names can now be longer than 8 characters you can only
       use this program if the SAP front end (SAPGUI) supports
       long file names (WIN 95/98 or WIN NT). Windows 3.x will not
       work as the underlying DOS system cannot handle long file names.
          UPLOAD function and DOS directory.
    When an ABAP is selected for UPLOAD then the DOS
    directory is read into a table. A file called ABAP.BAT is created,
    and down loaded to the 'C' drive and executed.
    This file executes a DOS DIR command and pipes the output
    into a dataset which is then uploaded into an internal
    table on SAP.
    Note on running DOS commands from ABAP
    The first time this procedure is executed you will see a DOS window
    which you will have to close manually. To get round this
    use windows explorer to select the file ABAP.BAT and then
    right mouse click on the file name. Select the
    properties window. From this click the CLOSE on EXIT box. This
    will then automatically close the DOS function after it has
    executed. (Windows restriction).
    The DOS function has not been tested using Windows 2000 so
    it might not work. OK on W95,W98,WME and Windows NT (No Thanks)
    If INCLUDE programs are wanted on UPLOAD only the specified
    directory is searched.
    Instead of entering path name manually you can click on
    the path parameter. Because of Windows restriction you will
    have to select ANY file in the relevant directory.
    The path will then be copied on to the selection screen.
    To do still : Merge 3 files to one and compress output to .ZIP file
                   fix 4.5 4.6 problem of abaps containing '/' in the name
                   possibility to automatically up / download referenced
                   function modules with selection criteria like INCLUDES
    To load the ist time into a system.
    Create program with ABAP editor and Upload the .EEE file.
    Delete ist line  (????SRCE) in the ABAP EDITOR --NOT THE DISK FILE
    Delete all the source from the line that starts ????TEXT (towards
    the end file) till the end so the last line in your source is ENDFORM.
    DO NOT ALTER THE DISK FILE. DO THESE CHANGES IN THE ABAP EDITOR.
    Save file and execute
    Use following parameters (Note the ist time you won't get proper
    text on the selection screen).
    Function      U
    Path          full dos path containing source e.g c:\abaps\
                   NOTE YOU MUST ENTER THE FINAL \ as above.
    REPID         the program name. e.g ZZJIMHXX
                   note that on the DISK you will see 3 files
                   ZZJIMHXX.EEE, ZZJIMHXX.FFF, ZZJIMHXX.HHH
                   just use the name before the dos qualifier - the
                   program will do the rest
    ignore other parameters
    The program will then load itself with all the texts etc.
    It should now be ready for use.
      Macros
    DEFINE DEFINE_TABLE.
      DATA: &1 LIKE &2 OCCURS &3 WITH HEADER LINE.
    END-OF-DEFINITION.
    DEFINE CLS.
      REFRESH &1.
      CLEAR &1.
    END-OF-DEFINITION.
    DEFINE INIT.
      IF &1 NE SPACE.
        SEARCH &1 FOR '. .'.
        IF SY-SUBRC = 0.
          WRITE '*' TO &1+SY-FDPOS(1).
        ENDIF.
        TRANSLATE &1 USING '*%'.
      ELSE.
        MOVE '%' TO &1.
      ENDIF.
    END-OF-DEFINITION.
    end of macros
    /     SAP standard tables                                        */
    TABLES: D020S,                         "Dynpro header
            D020T,                         "Dynpro title
            D021T,                         "Screen field keyword texts
            TRDIR,                         "Attribute table
            TADIR,                         "Dev. class etc.
            EUDB,                          "CUA data
            TSTC,                          "transaction data
            TITLE,                         "CUA titles
            RSMPTEXTS.                     "Function texts (rel 4.0)
    /     Work tables to hold ABAP source etc, and dynpro            */
    /     contents.                                                  */
    DATA: BEGIN OF H.                      "Header
            INCLUDE STRUCTURE D020S.
    DATA: END OF H.
    DATA: BEGIN OF H1 OCCURS 10,           "Header
          NAME(40)               TYPE C,                        "rel 4
          NUMBER(4)              TYPE N.
            INCLUDE STRUCTURE D020S.
    DATA: END OF H1.
    DATA: BEGIN OF H2 OCCURS 0,            "Rel 3  dynp. header
            CNAME(8)   TYPE C,
            CNUM(4)    TYPE C,
            NNAME(8)   TYPE C,
            NNUM(4)    TYPE C,
            FILL(51)   TYPE C,
            CDAT(6)    TYPE C,
            CTIM(6)    TYPE C,
          END OF H2.
    DATA: BEGIN OF F OCCURS 250.           "Dynpro Fields
            INCLUDE STRUCTURE D021S.
    DATA: END OF F.
    DATA: BEGIN OF F1 OCCURS 500,          "Dynpro Fields
          NAME(40)               TYPE C,                        "rel 4
          NUMBER(4)              TYPE N.
            INCLUDE STRUCTURE D021S.
    DATA: END OF F1.
    DATA: BEGIN OF OLD_F1 OCCURS 0,        "Dynpro Fields (rel 3)
          NAME(8)    TYPE C,
          NUMBER(4)     TYPE C.
            INCLUDE STRUCTURE D021SE_OLD.
    DATA: END OF OLD_F1.
    DATA: BEGIN OF F2 OCCURS 0,            "Dynpro Fields (rel 3)
          TFIL(284)  TYPE C,
          END OF F2.
    DATA: BEGIN OF M OCCURS 3.             "Match codes (if any)
            INCLUDE STRUCTURE D023S.
    DATA: END OF M.
    DATA: BEGIN OF E OCCURS 0.             "Dynpro Logic
            INCLUDE STRUCTURE D022S.
    DATA: END OF E.
    DATA: BEGIN OF E1 OCCURS 0,            "Dynpro Logic
          NAME(40)               TYPE C,                        "rel 4
          NUMBER(4)              TYPE N.
            INCLUDE STRUCTURE D022S.
    DATA: END OF E1.
    DATA: BEGIN OF T   OCCURS 0,           "prog name and dynpro nrs
          NAME(40)     TYPE C,                                  "rel 4
          NUMBER(4)    TYPE N,
    END OF T.
    DATA: BEGIN OF R   OCCURS 56,          "prog name and language
          NAME(40)     TYPE C,                                  "rel 4
          LANGUAGE(1)  TYPE C,
       END OF R.
    DATA: BEGIN OF S OCCURS 3000,
          TXT(180)               TYPE C,   "rel 4   was 132
          END OF S.
    DATA: BEGIN OF R1 OCCURS 50,           "for include programs
            NAME(40)             TYPE C,                        "rel 4
            INSTANCE(3)          TYPE P,
          END OF R1.
    DATA: BEGIN OF S1 OCCURS 3000,
          TXT(180)               TYPE C,   "   rel 4  was 132
          END OF S1.
    DATA: BEGIN OF U OCCURS 100,           "Text elements
          TXT(180)               TYPE C,   " rel 4   was 132
          END OF U.
    DATA: BEGIN OF DIR.                    "ABAP Attributes
            INCLUDE STRUCTURE TRDIR.
    DATA: END OF DIR.
    DATA: BEGIN OF DTXT.                   "Dynpro field keyword texts
            INCLUDE STRUCTURE D021T.
    DATA: END OF DTXT.
    /     This data contains all the components of the               */
    /     CUA such as menus, statuses, Pfkeys                        */
    /     As from rel 4.5 Tabstrips are automatically copied as well */
    /     The rel3 parameter must be set however to load the         */
    /     correct version of the CUA tables if uploading rel 3       */
    /     data to a rel 4 system.                                    */
    /     Rel 4.0B can  convert 3.1 and earlier CUA's                */
    /     This could change later however.                           */
    CUA Tables.
    Key of CUA tables in EUDB data set. Name is len 40 in rel 4.0
    DATA BEGIN OF EU_KEY.
            INCLUDE STRUCTURE RSEU1_KEY.
    DATA END OF EU_KEY.
        Status
    DATA BEGIN OF STA OCCURS 0.
            INCLUDE STRUCTURE RSMPE_STAT.                       " rel 4
    DATA END OF STA.
        Functions
    DATA BEGIN OF FUN OCCURS 0.
            INCLUDE STRUCTURE RSMPE_FUNT.                       "rel 4
    DATA END OF FUN.
        Menus
    DATA BEGIN OF MEN OCCURS 0.
            INCLUDE STRUCTURE RSMPE_MEN.   "rel 4.0
    DATA END OF MEN.
        Menus (texts)
    DATA BEGIN OF MTX OCCURS 0.
            INCLUDE STRUCTURE RSMPE_MNLT.  "rel 4.0
    DATA END OF MTX.
        Action Bar
    DATA BEGIN OF ACT OCCURS 0.
            INCLUDE STRUCTURE RSMPE_ACT.   "rel 4.0
    DATA END OF ACT.
        Push Buttons
    DATA BEGIN OF BUT OCCURS 0.
            INCLUDE STRUCTURE RSMPE_BUT.   "rel 4.0
    DATA END OF BUT.
        PF-Keys
    DATA BEGIN OF PFK OCCURS 0.
            INCLUDE STRUCTURE RSMPE_PFK.   "rel 4.0
    DATA END OF PFK.
        Function sets
    DATA BEGIN OF SET OCCURS 0.
            INCLUDE STRUCTURE RSMPE_STAF.  "rel 4.0
    DATA END OF SET.
        Documentation
    DATA BEGIN OF DOC OCCURS 0.
            INCLUDE STRUCTURE RSMPE_ATRT.  "rel 4.0
    DATA END OF DOC.
        Title codes with text
    DATA: BEGIN OF TIT OCCURS 0.
            INCLUDE STRUCTURE RSMPE_TITT.  "rel 4.0
    DATA: END OF TIT.
    DATA BEGIN OF FTX OCCURS 0.            "rel 4.0
            INCLUDE STRUCTURE RSMPTEXTS.
    DATA END OF FTX.
           rel 3.1 CUA components.
        Status
    DATA BEGIN OF OLD_STA OCCURS 0.
            INCLUDE STRUCTURE RSEU1_GEN.   " rel 3.1
    DATA END OF OLD_STA.
        Functions
    DATA BEGIN OF OLD_FUN OCCURS 0.
            INCLUDE STRUCTURE RSEU1_FUN.   "rel 3.1
    DATA END OF OLD_FUN.
        Menus
    DATA BEGIN OF OLD_MEN OCCURS 0.
            INCLUDE STRUCTURE RSEU1_MEN.   "rel 3.1
    DATA END OF OLD_MEN.
        Menus (texts)
    DATA BEGIN OF OLD_MTX OCCURS 0.
            INCLUDE STRUCTURE RSEU1_TXM.   "rel 3.1
    DATA END OF OLD_MTX.
        Action Bar
    DATA BEGIN OF OLD_ACT OCCURS 0.
            INCLUDE STRUCTURE RSEU1_ACT.   "rel 3.1
    DATA END OF OLD_ACT.
        Push Buttons
    DATA BEGIN OF OLD_BUT OCCURS 0.
            INCLUDE STRUCTURE RSEU1_BUT.   "rel 3.1
    DATA END OF OLD_BUT.
        PF-Keys
    DATA BEGIN OF OLD_PFK OCCURS 0.
            INCLUDE STRUCTURE RSEU1_PFK.   "rel 3.1
    DATA END OF OLD_PFK.
        Function sets
    DATA BEGIN OF OLD_SET OCCURS 0.
            INCLUDE STRUCTURE RSEU1_SET.   "rel 3.1
    DATA END OF OLD_SET.
        Documentation
    DATA BEGIN OF OLD_DOC OCCURS 0.
            INCLUDE STRUCTURE RSEU1_ETM.   "rel 3.1
    DATA END OF OLD_DOC.
        Title codes with text
    DATA: BEGIN OF OLD_TIT OCCURS 0.
            INCLUDE STRUCTURE TITLE.       "rel 3.1
    DATA: END OF OLD_TIT.
    dynamic function text
    DATA BEGIN OF FDN OCCURS 1.
            INCLUDE STRUCTURE RSEU1_FDYN.  "not req for rel 4.
    DATA END OF FDN.
    Icons
    DATA BEGIN OF FIN OCCURS 1.
            INCLUDE STRUCTURE RSEU1_ICON.  "not req for rel 4
    DATA END OF FIN.
    dynamic menu texts
    DATA BEGIN OF MDN OCCURS 1.
            INCLUDE STRUCTURE RSEU1_MDYN.  "not req for rel 4.
    DATA END OF MDN.
        Symbol list
    DATA BEGIN OF SYM OCCURS 0.
            INCLUDE STRUCTURE RSEU1_SYMB.
    DATA END OF SYM.
        Status Short text
    DATA BEGIN OF STX OCCURS 0.
            INCLUDE STRUCTURE RSEU1_CTX.
    DATA END OF STX.
        Attributes for function key settings (menu bars)  Rel 3.0
    DATA BEGIN OF ATT OCCURS 0.
            INCLUDE STRUCTURE RSEU1_HAT.
    DATA END OF ATT.
        Include-Menus
    DATA BEGIN OF INC OCCURS 3.
            INCLUDE STRUCTURE RSEU1_INC.
    DATA END OF INC.
    Last used numbers
    DATA BEGIN OF LAST.
            INCLUDE STRUCTURE RSEU1_LST.
    DATA END OF LAST.
      data for call transaction (SE41 to re-generate the CUA)
    DATA: BEGIN OF T_BDC_TAB OCCURS 0.
            INCLUDE STRUCTURE BDCDATA.     "BDC data
    DATA: END OF T_BDC_TAB.
    DATA: BEGIN OF T_MESSTAB OCCURS 0.
            INCLUDE STRUCTURE BDCDATA.
    DATA: END OF T_MESSTAB.
    /     Program data                                               */
    DATA: NUMBER(4)               TYPE N,
          OLDNUM(4)               TYPE N,
          FILESIZE                TYPE I,
          NR_OF_BYTES             TYPE I,
          I(3)                    TYPE P,
          IX(3)                   TYPE P,
          J(3)                    TYPE P,
          L(3)                    TYPE P,
          CUA-FLAG(1)             TYPE C,
          CUA_RETURN(10)          TYPE C,
          DYNPRO_MESSAGE(160)     TYPE C,
          DYNPRO_LINE             TYPE P,
          DYNPRO_WORD(30)         TYPE C,
          NUM(3)                  TYPE N,
          DYNNAME(44)             TYPE C,
          FN1(128)                TYPE C,
          FN2(128)                TYPE C,
          FN3(128)                TYPE C,
          W_ITERATE(1)            TYPE C,
          MAIN(1)                 TYPE C,
          FUNC(1)                 TYPE C,
          OLDNAME(40)             TYPE C,
          OLD-FUNC(8)             TYPE C,
          NEW-FUNC(8)             TYPE C,
          FOUND(1)                TYPE C,
          LANGUAGE                LIKE SY-LANGU,
          FIRST-TIME(1)           TYPE C VALUE 'Y',
          OK-CODE(5)              TYPE C,
          NAME(40)                TYPE C,                       "rel 4
          TXLINE(70)              TYPE C,
          LINE(132)               TYPE C.
    DATA:
          UL_FILE(128)          TYPE C,
          DL_FILE(128)          TYPE C,
          DOSLINE(72)           TYPE C.
    DATA: BEGIN OF DOSDIR OCCURS 0,
            TEXT(72),
          END OF DOSDIR.
    DATA: BEGIN OF I_PROG OCCURS 0,
          NAME(40),
          END OF I_PROG.
    DATA: BEGIN OF I_PROGT OCCURS 0,
          NAME(40),
          END OF I_PROGT.
    DATA: BEGIN OF I_INCLUDE OCCURS 0,
          NAME(40),
          HANDLED(1)   TYPE C,
          END OF I_INCLUDE.
    DATA: BEGIN OF I_INCL OCCURS 0,
          NAME(40),
          END OF I_INCL.
    DATA: BUFFER(1024).
    DATA: WINSYS(3).
    DATA: GLOBAL_FILEMASK_MASK(20), GLOBAL_FILEMASK_TEXT(20).
    DATA: GLOBAL_FILEMASK_ALL(80).
    DATA: T_FILENAME(128),
          TMP_FILENAME(128),
          T_MODE(1),
          FIELDLN     TYPE I.
    DEFINE_TABLE I_DYNPFIELDS DYNPREAD 0.  "dynpro fields to be updated
    DATA: I_FLDS LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE.
    FIELD-SYMBOLS: <F>.
    /     Parameters                                                 */
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS REPID FOR TRDIR-NAME OBLIGATORY .
    PARAMETERS:
          FUNCTION(1)       TYPE C OBLIGATORY,  "Function
          DSNAME(40)        TYPE C,        "Data set name
          INCLUDES(1)       TYPE C DEFAULT 'N', "Resolve Includes
          IMASK(40)         TYPE C,        "Include Mask
          CLASS             LIKE TRDIR-CLAS,
          AUTHOR            LIKE TRDIR-CNAM,          "Author
          APPL              LIKE TRDIR-APPL,
          PATH(88)          TYPE C DEFAULT 'A:\',
          REL3(1)           TYPE C.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-004.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-002.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-003.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END  OF BLOCK A1.
    /          Check users workstation is running WINDOWS,        */
    /          WINDOWS 95, or WINDOWS NT. OS/2 no good for        */
    /          this application.                                  */
    CALL FUNCTION 'WS_QUERY'
         EXPORTING
              QUERY  = 'WS'
         IMPORTING
              RETURN = WINSYS.
    IF WINSYS(2) NE 'WN'.                  "Win 3.X no good either
      WRITE: / 'Windows NT or Windows 95/98 is required'.
      EXIT.
    ENDIF.
    /          Get names of programs to be handled.               */
    /          Name can be a single value, many values or ranges  */
    /          as per standard SELECT-OPTIONS on selection screen */
    / On Download read TRDIR and store program names in a table   */
    / as per selection options.                                   */
    / On upload read the specified directory for all files of     */
    /  type .EEE from specified directory                         */
    /  compare file names with selection criteria                 */
    MOVE FUNCTION TO FUNC.
    MOVE 'Y' TO MAIN.
    CASE FUNC.
      WHEN 'U'.                            "Upload required
        PERFORM READ_DOS_DIRECTORY.
        PERFORM GET_RANGE_UL.              "Get list of progs to process
      WHEN 'D'.                            "Download required
        PERFORM GET_RANGE_DL.              "Get list of progs to process
      WHEN OTHERS.
        WRITE: / 'Function not performed due to user request'.
        EXIT.
    ENDCASE.
    SORT I_PROG.
    DELETE ADJACENT DUPLICATES FROM I_PROG.
    For download INCLUDE handling can be resolved via function
    module call.
    All Includes within Includes are also resolved by the function
    module call.
    Note that this method does not work if program itself is of type
    I (it's an include)
    In this case we can still search the source.
    IF FUNC = 'D'.
      IF INCLUDES = 'Y'.
        PERFORM GET_INCLUDES_DL.
        PERFORM PROCESS_INCLUDES_DL.
      ENDIF.
    ENDIF.
    Program list from selection criteria i.e excluding INCLUDES found
    LOOP AT I_PROG.
      MOVE I_PROG-NAME TO R1-NAME.
      APPEND R1.
      DESCRIBE TABLE R1 LINES I.
      WHILE I NE 0.
        PERFORM EXECUTE-FUNCTION.
      ENDWHILE.
      REFRESH R1.
    ENDLOOP.
    We need to check now for INCLUDES on DOWNLOAD when the INCLUDE
    program itself is of type I. In this case the function call
    will not return the INCLUDES. For example we could be
    downloading ZTESTTOP (an Include itself) which as an include
    ZTEST01.
    The process fortunately is the same as the UPLOAD function
    except of course we need to read the library instead of the
    DOS directory
    process INCLUDE modules for Upload
    On upload the procedure is more complex as Includes within
    Includes can only be resolved by scanning the code and
    searching if the program exists in the directory.
    To get all INCLUDES within INCLUDES entries in table I_INCL
    that do not exist in I_INCLUDE are copied to table I_INCLUDE
    after each entire pass of table i_INCLUDE and table is then
    re-looped through. Programs in table I_INCLUDE that have already
    been processed have a "Y" indicator set in I_INCLUDE-AVAIL.
    if  func = 'U'.
    IF INCLUDES = 'Y'.
      DESCRIBE TABLE I_INCL LINES I.
      IF I > 0.
        W_ITERATE = 'Y'.
      ELSE.
        W_ITERATE = ' '.
      ENDIF.
      WHILE W_ITERATE = 'Y'.
        PERFORM PROCESS_INCLUDES_UL.
        PERFORM LOOP_THROUGH.
        DESCRIBE TABLE I_INCL LINES I.
        IF I > 0.
          W_ITERATE = 'Y'.
        ELSE.
          W_ITERATE = ' '.
        ENDIF.
      ENDWHILE.
    endif.
    ENDIF.
    DESCRIBE TABLE I_INCLUDE LINES I.
    IF I > 0.
      SKIP 1.
      WRITE: / ' Included Programs found'.
      SKIP 1.
      LOOP AT I_INCLUDE.
        WRITE I_INCLUDE-NAME TO LINE(40).
        CONDENSE LINE.
        WRITE: / LINE(80).
      ENDLOOP.
    ENDIF.
    /       Table R contains ABAP names to up / download.            */
    /       Loop through table R and perform up / download           */
    /       for each program.                                        */
    /       Table R1 contains INCLUDE names found (if any)           */
    /       As each                                                  */
    FORM EXECUTE-FUNCTION.
      LOOP AT R1.
        MOVE-CORRESPONDING R1 TO R.
        APPEND R.
      ENDLOOP.
      REFRESH R1.
      LOOP AT R.
        REFRESH : T, E1, H1, F1, S, U.
        PERFORM PROCESS.
        MOVE 'N' TO MAIN.
      ENDLOOP.
      REFRESH R.
      DESCRIBE TABLE R1 LINES I.
    ENDFORM.
    /     Build file names for UP/DOWNLOAD                           */
    /     3 files are generated per ABAP.                            */
    /       1) ABAP    Path\PROGNAME.EEE (ABAP, Attr,Texts)          */
    /          Logic   Path\PROGNAME.EEE (Dynpro Source Logic)       */
    /          CUA     Path\PROGNAME.EEE (CUA components - keys etc) */
    /       2) Header  Path\PROGNAME.HHH (Dynpro Header)             */
    /       3) Fields  Path\PROGNAME.FFF (Dynpro Field definitions  )*/
    / ( If alternate file name specified -DSNAME- this will          */
    /   be used instead. This is only valid for the main program.    */
    /   INCLUDED programs will have file names as specified          */
    /   above).                                                      */
    /  By using this scheme it saves the user from having to         */
    /  be prompted for 3 file names.                                 */
    /  If you want multiple copies / versions on disk either         */
    /  rename the old versions or specify a different directory in   */
    /  the path parameter.                                           */
    FORM PROCESS.
      MOVE PATH TO FN1.
      CASE MAIN.
        WHEN 'Y'.
          IF DSNAME NE SPACE.
            WRITE DSNAME TO FN1+66.                             "rel 4
          ELSE.
            WRITE R-NAME TO FN1+66.                             "rel 4
          ENDIF.
        WHEN OTHERS.
          WRITE R-NAME TO FN1+66.                               "rel 4
      ENDCASE.
      MOVE FN1 TO FN2.
      MOVE FN1 TO FN3.
      WRITE '.HHH' TO FN1+124(4).                               "rel 4
      WRITE '.FFF' TO FN2+124(4).                               "rel 4
      WRITE '.EEE' TO FN3+124(4).                               "rel 4
      CONDENSE FN1 NO-GAPS.
      CONDENSE FN2 NO-GAPS.
      CONDENSE FN3 NO-GAPS.
      NAME   = R-NAME.
      CASE FUNC.
        WHEN 'D'.
          PERFORM DOWNLOAD_OBJECTS.
          CLEAR LINE.
          WRITE : 'ABAP : ' TO LINE.
          WRITE R-NAME TO LINE+8.
          WRITE 'has been unloaded' TO LINE+55.
          CONDENSE LINE.
          WRITE: / LINE.
          DESCRIBE TABLE T LINES I.
          IF I = 0.
            WRITE: / 'No Dynpros were found for unload function'.
          ELSE.
            WRITE: / 'The following Dynpros have been unloaded : '.
            PERFORM LOOP_THROUGH_T.
          ENDIF.
        WHEN 'U'.
          PERFORM UPLOAD_OBJECTS.
          DESCRIBE TABLE T LINES I.
          CASE I.
            WHEN 0.
              WRITE:  / 'No Dynpros were found for restore function'.
            WHEN OTHERS.
              WRITE: / 'The following Dynpros have been restored : '.
              PERFORM LOOP_THROUGH_T.
          ENDCASE.
          IF MAIN EQ 'Y'.
            CASE OLDNAME.
              WHEN SPACE.
                CLEAR LINE.
                WRITE : 'ABAP : ' TO LINE.
                WRITE R-NAME TO LINE+8.
                WRITE 'has been restored' TO LINE+55.
                CONDENSE LINE.
                WRITE: / LINE.
              WHEN OTHERS.
                CLEAR LINE.
                WRITE : 'ABAP : ' TO LINE.
                WRITE R-NAME TO LINE+8.
                WRITE 'has been restored - original name :'
                   TO LINE+55.
                WRITE OLDNAME TO LINE+92.
                CONDENSE LINE.
                WRITE: / LINE.
            ENDCASE.
          ELSE.
            CLEAR LINE.
            WRITE : 'ABAP : ' TO LINE.
            WRITE R-NAME TO LINE+8.
            WRITE 'has been restored' TO LINE+55.
            CONDENSE LINE.
            WRITE: / LINE.
          ENDIF.
      ENDCASE.
    ENDFORM.
    /      print progname + dynpro nrs that have been processed.     */
    FORM LOOP_THROUGH_T.
      LOOP AT T.
        CLEAR LINE.
        WRITE R-NAME TO LINE.
        WRITE T-NUMBER TO LINE+50.
        CONDENSE LINE.
        WRITE: / LINE.
      ENDLOOP.
    ENDFORM.
    /            Download Objects                                    */
    FORM DOWNLOAD_OBJECTS.
      PERFORM UNLOAD_ABAP.                 "ABAP source, texts, attr
      SELECT SINGLE * FROM TRDIR
       WHERE NAME EQ R-NAME.
      IF TRDIR-SUBC = 'I'.
        CASE INCLUDES.                     "Included file wanted
          WHEN 'Y'.
            PERFORM SCAN4-INCLUDES.
        ENDCASE.
      ENDIF.
      PERFORM UNLOAD_CUA.                  "CUA stuff
      PERFORM DOWNLOAD_DATA.               "Download EEE file to PC
      PERFORM BUILD_T.        "Build table of all dynpros in ABAP
      DESCRIBE TABLE T LINES I.
      CASE I.
        WHEN 0.            "if no dynpros exist then cannot download any
          PERFORM DOWNLOAD_DATA.           "Download EEE file to PC
        WHEN OTHERS.
          PERFORM UNLOAD_DYNPROS.          "Get Raw dynpros from SAP
          PERFORM UNLOAD_DYNPRO_COMPONENTS."Convert to table
          PERFORM DOWNLOAD_DATA.           "Download ABAP etc. to PC
          PERFORM DOWNLOAD_BIN_H1.         "Download dynpro header
          PERFORM DOWNLOAD_BIN_F1.         "Download dynpro fields
      ENDCASE.
    ENDFORM.
    /  Split ABAP up into its component parts                        */
    /                           A) Program source (72)               */
    /                           B) Texts          (132)              */
    /                           C) Attributes     (117)              */
    /                           D) CUA stuff      (Various)          */
    FORM UNLOAD_ABAP.
    /    Get ABAP language. Only required on download.               */
      SELECT SINGLE * FROM TRDIR
        WHERE NAME EQ R-NAME.
      MOVE TRDIR-RLOAD TO R-LANGUAGE.
      READ REPORT R-NAME INTO S.           "Get source into table S
      MOVE '????SRCE' TO S-TXT.
      INSERT  S INDEX 1.
    /    Text elements, Numbered texts, headings, selection texts    */
    /    Read text elements with logon language. If they don't       */
    /    exist read with the value taken from TRDIR.                 */
      READ TEXTPOOL R-NAME INTO U LANGUAGE SY-LANGU.
      IF SY-SUBRC NE 0.
        READ TEXTPOOL R-NAME INTO U LANGUAGE R-LANGUAGE.
      ENDIF.
      DESCRIBE TABLE U LINES I.
      CASE I.
        WHEN 0.
        WHEN OTHERS.
          MOVE '????TEXT' TO S-TXT.
          APPEND S.
          LOOP AT U.
            MOVE U-TXT TO S-TXT.
            APPEND S.
            DELETE U.
          ENDLOOP.
      ENDCASE.
    /    Retrieve Attributes from TRDIR and add to table S           */
    /    Change language to logged on language                       */
      MOVE '????ATTR' TO S-TXT.
      APPEND S.
      SELECT SINGLE * FROM TRDIR
             WHERE NAME EQ R-NAME.
      MOVE SY-LANGU TO TRDIR-RLOAD.
      MOVE-CORRESPONDING TRDIR TO DIR.
      MOVE DIR TO S-TXT.
      APPEND S.
    ENDFORM.
    /             retrieve CUA stuff and append to table S.          */
    FORM UNLOAD_CUA.
      MOVE R-NAME TO EU_KEY-NAME.          "Program name for CUA
      MOVE 'D' TO EU_KEY-SPRSL.            "CUA seems to want D as lang
    MOVE R-LANGUAGE TO EU_KEY-SPRSL.     "Language              "rel 2.2
    IMPORT STA FUN MEN MTX ACT BUT PFK SET LAST INC STX DOC    "rel 2.2
      IMPORT STA STX FUN MEN MTX ACT BUT PFK SET LAST INC DOC     "rel 3.0
             ATT FDN MDN SYM FIN           "rel 3.0
              FROM DATABASE EUDB(CU) ID EU_KEY.
      IF SY-SUBRC NE 0.                    "No statuses
        EXIT.
      ENDIF.
    read titles in logged on language. If not present use
    language from TRDIR.
      CASE REL3.
        WHEN SPACE.                        "(rel 4)
          SELECT * FROM RSMPTEXTS WHERE PROGNAME EQ R-NAME
                            AND SPRSL = SY-LANGU.
            MOVE-CORRESPONDING RSMPTEXTS TO FTX.
            APPEND FTX.
          ENDSELECT.
          IF SY-SUBRC NE 0.
            SELECT * FROM RSMPTEXTS WHERE PROGNAME EQ R-NAME
                              AND SPRSL = R-LANGUAGE.
              MOVE-CORRESPONDING RSMPTEXTS TO FTX.
              APPEND FTX.
            ENDSELECT.
          ENDIF.
          DESCRIBE TABLE FTX LINES I.
          IF   I > 0.
            MOVE '????FTXT' TO S-TXT.
            APPEND S.
            LOOP AT FTX.
              MOVE FTX TO S-TXT.
              APPEND S.
            ENDLOOP.
          ENDIF.
        WHEN OTHERS.
          SELECT * FROM TITLE WHERE PROGNAME   EQ R-NAME
                              AND   DDLANGUAGE EQ SY-LANGU.
            MOVE-CORRESPONDING TITLE TO TIT.
            APPEND TIT.
          ENDSELECT.
          IF SY-SUBRC NE 0.
            SELECT * FROM TITLE WHERE PROGNAME   EQ R-NAME
                                AND   DDLANGUAGE EQ R-LANGUAGE.
              MOVE-CORRESPONDING TITLE TO TIT.
              APPEND TIT.
            ENDSELECT.
          ENDIF.
      ENDCASE.
      DESCRIBE TABLE STA LINES I.
      IF   I > 0.
        MOVE '????STAT' TO S-TXT.
        APPEND S.
        LOOP AT STA.
          MOVE STA TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE FUN LINES I.
      IF   I > 0.
        MOVE '????FUNC' TO S-TXT.
        APPEND S.
        LOOP AT FUN.
          MOVE FUN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE MEN LINES I.
      IF   I > 0.
        MOVE '????MEN1' TO S-TXT.
        APPEND S.
        LOOP AT MEN.
          MOVE MEN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE MTX LINES I.
      IF   I > 0.
        MOVE '????MTX1' TO S-TXT.
        APPEND S.
        LOOP AT MTX.
          MOVE MTX TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE ACT LINES I.
      IF   I > 0.
        MOVE '????ACTN' TO S-TXT.
        APPEND S.
        LOOP AT ACT.
          MOVE ACT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE BUT LINES I.
      IF   I > 0.
        MOVE '????BUTN' TO S-TXT.
        APPEND S.
        LOOP AT BUT.
          MOVE BUT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE PFK LINES I.
      IF   I > 0.
        MOVE '????PFKY' TO S-TXT.
        APPEND S.
        LOOP AT PFK.
          MOVE PFK TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE SET LINES I.
      IF   I > 0.
        MOVE '????SETS' TO S-TXT.
        APPEND S.
        LOOP AT SET.
          MOVE SET TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      IF LAST NE SPACE.
        MOVE '????LIST' TO S-TXT.
        APPEND S.
        MOVE LAST TO S-TXT.
        APPEND S.
      ENDIF.
      DESCRIBE TABLE INC LINES I.
      IF   I > 0.
        MOVE '????INCL' TO S-TXT.
        APPEND S.
        LOOP AT INC.
          MOVE INC TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE STX LINES I.
      IF   I > 0.
        MOVE '????STXT' TO S-TXT.
        APPEND S.
        LOOP AT STX.
          MOVE STX TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE DOC LINES I.
      IF   I > 0.
        MOVE '????DOCN' TO S-TXT.
        APPEND S.
        LOOP AT DOC.
          MOVE DOC TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE TIT LINES I.
      IF   I > 0.
        MOVE '????TITL' TO S-TXT.
        APPEND S.
        LOOP AT TIT.
          MOVE TIT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
    Next 5 tables are rel 3.0 specific  (ATT, FDN, MDN, SYM, FIN)
      DESCRIBE TABLE ATT LINES I.
      IF   I > 0.
        MOVE '????VATT' TO S-TXT.
        APPEND S.
        LOOP AT ATT.
          MOVE ATT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE FDN LINES I.
      IF   I > 0.
        MOVE '????VFDN' TO S-TXT.
        APPEND S.
        LOOP AT FDN.
          MOVE FDN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE MDN LINES I.
      IF   I > 0.
        MOVE '????VMDN' TO S-TXT.
        APPEND S.
        LOOP AT MDN.
          MOVE MDN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE SYM LINES I.
      IF   I > 0.
        MOVE '????VSYM' TO S-TXT.
        APPEND S.
        LOOP AT SYM.
          MOVE SYM TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE FIN LINES I.
      IF   I > 0.
        MOVE '????VFIN' TO S-TXT.
        APPEND S.
        LOOP AT FIN.
          MOVE FIN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.

Maybe you are looking for