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

ABAP statement

Former Member
0 Likes
2,582

Hi,

Can you tell me what is the meaning of the following abap statement?

IF WA_VAR CO ' 0123456789'.

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,758

Hi Krishen,

CO means contains only.

In your case, system will check whether field WA_VAR contains value ' 0123456789' or not.

Please check this link for more information string comparison.

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm

Regards,

Ferry Lianto

8 REPLIES 8
Read only

Former Member
0 Likes
1,758

If the variable WA_VAR Contains ONLY the values of '0 thru 9', then it is true... and enter into the underlying code of the IF statement

Read only

Former Member
0 Likes
1,758

Hi Krishen,

This statement means that does this variable WA_VAR contains only '123456789'.

CO here means CONTAINS ONLY

Thanks and Regards,

Kunjal Patel

Read only

Former Member
0 Likes
1,758

In short, it is a check for numeric values.

It is checking if the field has only numeric characters.

Regards,

Ravi

Read only

Former Member
0 Likes
1,758

HI Krishen,

IF WA_VAR CO ' 0123456789'

Contains Only in this case check for numeric values in WA_VAR .. in the sense it act as similar to NUMERIC_CHECK FM Functionality ..

Regards,

Santosh

Read only

Former Member
0 Likes
1,758

it means...

if the varialbe WA_VAR <b>c</b>ontains <b>o</b>nly the characters from '0123456789'.

Thx

pavan

Read only

Former Member
0 Likes
1,759

Hi Krishen,

CO means contains only.

In your case, system will check whether field WA_VAR contains value ' 0123456789' or not.

Please check this link for more information string comparison.

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
1,758

Hi..

if wa_var CO '0123456789'.

This statement refers that if wa_var contains any of '1234567890'.

the condition will be true..

it will allow the control to execute the next corresponding statement.

else it will skip.

Hope it will helps.

Regards

Bala.