댓글 5
-
꼬맹이
2009.02.23 18:45
-
SAP폐인
2009.02.23 19:23
네.. BC업무빼고 다 합니다. 아니 간혹 BC도 하는군요... 회사는 드럽게 큰데.. 업무도 되게 많네요 ㅠ.ㅠ 으흐흐흐..
-
전컴
2009.02.23 19:29
제가 JOB로그보려고 만든 프로그램입니다. SM37에서 로그볼때 사용하는 펑션을 이용했습니다.
펑션 돌리면 로그가 나오니, 잘 파악해 보시면 될꺼 같네요~ 즐밥하세요~ ^^
참고로, JOB로그가 무한정 남아있지는 않더군요~ 몇일 지나면 없어집니다~ 시스템세팅과 관련이 있는지는 모르겠지만요~
* 참고소스
*&---------------------------------------------------------------------*
*& Report YTST34 *
*& *
*&---------------------------------------------------------------------*
*& Title: Job log overview for jbo *
*& *
*&---------------------------------------------------------------------*
REPORT YTST34.
*----------------------------------------------------------------------*
* TYPE-POOLS
*----------------------------------------------------------------------*
TYPE-POOLS: SLIS.
*----------------------------------------------------------------------*
* TABLES
*----------------------------------------------------------------------*
TABLES: TBTCO,
TBTCP.
*----------------------------------------------------------------------*
* DATA
*----------------------------------------------------------------------*
DATA: BEGIN OF GT_JOB OCCURS 0,
JOBNAME LIKE TBTCO-JOBNAME,
JOBCOUNT LIKE TBTCO-JOBCOUNT,
JOBLOG LIKE TBTCO-JOBLOG,
PROGNAME LIKE TBTCP-PROGNAME,
END OF GT_JOB.
DATA: GT_LOG LIKE TABLE OF TBTC5 WITH HEADER LINE.
DATA: GV_GRID_TITLE TYPE LVC_TITLE,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
*----------------------------------------------------------------------*
* SELECT-OPTIONS
*----------------------------------------------------------------------*
SELECT-OPTIONS: S_JOB FOR TBTCO-JOBNAME OBLIGATORY
NO INTERVALS
NO-EXTENSION,
S_SDATE FOR TBTCO-SDLSTRTDT NO-EXTENSION.
*----------------------------------------------------------------------*
* INITIALIZATION
*----------------------------------------------------------------------*
INITIALIZATION.
S_SDATE-LOW = SY-DATUM.
S_SDATE-HIGH = SY-DATUM.
APPEND S_SDATE.
*----------------------------------------------------------------------*
* START-OF-SELECTION
*----------------------------------------------------------------------*
START-OF-SELECTION.
PERFORM GET_JOBLOG.
PERFORM DISPLAY.
*&---------------------------------------------------------------------*
*& Form BP_JOBLOG_READ
*&---------------------------------------------------------------------*
FORM BP_JOBLOG_READ TABLES PT_LOG STRUCTURE GT_LOG
USING P_JOBCOUNT
P_JOBLOGID
P_JOBNAME.
CHECK P_JOBLOGID IS NOT INITIAL.
CLEAR: PT_LOG, PT_LOG[].
CALL FUNCTION 'BP_JOBLOG_READ'
EXPORTING
CLIENT = SY-MANDT
JOBCOUNT = P_JOBCOUNT
JOBLOG = P_JOBLOGID
JOBNAME = P_JOBNAME
TABLES
JOBLOGTBL = PT_LOG
EXCEPTIONS
CANT_READ_JOBLOG = 1
JOBCOUNT_MISSING = 2
JOBLOG_DOES_NOT_EXIST = 3
JOBLOG_IS_EMPTY = 4
JOBLOG_NAME_MISSING = 5
JOBNAME_MISSING = 6
JOB_DOES_NOT_EXIST = 7
OTHERS = 8.
ENDFORM. " BP_JOBLOG_READ
*&---------------------------------------------------------------------*
*& Form GET_JOBLOG
*&---------------------------------------------------------------------*
FORM GET_JOBLOG .
DATA: LT_LOG LIKE TABLE OF GT_LOG WITH HEADER LINE.
CLEAR: GT_JOB, GT_JOB[].
SELECT JOBNAME JOBCOUNT JOBLOG
FROM TBTCO
INTO TABLE GT_JOB
WHERE JOBNAME IN S_JOB
AND SDLSTRTDT IN S_SDATE.
CLEAR: GT_LOG, GT_LOG[].
LOOP AT GT_JOB.
PERFORM BP_JOBLOG_READ TABLES LT_LOG
USING GT_JOB-JOBCOUNT
GT_JOB-JOBLOG
GT_JOB-JOBNAME.
LOOP AT LT_LOG.
MOVE-CORRESPONDING LT_LOG TO GT_LOG.
APPEND GT_LOG. CLEAR GT_LOG.
ENDLOOP.
ENDLOOP.
ENDFORM. " GET_JOBLOG
*&---------------------------------------------------------------------*
*& Form DISPLAY
*&---------------------------------------------------------------------*
FORM DISPLAY .
CONCATENATE 'Job log overview for job:'
GT_JOB-JOBNAME '/' GT_JOB-JOBCOUNT
INTO GV_GRID_TITLE
SEPARATED BY SPACE.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
GS_LAYOUT-NO_HLINE = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'TBTC5'
I_GRID_TITLE = GV_GRID_TITLE
IS_LAYOUT = GS_LAYOUT
TABLES
T_OUTTAB = GT_LOG
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY
-
SAP폐인
2009.02.23 19:59
전컴님 감사합니다. TBTCO 테이블 뒤적거려보니 나오네요... ㅎ.ㅎ 테스트 debugging 돌려보니 TBTCO부터 LOCK잡고 들어가던데..
-
꼬맹이
2009.02.23 21:51
참고 PGM> RSBDCBTC - Batch 입력에 대한 유틸리티 레포트
RSBDCDRU - Batch 입력:세션 내용 인쇄
RSBDCOS0 - OS 명령어 실행( SYSLOG 및 추적파일에 로그 )
RSBDCSUB - Batch Input : Process All Sessions
RSBTCDEL - Batch 작업 삭제
T-CODE 절대 아님. ^^;
BC 에게 일전에 문의 해 본 적이 있는데요...
LOG 관리가 기가 맥히게 된다고 하더군요...
근데 , Batch Job을 ㅍㅖ인 님 께서 직접 돌리시는 건가요 ?