ABAP顾问
分类:
2010-02-13 16:02:18
REPORT z_barry_spool_list .
DATA: result_tsp01 LIKE TABLE OF tsp01sys WITH HEADER LINE ,
g_rqclie LIKE rqclie_t OCCURS 0 WITH HEADER LINE ,
g_rqowne LIKE rqowne_t OCCURS 0 WITH HEADER LINE ,
g_rqcred LIKE rqcred_t OCCURS 0 WITH HEADER LINE .
g_rqclie-sign = 'I'.
g_rqclie-option = 'EQ'.
g_rqclie-low = sy-mandt.
APPEND g_rqclie.
g_rqowne-sign = 'I'.
g_rqowne-option = 'EQ'.
g_rqowne-low = sy-uname.
APPEND g_rqowne.
g_rqcred-sign = 'I'.
g_rqcred-option = 'BT'.
g_rqcred-low = sy-datum - 30 .
g_rqcred-high = sy-datum.
APPEND g_rqcred.
CALL FUNCTION 'RSPO_ISELECT_SPOOLREQS'
EXPORTING
rfcsystem = sy-sysid
TABLES
s_rqclie = g_rqclie
s_rqowne = g_rqowne
s_rqcred = g_rqcred
result_tsp01 = result_tsp01
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
EXIT.
ELSE.
LOOP AT result_tsp01.
WRITE : / result_tsp01-rqident ,
result_tsp01-rqowner ,
result_tsp01-rqcretime,
result_tsp01-rqdeltime.
ENDLOOP.
ENDIF.