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 Internal Table Assignment

Former Member
0 Likes
387

Hello all,

We are upgrading from 4.6C to 6.0.

In 4.6C version, I came across a code where two internal tables of different structures are assigned. This is obselete in 6.0

How do we fix this error?

In my senario, a variable of type TEXT1000 is assigned to an internal table. I am taking based on offset and assigning to the destination fields. But how to do that for decimal fields?

In debugging mode, I checked source and destination values.

In the source variable, in the place of numeric values, there are some special characters.

Once the assignment is done, all the fields are having their respective values.

How to do this in 6.0?

-Praveen

2 REPLIES 2
Read only

Former Member
0 Likes
315

Hi,

you must read documentation about the new functionality in ECC 6.0 but it deals with the following topic:

This is in 4.6:

data: myline type text1000.
data: begin of int_table occurs 0.
        include structure mara.
data end of int_table.
loop at int_table into myline.
endloop

and that generates an error message in 6.0, so you change the code to this:

data: int_table type table of mara with header line,
         myline type mara.

loop at int_table into myline.
endloop

Read only

0 Likes
315

Hi Jorge Alonso,

Thank you for the reply. But the problem is, suppose the destination sturcture has some numeric fields or currency fields, how do we do the assignment.?

Also I got a class CL_ABAP_CONTAINER_UTILITIES, which has two methods.

1. READ_CONTAINER_C - This converts a string to a structure.

2. FILL_CONTAINER_C - This converts a structure to a string.

When I used READ_CONTAINER_C, the source string is converted to destination structure properly except for the currency, quantity values. It gives some junk values there.

If any one have idea on how to use this class or any alternate method to solve my problem please let me know.

Thank you

Praveen Tangirala