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

Format Changing DB table field.

Former Member
0 Likes
561

Hi Every Body!

In the table the field was stored in this format '123-12-5255' , What's my requirement is If i entered last four digit it should find the remaining field .

Ex:

If i Entered : 5255

It should find and display : 123-12-5255.

Any body can me help me out. Its An Urgent.

Thank you.

4 REPLIES 4
Read only

Former Member
0 Likes
540

Hi,

You can use offset for this.

Try this piece of code

if field+7(4) = 5255.

write:/ field.

endif.

<b>Reward points if it solves ur query or come up with some more details.</b>

Thanks

Chinmay

Read only

Former Member
0 Likes
540

Hi

Try this

<b>SELECT <field> FROM <tablename> into <variable> where field+7(4) = '5255'</b>.

You can see the output in <b><variable></b>

Regards,

Amit

Read only

Former Member
0 Likes
540

Hello Markiv,

for this you have to do one thing...

after entering 5255 in that field...

at selection-screen on <Selet-option>

concatenate '*' <select-option>-low into <field1>

select single * from <tab> where <field> eq field1.

if sy-subrc = 0.

move <tab>-<field> to <select-option>.

modify <select-option>.

else.

write: ' no such value'.

endif.

Reward If Helpful.

Regards

--

Sasidhar Reddy Matli.

Message was edited by:

Sasidhar Reddy Matli

Read only

Former Member
0 Likes
540

if field = '*5255

write :/field

or

select field

where field in '*5255'

into ...

rewards points . hope it help