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 specifying the length for data type p

Former Member
0 Likes
361

Hi guys,

i have a variable v_var with type p...

I want to have this code:

write v_var(9) to i_tab-val.

but im getting a syntax error...

wat is the possible solution in order for me to get only the fisrt nine char of v_var to move to i_tab-val?

thanks a lot!

Always,

mark

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
343

HI ,

instead declare a variable of type c for say 16 chars and assign the packed variable to it. then offset the temp char variable for 9 chars.

data: var1 type p,

temp(16) type c.

temp = var1.

temp = temp(9).

Hope this will help.

Reward Points.

Raj

HI ,

instead declare a variable of type c for say 16 chars and assign the packed variable to it. then offset the temp char variable for 9 chars.

data: var1 type p,

temp(16) type c.

temp = var1.

temp = temp(9).

Hope this will help.

Reward Points.

Raj

1 REPLY 1
Read only

Former Member
0 Likes
344

HI ,

instead declare a variable of type c for say 16 chars and assign the packed variable to it. then offset the temp char variable for 9 chars.

data: var1 type p,

temp(16) type c.

temp = var1.

temp = temp(9).

Hope this will help.

Reward Points.

Raj