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: 

How to Remove first letter from the Field value

Former Member
27,568

Hallo Every one,

Could you please let me know how to split or remove the First Letter or Alphanumeric Character from the value of a filed.

For instance Let us say:

A123456,here I need to remove the A letter and want to dispaly the above mentioned with out 'A'. as 123456 alone. on the input as A123456 as some Input.

Please help me.

Regards.

1 ACCEPTED SOLUTION

Former Member
4,861

Hello,

SHIFT <variable> BY SY-FDPOS PLACES

Neeraj

9 REPLIES 9

Former Member
4,861

hi

you can do

data: var(20) type c value 'A123456'.

write: var+1.

regards

Aditya

Former Member
4,862

Hello,

SHIFT <variable> BY SY-FDPOS PLACES

Neeraj

Former Member
0 Kudos
4,861

Hi,

Take two charcater varibale like input value.By using offset move total value with out first letter.

Former Member
4,861

Try :

SHIFT text BY 1 PLACES LEFT IN CHARACTER MODE.

Here text is ur variable name.

Regards,

Joy.

Former Member
0 Kudos
4,861

Hello

data: str(20).

...

shift str left.

Former Member
0 Kudos
4,861

Hi Johny,

you can something like:

length = strlen( field ).

length = length - 1.

field = field+1(length).

With luck,

Pritam.

0 Kudos
4,861

Hi Pritam ,

The solution has solved my Issue.

Thank you very much.

But the Points That I want to reward are 10.Here the option has been disabled.

So,I regret for this.

But Thank you once again.

Regards,

Johny.

Former Member
0 Kudos
4,861

Hi,

Shifting a String by a Given Number of Positions

SHIFT <c> [BY <n> PLACES] [<mode>].

This statement shifts the field <c> by <n> positions. If you omit BY <n> PLACES, <n> is interpreted as one. If <n> is 0 or negative, <c> remains unchanged. If <n> exceeds the length of <c>, <c> is filled out with blanks. <n> can be variable.

Data:field1(7) type c value 'A123456'.

Shift field1 by 1 places left.

Mode can be left,right and circular.

Regards,

Sujit

0 Kudos
4,861

Hi Sujit,

This has solved my Issue.You have given me the full explanation.Many Thanks for that.

Thank you much.

Regards,

Johny