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

Splitting a text

Former Member
0 Likes
434

Hi,

I have a text as below with '/ ' (slash) symbol between the text.

sap India ltd / erpsdsjh / sddgfdg / 543

Now, I want to get sap India ltd into one variable. ie, till the first /. I don't want the text after the first /.

There can be any number of '/ ' symbols in the text. In that I want the text before first / symbol.

How to get the text till the first /.

Can anyone help me on how to do this.

Thanks in advance.

Best regards,

Paddu.

Edited by: Paddu K on Jan 19, 2008 3:53 AM

1 ACCEPTED SOLUTION
Read only

former_member191735
Active Contributor
0 Likes
413

if string ca '/'.

use split commad to store into two variables. Make sure the two variables are string type

SPLIT dobj AT sep INTO

{ {result1 result2 ...} | {TABLE result_tab} }

[IN {BYTE|CHARACTER} MODE].

You will have the first word before '/' in first variable.

2 REPLIES 2
Read only

former_member191735
Active Contributor
0 Likes
414

if string ca '/'.

use split commad to store into two variables. Make sure the two variables are string type

SPLIT dobj AT sep INTO

{ {result1 result2 ...} | {TABLE result_tab} }

[IN {BYTE|CHARACTER} MODE].

You will have the first word before '/' in first variable.

Read only

Former Member
0 Likes
413

Use the SPLIT statement and split the string at '/' into two variables. Discard the second variable and use the first variable.