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

Reg: after space remove data(record)

Former Member
0 Likes
1,708

Hi all,

I want to fatch one text code from t053 table. I have written query like below:

select single KURZT into recone-dicscode from t053

where SPRAS = 'E' and langt = line-sgtxt.

But here problem is t053 table has langt data like this u201CSYSTEMATIC WITHDRAWALu201D and line-sgtxt data has u201CSYSTEMATIC WITHDRAWAL 1200120000u201D so my query always fail( sy-subrc = 4), so I want to take only u201CSYSTEMATIC WITHDRAWALu201D form line-sgtxt.

How I cut data after space? Can you give me some idea?

Please help me.

Thanks

JIgar

14 REPLIES 14
Read only

Former Member
0 Likes
1,659

use SPLIT

Read only

0 Likes
1,659

Hi MxG.

Thanks for reply..

can u give some more idea about spilt in this case..

Thanks

Jigar

Read only

0 Likes
1,659

press F1 on split

Read only

0 Likes
1,659

Hi MxG.

Thanks for reply.

I got it idea about split. i used also in my program, but in my case this is not working because i SGTXT so many space are coming so how i know in which part i have to split the statement.

any idea about Contains String CS ?

Thanks

Jigar

Read only

0 Likes
1,659

Where you need to split? do you know if your SGTXT will have any pattern?

Read only

0 Likes
1,659

Hi MxG.

Yes i know see like below:

1) SYSTEMATIC WITHDRAWAL

2) SYSTEMATIC WITHDRAWAL TAX

3) 111300958 /WIRE/OUT-200822400122;BNF VALIC;REF

4) 111300958 /RETURN ITEM

5) MINIMUM DISTRIBUTION

so split is not posible for me.. i think MxG i have to find the sting match for my T053-KURZT string.... i Couldnu2019t get any idea.

Thanks

Jigar

Read only

0 Likes
1,659

Hi Jigar,

According to your query "SYSTEMATIC WITHDRAWAL 1200120000"

has to be printed as SYSTEMATIC WITHDRAWAL, so code a logic such that you will always read characters ignoreing numerical s so that your issue will be resolved if numericals are present in the middle of the characters means we have to think for another logic.

If i am wrong correct me.

Cheers!!

VEnk@

Read only

0 Likes
1,659

Hi Venkat,

there is a not fix first is a characters and after numerical. anything is coming from database...

any other idea...

Thanks

Jigar

Read only

0 Likes
1,659

ok, and what will be the extra text after these Actual texts? woudl that always be numeric? or woudl that will have fixed length?

Read only

0 Likes
1,659

Hi MxG,

There is a not fix about extra space..... after Actual texts.

some time numeric also and some time char also.. there is a not fix length.....

Thanks

Jigar

Read only

0 Likes
1,659

would the last part of the string which you want to cut off atleast a single word? or can it be multiple words ?

Read only

0 Likes
1,659

it can be multiple words.......

Read only

0 Likes
1,659

how would you find even manually on what you need to pick it up from that string? just by looking and on knowledge on what is the value you need to pick?

there has to be some pattern in order for you to program this code, else you cant do that. you can search based on some fixed length ( say 20 bytes ), and then using like% in the where clause but that wouldnt work for all the cases

Read only

Former Member
0 Likes
1,659

Thanks