‎2007 Nov 02 3:40 PM
I wrote the below Code WHERE
Message was edited by:
soniya kapoor
‎2007 Nov 02 3:43 PM
Hi Soniya,
Just do below changes and see the result.
**append wa_zdtg to /BIC/AZDBREB_000
Update table /BIC/AZDBREB_000 set
MODIFY /BIC/AZDPFMGL000 FROM table t_aztgl.
endif.
endloop.
TO
<b>**append wa_zdtg to /BIC/AZDBREB_000
Update table /BIC/AZDBREB_000 set
endif.
endloop.
MODIFY /BIC/AZDPFMGL000 FROM table t_aztgl.</b>
Regards,
Atish
‎2007 Nov 02 3:43 PM
Hi Soniya,
Just do below changes and see the result.
**append wa_zdtg to /BIC/AZDBREB_000
Update table /BIC/AZDBREB_000 set
MODIFY /BIC/AZDPFMGL000 FROM table t_aztgl.
endif.
endloop.
TO
<b>**append wa_zdtg to /BIC/AZDBREB_000
Update table /BIC/AZDBREB_000 set
endif.
endloop.
MODIFY /BIC/AZDPFMGL000 FROM table t_aztgl.</b>
Regards,
Atish
‎2007 Nov 02 4:02 PM
Hello Atish and Naimesh. Atish I guess by mistake u repeated the same code withot editing . i do not see any changes. Also Naimesh To answer you we need to pick only Current Quater Data from Target Table /BIC/AZDPFMGL000
Can u help me edit the code to pick only Current Quater Data from Target Table /BIC/AZDPFMGL000 Since I only want to update the Current Quater Values for ZEMPCODE and also append t_aztgl. did not help. since it is still taking long hours like 4 -6 to load.
Please help me improve this bad performace.
Thanks
Soniya
null
‎2007 Nov 02 4:04 PM
Hi Soniya,
Yes there is difference.
I moved the MODIFY statement after the LOOP.
Regards,
Atish
‎2007 Nov 02 4:06 PM
Thanks Atish, I will implement this and test. But please suggest any more improvement. Alos can u tell me how to pick only current quater data and modify values of ZEMP CODE. Values already exist for ZEMP CODE IN Target table but we want to modify that every quater thats is why i wrote this code, since it is the most critical business load and it takes 6 hours to load
null
‎2007 Nov 02 4:08 PM
Hi Soniya,
I think this will make a good improvement in performance.
Regards,
Atish
‎2007 Nov 02 4:08 PM
If you have that much data than, you have to wait ....
One more suggetion I want to give you in the select queries:
Define your itab like this.
data: begin of itab occurs 0 with header line,
COMP_CODE like /BIC/AZDPFMGL000-COMP_CODE,
PROFIT_CTR like /BIC/AZDPFMGL000-PROFIT_CTR,
/BIC/ZEMPCODE like /BIC/AZDAMPATH00-/BIC/ZEMPCODE,
/BIC/ZSTARTD like /BIC/AZDAMPATH00-/BIC/ZEMPCODE,
/BIC/ZPRDATE like /BIC/AZDAMPATH00-/BIC/ZPRDATE,
end of itab
select a~COMP_CODE
a~PROFIT_CTR
b/BIC/ZEMPCODE b/BIC/ZSTARTD b~/BIC/ZPRDATE
into corresponding fields of table itab " <<<
into table itab "<<<
from /BIC/AZDPFMGL000 as a INNER join
/BIC/AZDAMPATH00 as b
ON acomp_code EQ bCOMP_CODE
AND aPROFIT_CTR EQ bPROFIT_CTR.
because into correcponding fields will take much time.....
Regards,
Naimesh Patel
‎2007 Nov 02 4:18 PM
Hello Atish and Naimesh. I will implement your suggestions, But can u edit my code how to pick only current quater data ie Fiscper 010 -012.2007 but this will vary as quater changes and I want to modify values of ZEMP CODE. Values already exist for ZEMP CODE IN Target table but we want to modify that every quater
Thanks
SONIYA
‎2007 Nov 02 3:43 PM
Check out this part of code:
loop at itab into wa_itab.
read table t_aztgl with key comp_code = wa_itab-comp_code
PROFIT_CTR = wa_itab-PROFIT_CTR
into wa_zdtg
binary search.
if sy-subrc = 0.
wa_zdtg-/BIC/ZEMPCODE = wa_itab--/BIC/ZEMPCODE.
modify t_aztgl from wa_zdtg index sy-tabix.
append t_aztgl. "<<
**append wa_zdtg to /BIC/AZDBREB_000
* Update table /BIC/AZDBREB_000 set
endif.
endloop.
MODIFY /BIC/AZDPFMGL000 FROM table t_aztgl. "<< I assume that you have all the data of target table /BIC/AZDPFMGL000 in the internal table T_AZTGL.Regards,
Naimesh Patel
‎2007 Nov 02 5:04 PM
Hi Naimesh If I do as suggested by you
data: begin of tp_itab occurs 0 with header line,
COMP_CODE type /BIC/AZDPFMGL000-COMP_CODE,
/BIC/ZCONSUNIT type /BIC/AZDAMPATH00-/BIC/ZCONSUNIT,
PROFIT_CTR type /BIC/AZDPFMGL000-PROFIT_CTR,
/BIC/ZSTARTD type /BIC/AZDAMPATH00-/BIC/ZSTARTD,
/BIC/ZPRDATE type /BIC/AZDAMPATH00-/BIC/ZPRDATE,
end of tp_itab.
I get the error in Start Routine Code in BI
<b>E:Tables with headers are no longer supported in the OO context</b>
‎2007 Nov 02 6:14 PM
Than you need to define it with the types:
types: begin of tp_itab.
COMP_CODE type /BIC/AZDPFMGL000-COMP_CODE,
/BIC/ZCONSUNIT type /BIC/AZDAMPATH00-/BIC/ZCONSUNIT,
PROFIT_CTR type /BIC/AZDPFMGL000-PROFIT_CTR,
/BIC/ZSTARTD type /BIC/AZDAMPATH00-/BIC/ZSTARTD,
/BIC/ZPRDATE type /BIC/AZDAMPATH00-/BIC/ZPRDATE,
end of tp_itab.
data: itab type standarad table of tp_itab. " Internal table
data: wa_itab type tp_itab. " work areadRegards,
Naimesh Patel