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: 

Add 0 to a param.

Former Member
0 Kudos

Hi.

I need a Function Module that fill me a parameters of a Estructure will 0.

Ex:

var a. (length = 10)

a = '12345'

.

.

.

a = '0000012345'

Hope you can help me.

See you.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You Can use UNPACK Command.

or

data : p_matnr like mara-matnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = p_matnr

IMPORTING

OUTPUT = P_matnr

Thanks.

Reward If Helpful.

6 REPLIES 6

Former Member
0 Kudos

Hi,

You Can use UNPACK Command.

or

data : p_matnr like mara-matnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = p_matnr

IMPORTING

OUTPUT = P_matnr

Thanks.

Reward If Helpful.

0 Kudos

Hi.

Thanks Viji, your method is short and fine.

It work's perfectly.

hymavathi_oruganti
Active Contributor
0 Kudos

just use

CLEAR statement

Former Member
0 Kudos

Hi,

Check the below code to fill parmaeters with zeroes.

parameters name(10) type c value '123456'.

data number(10) type n.

<b>Move the parameter 'name' value to 'number'.</b>

number = name.

<b>again move the 'number' value to 'name'</b>

name = number.

now check the name value.

it will be filled zeroes.

Output of name: 0000123456

regards,

Kishore

Former Member
0 Kudos

Hi,

the best way is using this FM

<b>CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'</b>.

Thanks,

Suresh.

Former Member
0 Kudos

hi Miguel,

use type <b>N</b>

DATA: a(10) TYPE n VALUE '123'.

write a.

Regards

Allan Cristian