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

Problem with offset value: field type p does not permit subfield access

Former Member
0 Likes
6,800

Hi experts,

In my table am having one field ,

Filed name : planfinish

data type : dec Length : 15

data store in this field is : 12.05.2010 03:59:00 this format.

i want to remove year 2010 from this above data by using offset.

i have try with code : lv_year = lv_planfininsh+6(4). n also declare lv_year as dec 15.

still am getting error. field type p does not permit subfield access

kindly suggest on this.

thx in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,889

slope it through a char variable then you can do what you have in mind.

Offset doesnt work for number type p fields.

3 REPLIES 3
Read only

andreas_mann3
Active Contributor
0 Likes
2,889

declare help-variable as character

A.

Read only

Former Member
0 Likes
2,889

a packed decimal field (P) is a numeric field that is always 8 bytes long. The (15) is the DISPLAY or max number of digits characteristic. Like all true numeric types (not 'N'), offset is meaningless and you do NOT have format 12.05.2010 03:59:00 in a P field! You have 15 digits and a sign, and any decimal point is implied by your data declaration.

Look at keyword CONVERT if this is a timestamp field.

Read only

Former Member
0 Likes
2,890

slope it through a char variable then you can do what you have in mind.

Offset doesnt work for number type p fields.