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

very simple question

Former Member
0 Likes
775

Hi all,

I am still learning ABAP. Here's my question:

how can I look for the equivalent of a new line like antislash-n in C language inside a string or xstring ?

Sincerely,

Olivier Matt

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
747

Hi olivier,

1. We have to use the class

CL_ABAP_CHAR_UTILITIES

attribute

NEWLINE

2. like this.

CL_ABAP_CHAR_UTILITIES=>NEWLINE

regards,

amit m.

7 REPLIES 7
Read only

Former Member
0 Likes
747

write:<b> /</b>

ex---

<b>write: /</b> w_str1,w_str2,w_str3,w_str4.

it print all the string in diffrent line.

like

w_str1

w_str2

w_str3

w_str4

Read only

Former Member
0 Likes
748

Hi olivier,

1. We have to use the class

CL_ABAP_CHAR_UTILITIES

attribute

NEWLINE

2. like this.

CL_ABAP_CHAR_UTILITIES=>NEWLINE

regards,

amit m.

Read only

0 Likes
747

THank you very much, it works fine. I also had to look for CL_ABAP_CHAR_UTILITIES=>CR_LF

Read only

Former Member
0 Likes
747

Hi,

you can use this.

SEARCH <string> FOR '\'.

regards,

Sumit.

Read only

Former Member
0 Likes
747

U can use the following satement.

<b>skip.</b>

Eg.

skip 5. (equivalent to 5 enters)

Read only

Former Member
0 Likes
747

Hi,

In WRITE statement while writeing string u can use <b>/</b>

OR U can use

<b>CL_ABAP_CHAR_UTILITIES=>NEWLINE</b>

<b>SKIP</b> is also used to skip one line.

Rgds,

Prakash

Read only

Former Member
0 Likes
747

search string for '/'.