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: 

PAI screen input check

Former Member
0 Kudos

hi experts,

i am new to abap, i have a screen 1000. if user enter 123 as value in text field, i want to make it to consider as 00123(number length 5). can u ppl guide me how to proceed with this.

thanks in advance...

regards,

Viral

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Declare it as follows.


parameters : p_num(5) type n.

When u enter 12. it wil take it has 00012

Regards,

Mansi.

7 REPLIES 7

Former Member
0 Kudos

Hello,

Declare it as follows.


parameters : p_num(5) type n.

When u enter 12. it wil take it has 00012

Regards,

Mansi.

Former Member
0 Kudos

Hi Viral,

Take a Variable of type n, sya

Data: num(5) type n.

Move that value into num.

u will have 00123. Zeroes will precede the number..

Ram.

Former Member
0 Kudos

Hi Viral,

In the PAI of screen 1000, convert the value of field 123 as '00123'.

You can use FM CONVERSION_EXIT_ALPHA_INPUT.

For Example:

Declare the a variable F1 of length 5.

data: F1(5).

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = value of field from screen "123

  • IMPORTING

  • OUTPUT = F1.

The value of F1 would be 00123.

Thanks,

Sowmya.

Former Member
0 Kudos

Hi Viral,

In the PAI of screen 1000, convert the value of field 123 as '00123'.

You can use FM CONVERSION_EXIT_ALPHA_INPUT.

For Example:

Declare the a variable F1 of length 5.

data: F1(5).

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = value of field from screen "123

IMPORTING

OUTPUT = F1.

The value of F1 would be 00123.

Thanks,

Sowmya.

Former Member
0 Kudos

thanx experts..:)

Edited by: Viral Patel on Apr 24, 2009 12:06 PM

Former Member
0 Kudos

Hi,

Take numeric data type on that field. It will solve your problem.

Regards,

Himanshu

Former Member
0 Kudos

Hi try this

Use FM:

CONVERSION_EXIT_ALPHA_INPUT - This converts number to a string filled with zeroes

CONVERSION_EXIT_ALPHA_OUTPUT - This converts number with zeroes into an integer

or

data: t_num(10) type n.

Select-options : so_locco for t_num.

check these codes this will add zeros in the front for select options.