‎2007 Oct 27 10:30 AM
HI Expert !
I m using this code .
LTIME TYPE SY-UZEIT
T1 TYPE SY-UZEIT VALUE 030000,
T2 TYPE SY-UZEIT VALUE 050000,
i dont want to include timings between 3.00 a.m and 5.00 ,
for this i have used this code but its not updating data for any employee , is this code correct or not.
OPEN DATASET PA_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF WA_SCORE-LTIME < '030000' OR WA_SCORE-LTIME > 'O50000' .
DO.
READ DATASET PA_FILE INTO REC.
CLEAR WA_PUNCHES.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
WA_SCORE-PERNR = REC+0(8) .
WA_SCORE-LDATE = REC+9(8) .
WA_SCORE-LTIME = REC+18(6) .
WA_SCORE-CANID = REC+25(8) .
WA_SCORE-TERID = REC+34(4) .
APPEND WA_SCORE TO IT_SCORE.
ELSE .
EXIT .
ENDDO.
ENDIF .
plz help me . its very imp. program .
thanks
‎2007 Oct 27 10:45 AM
hi.
IF WA_SCORE-LTIME < '030000' OR WA_SCORE-LTIME > '<b>O50000'</b> .
i think that is 050000 not o50000.
check is there any data in file or its blank
Message was edited by:
prajwal k
‎2007 Oct 27 12:16 PM
I CORRECT IT .
and use it before ,
APPEND WA_SCORE TO IT_SCORE.
but still its not working .
OPEN DATASET PA_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
READ DATASET PA_FILE INTO REC.
CLEAR WA_PUNCHES.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
WA_SCORE-PERNR = REC+0(8) .
WA_SCORE-LDATE = REC+9(8) .
WA_SCORE-LTIME = REC+18(6) .
WA_SCORE-CANID = REC+25(8) .
WA_SCORE-TERID = REC+34(4) .
IF WA_SCORE-LTIME < '030000' OR WA_SCORE-LTIME > '040000' .
APPEND WA_SCORE TO IT_SCORE.
ELSE .
EXIT .
ADD 1 TO COUNT.
ENDIF .
‎2007 Oct 27 2:17 PM
Is this correct ??
WA_SCORE-PERNR = REC+0(8) .
WA_SCORE-LDATE = REC+9(8) .
WA_SCORE-LTIME = REC+18(6) .
WA_SCORE-CANID = REC+25(8) .
WA_SCORE-TERID = REC+34(4) .
Please debug and check if the data split into different fields are ok.