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

regarding padding Zeros

Former Member
0 Likes
700

data : DMBTR(12) TYPE P DECIMALS 3,

dmbtr = 300.000-

How to pad this field with zeros in front of it.

Please help me in this regard

Thanks,

Lakshmi.

6 REPLIES 6
Read only

Former Member
0 Likes
669

Use FM CONVERSION_EXIT_ALPHA_OUTPUT

Read only

0 Likes
669

Hi.

Use FM CONVERSION_EXIT_ALPHA_INPUT

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = wa_it_zsdo-bsid
 IMPORTING
   OUTPUT        = wa_it_zsdo-bsid

Edited by: tahir naqqash on Feb 3, 2009 3:01 PM

Read only

Former Member
0 Likes
669

use this

'CONVERSION_EXIT_ALPHA_INPUT

Read only

Former Member
0 Likes
669

Hi Nagalakshmi,

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = V_TMP

IMPORTING

OUTPUT = V_TMP

Hope this will help you...

Read only

faisalatsap
Active Contributor
0 Likes
669

Hi,

Test the following Code.

Data: a(8) TYPE n.

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

a = '56'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    input         = a
 IMPORTING
   OUTPUT        = a
          .
WRITE: a.

Kind Regards,

Faisal

Read only

Former Member
0 Likes
669

Hi,

Use FM:CONVERSION_EXIT_ALPHA_INPUT to Pad zeros to the number at the left.

Regards,

Rahul