‎2006 Jul 16 11:44 AM
Im getting the input from a flat file.
I moved it to an internal table.
Please tell me the code to validate it contents <b>without performance impact</b>.
ITAB
contains fields <b>BUKRS,HKONT,GSBER,KOSTL</b>
Thanks in advance,
Viven
‎2006 Jul 16 11:58 AM
It depends on the file contents quantity. If you receive thousands then
1. Select all BUKRS, HKONT,GSBER,KOSTL into internal table.
2. Loop at the internal table and use READ statement to do validations.
If you have only 10's of records you can use SELECT SINGLE to do the validations.
Regards
Manohar
‎2006 Jul 17 5:12 AM
Hello Viven,
validation of BUKRS
sort itab by bukrs.
loop at itab.
at new bukrs.
validation
endat
endloop.
validation of hkont
sort itab by hkont.
loop at itab.
at new hkont.
validation
endat
endloop.
and so on...
Regards,
Naimesh
‎2006 Jul 17 5:31 AM
Hi,
You can do the following.
Declare l_too1 as type sorted table
L_ITAB = ITAB "L_ITAB is a local internal table
Sort L_ITAB BY BUKRS
Delete adjacent duplicates from L_ITAB comparing
BUKRS.
select bukrs from T001
into l_t001
for all entries into l_itab
where bukrs = l_itab-bukrs.
Loop at l_itab into <wa>
Read table l_T001 with unique key bukrs = <wa>-bukrs.
if sy-subrc <> 0.
validation message
endif.
endloop.
The same can be repeated for other fields.
Regards,
Sandeep
‎2006 Jul 17 6:29 AM
Hi viven,
1. to validate it contents without performance impact
a) performance impact will only depend upon
the number of records in the internal table.
b) validations on the data of this internal table,
won't have any tangible effect on performance.
c) Further, VALIDATIONS are more important,
than performance.
regards,
amit m.