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

How i will get the some format for postal code?

Former Member
0 Likes
1,325

Hi,

Iam getting the postal code(PSTLZ) from Pa0006.How i will get the Format is 'X9X 9X9' (space between characters 3 & 4).sample data for postal code is J7T 3J4.

Regards,

sujan

5 REPLIES 5
Read only

GauthamV
Active Contributor
0 Likes
977

Postal code in genaral will be a six digit number.You dont have any problem

with numbers for that field.If you are giving some text along with numbers in

that field then it appears as space in between but there is no space really.

Read only

Former Member
0 Likes
977

hi,

refer this .

postal_code = 400012

then

lv_post1 = postal_code(3)

lv_post2 = postal_code+3(3)

then

concatenate lv_post1 ' ' lv_post2 to final_code.

Read only

Former Member
0 Likes
977

HI,

I hope there is space in the input of the data. since until unless if we pass the data as the space it will not form the space. Any how we can pass any type of data in that fields its not necessary to have only a 6digit of numberic value for the postal address.

regards,

naresh

Read only

Former Member
0 Likes
977

Hi sujan,

Try following.

Suppose l_pstlz is field in which you are getting ur postal code.....

concatenate l_pstlz(3) l_pstlz+3(3) into l_pstlz separated by space.

Hope it helps,

Pratik

Read only

Former Member
0 Likes
977

Thanks for reply.

regards,

Sujan