‎2008 Apr 10 12:39 PM
Is it possible to have a internal table with lines of different length??
My task is to append data from different internal table into a single internal table such that the length specified for smaller internal tables is maintained into the bigger internal table
‎2008 Apr 10 12:46 PM
Hi,
Define an internal table with a field having more length and populate every field value into that internal table field by specifying the length.
ex:
Types: begin of ty_data,
field(1000) type c,
end of ty_data.
Data: itab type table of ty_data,
wa type ty_data.
Suppose if you have an internal table with fields field1 field2 with values 10 and 20 respectively move 2 fields values to itab as below.
move new_itab-field1 to itab-field+0(10).
move new_itab-field2 to itab-field+11(10).
Regards,
Satish
‎2008 Apr 10 12:43 PM
Hi Sami,
It is not possible. but if your requirement is like then what you need to do is to declare the internal table with max lenth and append any data of any length.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:06 PM
‎2008 Apr 10 12:46 PM
Hi,
Define an internal table with a field having more length and populate every field value into that internal table field by specifying the length.
ex:
Types: begin of ty_data,
field(1000) type c,
end of ty_data.
Data: itab type table of ty_data,
wa type ty_data.
Suppose if you have an internal table with fields field1 field2 with values 10 and 20 respectively move 2 fields values to itab as below.
move new_itab-field1 to itab-field+0(10).
move new_itab-field2 to itab-field+11(10).
Regards,
Satish
‎2008 Apr 10 1:09 PM
Hi satish the solution you gave even not worked out.
Do you have any other solution to this problem ??
‎2008 Apr 10 1:10 PM
Hello Sami,
1.Better consider a Itab with huge string
2. Populate all of your internal tables into this table by considering the offset.So you will finally get a single table with singe field (all tables data is concatenated into a single row
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 10, 2008 6:07 PM
‎2008 Apr 10 1:27 PM
Hi Satish,
The requirement is such that the data needs to be in the given format.
The data for ITAB1,ITAB2 and ITAB5 are single lines but for ITAB3 and ITAB4 i can have n number of lines.
The data in various internal table :
ITAB1 : HABBL0903.012ABBL
ITAB2 : P31/03/2008 R0000600000000006287308.77
ITAB3 : ID1100001868 D-24 &25 Industrial Area-II Haridwar 249401 test 3924002100004964 I SAT NETWORK ENGINEERS PVT LTD 31/03/200831/03/2008180 00000000000006838.26 INR 8460006276
ITAB4 :A8460006276 31/03/2008D00001----
ITAB5 :T0000600000000006287308.77
The format in which it should come :
ITAB1( when arrow key is used to navigate through this line the line should stop at 33 and if moved further then it should go to next line).
ITAB2( when arrow key is used to navigate through this line the line should stop at 77 and if moved further then it should go to next line).
ITAB3( when arrow key is used to navigate through this line the line should stop at 822 and if moved further then it should go to next line).
ITAB4( when arrow key is used to navigate through this line the line should stop at 217 and if moved further then it should go to next line).
ITAB5( when arrow key is used to navigate through this line the line should stop at 26 and if moved further then it should go to next line).