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

triming values

Former Member
0 Likes
654

hi experts,

Pls help me in finding all theformatting commands in SAP.

like ltrim ,rtrim ,no zero etc.

i have an value .

0000000040000000

i need only 40000000 what shall i do?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
626

Use this Function module:

CONVERSION_EXIT_ALPHA_OUTPUT

Please mark points if the solution was useful.

Regards,

Manoj

5 REPLIES 5
Read only

Former Member
0 Likes
626

Delete <FIELD> left deleting leading '0'.

Read only

Former Member
0 Likes
627

Use this Function module:

CONVERSION_EXIT_ALPHA_OUTPUT

Please mark points if the solution was useful.

Regards,

Manoj

Read only

varma_narayana
Active Contributor
0 Likes
626

Hi...

Press F1 on the Keyword WRITE to get the all Formatting options.

Check this code for ur Req:

Data: V_NUMC(10) type N value '0000123456',

V_CHAR(10) TYPE C .

**To display the TYPE N fields without leading 0

Write:/ v_numc NO-ZERO.

V_CHAR = V_NUMC.

**To remove leading 0 from a Char variable

SHIFT V_CHAR LEFT DELETING LEADING '0'.

write:/ v_char.

**u can also try the FM CONVESION_EXIT_ALPHA_OUTPUT.

<b>Reward if Helpful.</b>

Read only

Former Member
0 Likes
626

Hi Mani

Use conversion routines for truncating zero's

conversion_exit_alpha_output.

Reward points for helpful ans's.

kiran.M

Read only

Former Member
0 Likes
626

CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a

simple integer

regards,

srinivas

<b>*reward for useful answers*</b>