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

regarding JAN character fetching

Former Member
0 Likes
633

hey

I have jan code with more than 15 characters.

i want to take only 12character out of it. how to do this.

ambichan.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
608

first 12 char

12_char_jan_code = Jan_code+0(12).

last 12 char

len = strlen(Jan_code).

if len > 12.

len = len - 12.

12_char_jan_code = Jan_code+len(12).

else

12_char_jan_code = Jan_code+0(12).

endif.

regards

gv

hey

I have jan code with more than 15 characters.

i want to take only 12character out of it. how to do this.

ambichan.

3 REPLIES 3
Read only

Former Member
0 Likes
609

first 12 char

12_char_jan_code = Jan_code+0(12).

last 12 char

len = strlen(Jan_code).

if len > 12.

len = len - 12.

12_char_jan_code = Jan_code+len(12).

else

12_char_jan_code = Jan_code+0(12).

endif.

regards

gv

Read only

Former Member
0 Likes
608

hi, you can try this FM

'TEXT_SPLIT'

or some other FMs in the same function group, like 'STRING_SPLIT_AT_POSITION'.

Thanks

Read only

Former Member
0 Likes
608

What is a JAN code? Which 12 characters do you want to take, first, last etc?

Srinivas