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

code : very urgent

Former Member
0 Likes
293

HI Expert !

I m using this code .

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.

T1 TYPE SY-UZEIT VALUE 030000,

T2 TYPE SY-UZEIT VALUE 050000,

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 ( WA_SCORE-LTIME LE T1 AND WA_SCORE-LTIME GE 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
271

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

should be changed to

if <b>NOT</b> ( WA_SCORE-LTIME <b>GE</b> T1 AND WA_SCORE-LTIME <b>LE</b> T2 )

or

if ( WA_SCORE-LTIME LE T1 <b>OR</b> WA_SCORE-LTIME GE T2 )

Message was edited by:

Srihari Hebbar

null

1 REPLY 1
Read only

Former Member
0 Likes
272

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

should be changed to

if <b>NOT</b> ( WA_SCORE-LTIME <b>GE</b> T1 AND WA_SCORE-LTIME <b>LE</b> T2 )

or

if ( WA_SCORE-LTIME LE T1 <b>OR</b> WA_SCORE-LTIME GE T2 )

Message was edited by:

Srihari Hebbar

null