Application Development 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: 

What is the difference b/w NA and CN string functions

Former Member
0 Kudos

What is the difference between NA(Not Any) and CN(Contains Not) string functions

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

CN (Contains Not only)

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>.

NA (contains Not Any)

The logical expression

<f1> NA <f2>

is true if <f1> does not contain any character from <f2>. The comparison is case-sensitive. If the comparison is true, the system field SY-FDPOS contains the length of <f1>. If it is false, SY-FDPOS contains the offset of the first character of <f1> that occurs in <f2> .

Check this link...

http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/frameset.htm

regards,

Omkar.

2 REPLIES 2

Former Member
0 Kudos

Hi,

CN (Contains Not only)

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>.

NA (contains Not Any)

The logical expression

<f1> NA <f2>

is true if <f1> does not contain any character from <f2>. The comparison is case-sensitive. If the comparison is true, the system field SY-FDPOS contains the length of <f1>. If it is false, SY-FDPOS contains the offset of the first character of <f1> that occurs in <f2> .

Check this link...

http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/frameset.htm

regards,

Omkar.

Former Member
0 Kudos

Hi

<b>NA (contains Not Any)</b>

The logical expression

<f1> NA <f2>

is true if <f1> does not contain any character from <f2>. The comparison is case-sensitive. If the comparison is true, the system field SY-FDPOS contains the length of <f1>. If it is false, SY-FDPOS contains the offset of the first character of <f1> that occurs in <f2> .

<b>CN (Contains Not only)</b>

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>.

http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/frameset.htm

<b>Reward if usefull</b>