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: 

Need Synatx for data extraction based on field

Former Member
0 Kudos
99

Hi Frnds,

I have an Issue here.there is a filed called ZZPROF_STAT which needs to be splitted into 2 fields STSMA (last 8 characters) and TXT04 (first 4 characters) and store this information into a new internal table it_stat2. Now I need to extract data from TJ02T using selection criteria as STSMA and TXT04.

The Combination of STSMA and TXT04 in select condition should be same as that before it had split.

plz help.thanks

2 REPLIES 2

former_member184119
Active Contributor
0 Kudos
66

So bad having registered in 2006 you are asking this question..............

Ok first extract the date of the field into one table............

Loop that table...

now

Using offsets you are split the data

Store in JTAb.

select * tjo2 where (Put your 2 field condition)

Sas

former_member226234
Contributor
0 Kudos
66

Hi Annapurna,

You can use offset to split the first 4 characters and the last eight characters.

TXT04 = ZZPROF_STAT+0(4). "First 4 characters

STSMA = ZZPROF_STAT+4(8). "Last 8 Characters

Honestly, i did not understand your query about using the split data into selecting data. If i understand it correctly, concatenate the two fields into a variable and use it in the select query.

I hope this helps. If you have any issues, let us know.

Cheers,

San