‎2008 Nov 25 8:14 AM
hi friends
i need the syntax help for the below sentence
F = (10 - (round(10 - j) - j)^2)
this is giving error in editor
pls help to resolve this
thanks in advance
with regards
s.janagar
‎2008 Nov 25 8:22 AM
‎2008 Nov 25 8:17 AM
What is the syntax error. Please provide more details of your code as well.
regards,
Advait
‎2008 Nov 25 8:20 AM
""Local Interface:
*" IMPORTING
*" REFERENCE(UID) TYPE OIJNOMI-ZZSCHEDID
*" REFERENCE(TIMESTAMP) TYPE CHAR14
*" EXPORTING
*" REFERENCE(TOKEN) TYPE CHAR25
*"----
*timestamp (YYYYMMDDhhmmss)
DATA: zyear TYPE i,
zmon TYPE i,
zdat TYPE i,
zhrs TYPE i,
zmin TYPE i,
zsec TYPE i,
zfrm TYPE i,
zuid TYPE i,
a TYPE i,
b TYPE i,
c TYPE i,
d TYPE i,
e TYPE i,
f TYPE i,
g TYPE i,
h TYPE i,
i TYPE i,
j TYPE i,
k TYPE i,
w_data TYPE i.
splitting up the timestamp to date,month,hrs,minutes etc.,
zuid = uid.
zyear = timestamp+0(4).
zmon = timestamp+4(2).
zdat = timestamp+6(2).
zhrs = timestamp+8(2).
zmin = timestamp+10(2).
zsec = timestamp+12(2).
a = zhrs + 1.
b = zuid - zdat + zhrs.
c = zyear - zhrs.
d = zmin + zuid .
e = zyear + zhrs * 13 + zuid + zdat * 23 .
f = e * zuid.
g = zuid - zdat.
h = zuid - zhrs.
i = zhrs - zdat.
j = zuid / 10.
k = 25 - zhrs.
zfrm = ABS( 15 * zuid * a + 11 * b + 19 * c + d * 3 + f + zhrs * zhrs * g * h + i * 23 * ( 10 - ( j - round( j ) * 10 ) exp 2 ) * ( k ) exp 2 ).
token = zfrm.
Edited by: janagar sundaramoorthy on Nov 25, 2008 9:20 AM
‎2008 Nov 25 8:22 AM
‎2008 Nov 25 8:27 AM
hi jayant
your answer is helpful
but
the code i have pasted above is also giving an error
Function Module ZIS_TSW_ESRV_TOKEN_TEST
The syntax for a method specification is "objref->method" or
"class=>method" . "class=>method". "class=>method". "class=>method".
can u pls help me to resolve this
‎2008 Nov 25 8:32 AM
Hello,
Try to do it this way.
zfrm = ABS ( ( 15 * zuid * a ) + ( 11 * b ) + ( 19 * c ) + ( d * 3 ) + f + ( zhrs * zhrs * g * h ) + ( ( i * 23 ) * ( 10 - ( ( j - round( j ) * 10 ) exp 2 ) * ( k ) exp 2 ) ) ).
Hope it helps. (Pardon me if I have missed some braces).
Try this code as Test Program. Also try to break the arithematic operation.
Hope it helps.
Thanks,
Jayant
‎2008 Nov 25 8:27 AM
‎2008 Nov 25 8:30 AM
Hi
What do you mean by round(j) and exp , ^? I don't think they are proper operator in ABAP.
‎2008 Nov 25 8:34 AM
hi alex yu
just put F1 help and see
these are the operators available
with regards
s.janagar
‎2008 Nov 25 8:34 AM
Hi,
Even i felt the same as alex.
Round option we will use generally while writing any thing. For example,
DATA: X TYPE P DECIMALS 2 VALUE '12493.97'.
WRITE: /X ROUND -2,
Regards,
Kusuma.
‎2008 Nov 26 9:26 AM