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: 

Displaying '001' on the selection screen using numc type

Former Member
0 Kudos

Hi All,

I'm having a report program and have a parameter on the selection screen. The parameter is of NUMC type and is having 3 characters. I want to initialize this field with the value '001'. But when the selection screen appears the displayed value is 1 and not 001. The zeroes get truncated. Is there any way by which i can use numc itself and display 001. if i use character type, i'll have to do the validation for non-numeric characters. Can someone help me out?

Thanks,

Sandeep

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sandeep,

This is not possible with numeric fields in selection screen beacuse of automatic conversions on screen output . You have to define a char field on screen, put validations for numeric in AT SELECTION-SCREEN and later pass it to a numeric field in program and use it .

Cheers

5 REPLIES 5

Former Member
0 Kudos

Hi Sandeep,

This is not possible with numeric fields in selection screen beacuse of automatic conversions on screen output . You have to define a char field on screen, put validations for numeric in AT SELECTION-SCREEN and later pass it to a numeric field in program and use it .

Cheers

0 Kudos

Thanks Sanjay. Also could you please tell me how to find out the length of a character string?

Sandeep

0 Kudos

You can use STRLEN for this.

0 Kudos

Hi,

data z type i.

z = strlen( field1 ).

Andreas

Vinod_Chandran
Active Contributor
0 Kudos

Hi Sandeep,

Even if you see only '1' in the selection screen, inside the program the value will be '001'.

Cheers

Vinod