on 2016 Mar 10 6:45 AM
Hi BI/ABAP gurus,
I am trying to compare the fields DUE_TS.
DUE_TS consist of Timestamp of Due Date. (e.g. 20160130223025)
I then split DUE_TS timestamp into 2 parts, dates and times
My condition as below:-
If DUE_TS(dates) is Greater/Equal than system date and DUE_TS(time) is greater/equal than system time.
then show 'X'.
Else show '<blank>'.
My routine below doesn't seems to work.
Can anyone point out where the mistake might be?
DATA: date like sy-datum,
time like sy-uzeit.
date = SOURCE_FIELDS-DUEDT+0(8).
time = SOURCE_FIELDS-DUEDT+8(6).
IF date GT sy-datum or
date = sy-datum and time GT sy-uzeit.
RESULT = 'X'.
ELSE.
RESULT = ''.
ENDIF.
Many thanks.
Request clarification before answering.
try using brackets...
IF date GT sy-datum
OR ( date = sy-datum and time GT sy-uzeit ).
RESULT = 'X'.
ELSE.
RESULT = ''.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
10 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.