07-07-2008 11:10 AM
Hi,
I have a select query in which I am using FOR ALL ENTRIES IN itab. The internal table's field which I need to compare has type of CHAR 10 but the field in the database table has type CHAR 90. I need to make both the fields of the same type. Please advice me how can I do that.
Thanks,
Abhishek
07-07-2008 11:15 AM
Dear,
Define other Itab with same fields of the forall entries internal table except one change that is change char 10 field to char 90.
Using move u can fill the itab from previous internal table.
Regards,
07-07-2008 11:14 AM
hi....
in the internal table itself you can declare a field of 90 characters rather than uing it of 10 characters.why are you using it of 10 characters...
07-07-2008 11:14 AM
07-07-2008 11:15 AM
Dear,
Define other Itab with same fields of the forall entries internal table except one change that is change char 10 field to char 90.
Using move u can fill the itab from previous internal table.
Regards,
07-07-2008 11:16 AM
hi,
You can very easily change the size of Your internal Table field.
This will be very beneficial.
Regards
Sumit Agarwal
07-07-2008 11:16 AM
suppose itab1 is the table which has the field of type char10.
Declare another internal table itab2 which will have the field of type char90.
fill the itab1 in the normal way.
Then write
itab2 [ ] = itab1[ ].
then use itab2[] in the select query whr u r using For all entries...
Hope it helps...
Reward points if useful....
Edited by: Rudra Prasanna Mohapatra on Jul 7, 2008 12:16 PM
07-07-2008 11:16 AM
Hi,
If The Database Table is SAP Standard Table you can not change it without Access key.
To Change that you have to Go for ALTER table ,Again you have to think about the Data in that table.You May Lost Data if you Decrease teh The Field Length.
It s better To change the Internal table field Type according to the Database Table.
In this case you do not have to bother about the data in Database table.
Regards,
Sujit
07-07-2008 11:17 AM
Hi Abhishek,
Its better to change you internal table field length to 90 characters.
Hope this helps you,
Regards,
Chandra Sekhar
07-07-2008 11:18 AM
hi abhishek,
in the condition of FOR ALL ENTRIES you have to go same type. so in this case you have to change the length of the field of your internal table..
with luck,
pritam.
07-07-2008 12:39 PM
Hi,
Try the following...
DATA: Begin of ITAB...... .
FLD1 TYPE <DB Table>-<Field Name>.
(In this case the field name is the one which is of
90 characters length.
.................
.................
End of ITAB.
Hope it helps you.
Murthy.