10-01-2008 4:04 PM
Hi Guys/Dolls
We'te in the process of upgrading our system to make it uncode compliant.
On one of the programs when I run the "uccheck" program it's coming up with the following error message.
The type of the database table and work area( or internal table )
u201CWA_P0008u201D are not Unicode convertible.
The section of code its complaining about is as follows:-
* Look for indicator I when the payscale group is controlled
* from T510.
DATA: wa_P0008 type P0008.
select * from T510 into wa_P0008 where
* mandt = sy-mandt and
molga = '08' and
trfar = p0008-trfar and
trfgb = P0008-trfgb and
* trfkz = p0008-trfkz and
trfgr = p0008-trfgr and
trfst = p0008-trfst and
* lgart = p0008-lgart and
endda = p0008-endda.
if sy-subrc = 0.
* First check that it is not an AH level
if p0008-trfst <> 'AH'.
if p0008-ind01 <> 'I'.
RT_OUTTAB-zzmesstype = '5'.
RT_OUTTAB-zzmesssort = 'II'.
RT_OUTTAB-zzmessage_95 =
'MISSING INDIRECT INDICATOR'.
APPEND RT_OUTTAB.
endif.
endif.
endif.
endselect.
Can any of you guru's assist - preferably with alternative code to the above.
Many thanks in advance.
Raj
10-01-2008 4:18 PM
Select...Endselect statement is absolate in modern ABAP.
try to avoid this loop. Better you fetch the data into 1 internal table and then loop the fetched data, based on your conditions you move the data into RT_OUTTAB.
DATA: wa_P0008 type P0008,
t_P0008 type standard table of P0008.
select * from T510 into corresponding fields of table t_P0008 where
mandt = sy-mandt and
molga = '08' and
trfar = p0008-trfar and
trfgb = P0008-trfgb and
trfkz = p0008-trfkz and
trfgr = p0008-trfgr and
trfst = p0008-trfst and
lgart = p0008-lgart and
endda = p0008-endda.
10-01-2008 4:18 PM
Select...Endselect statement is absolate in modern ABAP.
try to avoid this loop. Better you fetch the data into 1 internal table and then loop the fetched data, based on your conditions you move the data into RT_OUTTAB.
DATA: wa_P0008 type P0008,
t_P0008 type standard table of P0008.
select * from T510 into corresponding fields of table t_P0008 where
mandt = sy-mandt and
molga = '08' and
trfar = p0008-trfar and
trfgb = P0008-trfgb and
trfkz = p0008-trfkz and
trfgr = p0008-trfgr and
trfst = p0008-trfst and
lgart = p0008-lgart and
endda = p0008-endda.
10-01-2008 4:22 PM
the fields in t510 must be different from fields in the workarea.
you havent pasted the code for the work area. system has no clue to pass which fields of t510, to which fields of the workarea.
anyway, 'into corresponding fields of' shud help..
10-01-2008 4:23 PM
P0008 and T510 have entirely different structures. You may be able to get away with:
select * from T510 into CORRESPONDING FIELDS OF wa_P0008 where
But I'd look at your logic too.
Rob