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: 

Reg : Leading zeros

mallikarjun_vaja
Participant
0 Kudos

hi,

In my report Iam using two parameter values .

P_BUKRS of length 4 chars and has a value of 0600

P_VBUND of length 6 chars and has a value of 470.

Now I need to interchange these values. i.e. P_BUKRS should be 0470 and P_VBUND should be 0600.

now my question is : as P_VBUND is of 6 chars in length I want the value to be 000600.

how to get this?

Regards

vaja

1 ACCEPTED SOLUTION

matt
Active Contributor
0 Kudos

FM 'CONVERSION_EXIT_ALPHA_INPUT' will put the correct number of leading zeros on for you.

i.e.

  call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
      input  = p_vbund
    importing
      output = p_vbund.

matt

4 REPLIES 4

Former Member
0 Kudos

Hi,

Use conversion routines

matt
Active Contributor
0 Kudos

FM 'CONVERSION_EXIT_ALPHA_INPUT' will put the correct number of leading zeros on for you.

i.e.

  call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
      input  = p_vbund
    importing
      output = p_vbund.

matt

0 Kudos

hi Mathew, probem is solved.

excellent answer.

rewarded points.

regards

vaja

Former Member
0 Kudos

Hi Vaja,

Goto ur field VBUND , double click on domain. u will see conversion routine alpha. double click over there. See FM for convertion

Use CONVERSION_EXIT_ALPHA_RANGE_I

u will get the leading Zer0.

If it is helpfull reward pts pls.

Regards

Srimanta