REPORT YSOURCEDOWN line-size 1023 message-id ytest1.
data: g_program type progname.

select-options: is_pgmnm for g_progname.
parameters: ip_dir typs string default 'C:\ABAP\'.

initialization.
  is_pgmnm-sign = 'I'.
  is_pgmnm-option = 'CP'.
  is_pgmnm-low = 'Z*'.
  append is_pgmnm.
  is_pgmnm-low = 'LZ*'. "function module
  append is_pgmnm.
  is_pgmnm-low = 'Y*'.
  append is_pgmnm.
  is_pgmnm-low = 'LY*'.
  append is_pgmnm.

start-of-selection.
  data: l_off type i,
   l_len type i,
l_dir type string,
l_ch.
l_dir = ip_dir.
condense l_dir no-gaps.
l_off = strlen( l_dir ) - 1.
l_ch - l_dir+l_off(1).
if l_ch <> '\'.
  concatenate l_dir '\' into l_dir.
endif.

data: begin of ls_reposrc,
progname type progname,
end of ls_reposrc,
lt_reposrc like table of ls_reposrc.

select progname
  into table lt_reposrc
from reposrc
where progname in is_pgmnm
and r3state = 'A'.

data: begin of ls_lines,
txt(300),
end of ls_lines,
lt_lines like table of ls_lines,
l_filenm type string.

loop at lt_reposrc into ls_reposrc.
clear lt_lines[].
read report ls_reposrc-progname into lt_lines.
concatenate l_dir ls_reposrc-progname '.abap' into l_filenm.

call function 'GUI_DOWNLOAD'
exporting
filename = l_filenm
tables
data_tab = lt_lines.
endloop.

'SW > ABAP' 카테고리의 다른 글

YFILESHARING  (0) 2024.03.27
SAP HANA Studio 설치, ADT 설치(ABAP Development tools) 설치  (0) 2023.06.23
ABAP OOP method 호출방법  (0) 2017.08.08
picture 조회 안되는 현상 조치  (0) 2017.06.05

+ Recent posts