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 issue- urgnt

Former Member
0 Likes
420

HI Expert !

I m using this code .

LTIME TYPE SY-UZEIT

T1 TYPE SY-UZEIT VALUE 030000,

T2 TYPE SY-UZEIT VALUE 050000,

BUT WHEN I M USING T1 AND T2 in loop ( if statement ),ITS value r

T1 = 082000.

t2 = 131100 .

if t1(6) t2(6 )

ltime (6 ).

then ok . but in this i wont be able to make comparison in if statement

how i can resolve this time issue

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.

DO.

READ DATASET PA_FILE INTO REC.

  • CLEAR WA_PUNCHES.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

  • WRITE: / REC.

if NOT ( WA_SCORE-LTIME GE T1 AND WA_SCORE-LTIME LE T2 ) .

      • AND

***( WA_SCORE-TERID NE TR3 AND

***WA_SCORE-TERID NE TR4 AND

***WA_SCORE-TERID NE TR5 AND

***WA_SCORE-TERID NE TR6 AND

***WA_SCORE-TERID NE TR7 AND

***WA_SCORE-TERID NE TR8 ) .

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 .

  • ADD 1 TO COUNT.

ENDIF .

ENDDO.

plz help me . its very imp. program .

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
388

Hi,

Pass values in quotes

T1 TYPE SY-UZEIT VALUE '030000',

T2 TYPE SY-UZEIT VALUE '050000',

Can you please check once again after making this change in debug mode, values of T1, T2 and LTIME.

ashish

HI Expert !

I m using this code .

LTIME TYPE SY-UZEIT

T1 TYPE SY-UZEIT VALUE 030000,

T2 TYPE SY-UZEIT VALUE 050000,

BUT WHEN I M USING T1 AND T2 in loop ( if statement ),ITS value r

T1 = 082000.

t2 = 131100 .

if t1(6) t2(6 )

ltime (6 ).

then ok . but in this i wont be able to make comparison in if statement

how i can resolve this time issue

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.

DO.

READ DATASET PA_FILE INTO REC.

  • CLEAR WA_PUNCHES.

IF SY-SUBRC <> 0.

EXIT.

ENDIF.

  • WRITE: / REC.

if NOT ( WA_SCORE-LTIME GE T1 AND WA_SCORE-LTIME LE T2 ) .

      • AND

***( WA_SCORE-TERID NE TR3 AND

***WA_SCORE-TERID NE TR4 AND

***WA_SCORE-TERID NE TR5 AND

***WA_SCORE-TERID NE TR6 AND

***WA_SCORE-TERID NE TR7 AND

***WA_SCORE-TERID NE TR8 ) .

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 .

  • ADD 1 TO COUNT.

ENDIF .

ENDDO.

plz help me . its very imp. program .

thanks

1 REPLY 1
Read only

Former Member
0 Likes
389

Hi,

Pass values in quotes

T1 TYPE SY-UZEIT VALUE '030000',

T2 TYPE SY-UZEIT VALUE '050000',

Can you please check once again after making this change in debug mode, values of T1, T2 and LTIME.

ashish