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

Conversion error

Former Member
0 Likes
405

Hi,

I'm working on an upgrade project and we have a conversion error in relation to a structure.

In 4.6c we have:

- A variable type c. It has several values concatenated (including a dec type). The value included in the variable is obtained from a UNIX file. Following, an example of a value:

Variable = 2000090010000600000000069999999###

Note: ### is equal to 0.20. In hexadecimal = 02C

- A structure type customer table. This customer table includes a dec field.

In 4.6c version, we can assign directly the value of the variable to the structure.

Most important, the system converts without problems the ### by 0.20 value.

In ECC 6.0 (new version) we can't make this assigment any more.Then, we use C147_CHARFIELD_TO_WORKAREA function module. However, the function can't resolve ### to 0.20 value any more.

Anyone knows the way to resolve the ### to 0.20?

Thanks in advance for your help.

Best Regards,

Leonardo

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
376

ECC 6 you need to use the class


call method cl_abap_container_utilities=>read_container_c
    exporting
      im_container           = variable  " Your character variable
    importing
      ex_value               = custom_table   "Your custom table type
    exceptions
      illegal_parameter_type = 1
      others                 = 2.

a®

Read only

Former Member
0 Likes
376

Hi,

I tried with the method cl_abap_container_utilities=>read_container_c

However, the field type DEC is equal than 0.

MANDT 310

BUKRS 0090

ZZ_RED_SOC_F 0100

VONKTO 0060000000

BISKTO 0069999999

ZZ_RED_PCOM 0.00

It should be equal than 0.20.

This is my problem. All functions/method that i have used are no able to convert ### to 0.20.

I need to find the way to make this convertion: ### to 0.20.

Thanks anyway for your answer.

Regards,

Leonardo