‎2007 May 20 2:36 PM
HI! Friends,
I hop u guys learn CO, CN, CA, NA....... comparing statements.
If 'ABCD' CN 'ABC'.
write:/ sy-fdpos.
the condition is true and according to that sy-fdpos contains 1st char(V1) in V2. where V1=ABCD and V2=ABC.
Why the value of sy-fdpos comes to 3? Explain.
regards.
‎2007 May 20 2:42 PM
Hi,
The logical expression
<f1> CN <f2>
is true if <f1> does also contains characters other than those in <f2>. The comparison is case-sensitive. Trailing blanks are included. If the comparison is true, the system field SY-FDPOS contains the offset of the first character of <f1> that does not also occur in <f2>. If it is false, SY-FDPOS contains the length of <f1>.
Please check this link for more detail and sample codes.
http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm
Regards,
Ferry Lianto
‎2007 May 21 6:52 AM
what u mean by "SY-FDPOS contains the offset of the first character of <f1> that does not also occur in <f2>". what actually Offset means?
thanks.
‎2007 May 21 7:01 AM
HI,
If STR1 CN STR2.
write:/ sy-fdpos.
endif.
FDPOS will give the number characters(inSTR1) successfully found as a same string in ur search string(STR2).
rgds,
bharat.
‎2007 May 21 2:28 PM
HI!
I got ur point. according to u, sy-fdpos will give the number characters(inSTR1) successfully found as a same string in ur search string(STR2). But, according to the book if condition is true, sy-fdpos contains 1st char(STR1) in STR2. what that mean?