2008 Jun 19 2:26 PM
I have data for an internal table stored in a 3000 length char field. I need to move this to an internal table that has different type of fileds like CHAR, QUAN ....
What is the best way to do this?
2008 Jun 19 2:30 PM
Try to use offset .. in moving the data
loop at itab. "field1 - 3000 length char field
itab1-field1 = itab-field1+0(10).
itab1-field2 = itab-field1+10(10).
itab1-field3 = itab-field1+20(10).
append itab1.
endloop.
I have data for an internal table stored in a 3000 length char field. I need to move this to an internal table that has different type of fileds like CHAR, QUAN ....
What is the best way to do this?
2008 Jun 19 2:30 PM
Try to use offset .. in moving the data
loop at itab. "field1 - 3000 length char field
itab1-field1 = itab-field1+0(10).
itab1-field2 = itab-field1+10(10).
itab1-field3 = itab-field1+20(10).
append itab1.
endloop.
2008 Jun 19 2:31 PM
Hi,
Use offset to move to the internal table. Becareful while moving to Amount, Quantity, Date, Time... fields.
2008 Jun 19 2:34 PM
hiii
you can do that by using OFFSET only..but while moving check for the data type in which you are trying to move then use that much OFFSET only otherwise it will give you dump.
reward if useful
thx
twinkal
2008 Jun 19 2:34 PM
Thanks for the help. I could solve it with the code below: -
class CL_ABAP_CONTAINER_UTILITIES definition load.
call method CL_ABAP_CONTAINER_UTILITIES=>READ_CONTAINER_C
exporting IM_CONTAINER = zmqsq-msgdata
importing EX_VALUE = w_znextlnxnq
exceptions ILLEGAL_PARAMETER_TYPE = 1
others = 2.
2008 Sep 09 9:19 PM
hello
I have a similar problem but this method does not work for packed decimals. the structure returns some bizzare value. Any ideas that would help?
Thanks!!
Veena
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |