Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TIME CODE: VERY URGNT

Former Member
0 Likes
487

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

3 REPLIES 3
Read only

Former Member
0 Likes
464

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

Read only

0 Likes
464

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 .

Read only

0 Likes
464

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.