Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting Strings 1

Status
Not open for further replies.

pator

MIS
Sep 28, 2004
17
IE
Using CrXi reporting off SAP.
Folks
I have this string of data which includes this ^ character , this data is in a formula called {@sv4_level_40}
(DATA SAMPLE)
^007-08_1_2008 TO test comments
at this level for testing
^009-08_1_2008Good progress
made in P4. 4 new DSLTM hope to be
commissioned. behing target.
^004-08_1_2008 004-08 Kpi test commments for
services

I also have this string field called KEY,
example is 007-08

What I'm trying to do is extract the portion of the string for each KEY.
So I should end up with

007-08 = 007-08_1_2008 TO test comments
at this level for testing

009-08= 009-08_1_2008Good progress
made in P4. 4 new DSLTM hope to be
commissioned. behing target.

004-08 = 004-08_1_2008 004-08 Kpi test commments for
services.

I tried this code but it does not give me exactly what I want.

right({@sv4_level_40},Len({@sv4_level_40})- InStr(1,{@sv4_level_40},{KEY}))

Any Help Appreciated.

Regards & TIA
PATOR
 
Try something like this:

stringvar array x := split({@sv4_level_40},"^");
numbervar i;
numbervar j := ubound(x);
stringvar display := "";

for i := 1 to j do (
if {table.key} in x then
display := x
);
display

-LB
 
Thanks lbass for your Help and Time, that worked a treat.
PATOR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top