hi all
i buield this rfc to portal and when i run it it takes like 4,206,413 Microseconds
how i can decrease the time of runnig.
thankes
this is all my code
i reward.
CONCATENATE sy-datum(4) '01' INTO l_stperiod.
tmp_stperiod = l_stperiod.
l_enperiod = sy-datum .
bet_period = l_enperiod - l_stperiod.
LOOP AT costcenters ASSIGNING <fs_cost>.
l_stperiod = tmp_stperiod.
DO bet_period TIMES.
CALL FUNCTION 'ZEMP_MISS_DAYS'
EXPORTING
kostl = <fs_cost>-kostl
period = l_stperiod
TABLES
emp_miss_days = emp_miss_days.
l_stperiod = l_stperiod + 1.
ENDDO.
ENDLOOP.
l_stperiod = tmp_stperiod.
SORT emp_miss_days BY kostl period.
LOOP AT emp_miss_days .
MOVE-CORRESPONDING emp_miss_days TO col_miss_tab.
COLLECT col_miss_tab .
ENDLOOP.
*creating the data
IF costcenters[] IS NOT INITIAL.
SELECT kostl period miss_days
INTO TABLE gt_miss_data
FROM zaverageh_data
FOR ALL ENTRIES IN costcenters
WHERE kostl EQ costcenters-kostl
AND period BETWEEN l_stperiod
AND l_enperiod.
ENDIF.
ENDFUNCTION.