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: 

Format Changing DB table field.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

if field = '*5255

write :/field

or

select field

where field in '*5255'

into ...

rewards points . hope it help