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: 

Regarding Deleting Leading zero from amount field

Former Member
0 Kudos
94

Hi All,

In ABAP, how to remove leading zero's from amount field which is character type defined.

Thanks & Regards

Shailesh

6 REPLIES 6

faisal_altaf2
Active Contributor
0 Kudos
59

Hi, Shailesh

The following code will Solve your problem,

But Please Search Before Posting.. Next Time.

Data: a(8) TYPE n.

a = '00000056'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    input         = a
 IMPORTING
   OUTPUT        = a
          .
WRITE: a.

Regards,

Faisal

Former Member
0 Kudos
59

Hi,

You can try,

Condense Amount Field Name.

Hope it helps you

Regrds

Mansi

Former Member
0 Kudos
59

Hi Yadav,

Search SDN there r many thread regarding your issue, refer to the thread below:

With luck,

Pritam.

Former Member
0 Kudos
59

HI Shailesh,

You can try this command

shift <field> left deleting leading '0'.

hope it will help you.

regrads,

Lokesh

Former Member
0 Kudos
59

Hi,

you can try this one.


parameters:  p_secs(10) type c default '000456.70'.

start-of-selection.
data p_s type p decimals 2.
move p_secs to p_s.

write p_s.

regards,

Leonard chomi

Former Member
0 Kudos
59

Hi

try this

data:p(5) value '00044',

v(5).

write p into v no-zero right justified.