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

offset for packing

Former Member
0 Likes
642

hi experts,

i am executing a report which was transported from 4.7 to 6.0...

i get dump when i use this code.

ASSIGN I_GLT3-HSLVT+OFFSET(8) TO <PFELD>.

HSALDO = HSALDO + <PFELD>.

field I_GLT3-HSLVT is a pack number

so its not possible to do offset operation on pack or decimal no...

  • OFFSET = OFFSET + 8.

then i replaced this code by the below code...

l_temp1 = 12837420.95-.

l_pfeld = l_temp1+OFFSET(8).

HSALDO = HSALDO + l_pfeld.

CLEAR : l_pfeld,l_temp1.

l_temp1 and l_pfeld are character string but problem is that for all values (ie 12837420.95-.) the local variable l_pfeld is zero

please help me

1 ACCEPTED SOLUTION
Read only

jyotheswar_p2
Active Participant
0 Likes
530

Hi

Move the value to string and then convert that string to the packed decimal using the FM HRCM_STRING_TO_AMOUNT_CONVERT then move the converted value to your decimal variable.

Regards

Jyo

3 REPLIES 3
Read only

Former Member
0 Likes
530

Need a bit more informatio really, was the 4.7 system unicode enabled?

Think it might be connected with that, what information is the shortdump giving you?

Thansk,

Tim

Read only

0 Likes
530

hi,

long back i got that dump, so i replaced the code with that below code... 4.7 was not unicode enabled...

Read only

jyotheswar_p2
Active Participant
0 Likes
531

Hi

Move the value to string and then convert that string to the packed decimal using the FM HRCM_STRING_TO_AMOUNT_CONVERT then move the converted value to your decimal variable.

Regards

Jyo