*&---------------------------------------------------------------------*
*& Report zzz_io_query
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zzz_io_query.
TABLES : rszrange,
rszeltxref, rszelttxt, rsrrepdir, rszselect, rszcompdir.
DATA :
BEGIN OF it_rszselect OCCURS 0,
iobjnm LIKE rszselect-iobjnm,
eltuid LIKE rszselect-eltuid,
END OF it_rszselect,
BEGIN OF it_result OCCURS 0,
iobj LIKE rszselect-iobjnm,
iobjnm LIKE rszselect-iobjnm,
infocube LIKE rszeltxref-infocube,
compid LIKE rszcompdir-compid,
txtlg LIKE rszelttxt-txtlg,
laytp LIKE rszeltxref-laytp,
END OF it_result.
DATA : iobj2 LIKE rszselect-iobjnm, l_count TYPE i.
SELECT-OPTIONS : iobj FOR rszselect-iobjnm. WRITE :/ 'Infoobject : ', iobj+3. WRITE AT /20(30) 'Name'. WRITE AT 50(15) 'Infocube'. WRITE AT 65(30) 'Query Tech Name'. WRITE AT 95(50) 'Description'.
LOOP AT iobj.
l_count = 0. CONCATENATE '%' iobj-low INTO
iobj2.
SELECT iobjnm eltuid FROM rszselect INTO TABLE it_rszselect WHERE ( iobjnm IN iobj OR iobjnm LIKE iobj2 ) AND objvers = 'A'.
LOOP AT it_rszselect.
it_result-iobj = iobj. it_result-iobjnm = it_rszselect-iobjnm.
SELECT * FROM rszeltxref WHERE
teltuid = it_rszselect-eltuid AND objvers = 'A'.
*query description
*field txtlg
SELECT * FROM rszelttxt WHERE eltuid = rszeltxref-seltuid AND objvers = 'A'.
ENDSELECT.
*query technical name
* field compid
SELECT * FROM rsrrepdir WHERE compuid =
rszeltxref-seltuid AND objvers = 'A'.
ENDSELECT.
ENDSELECT.
it_result-infocube = rszeltxref-infocube.
IF it_result-infocube = ''. it_result-infocube = rsrrepdir-infocube. ENDIF.
it_result-compid = rsrrepdir-compid. it_result-txtlg = rszelttxt-txtlg.
it_result-laytp = rszeltxref-laytp. APPEND it_result.
ENDLOOP.
SORT it_result BY infocube.
LOOP AT it_result.
l_count = l_count + 1. WRITE AT / l_count. WRITE AT 20(30) it_result-iobjnm. WRITE AT 50(15) it_result-infocube. WRITE AT 65(30)
it_result-compid.
WRITE AT 95(50) it_result-txtlg.
ENDLOOP.
ENDLOOP.