‎2007 Sep 06 9:48 PM
Hi gurus,
I have a condition where I need to select the profit center from the table K9RAED1500001 for the sales group and then I need to pass that cost center into one of my statement, I hve written the following select statements, can you please help me how to write the read statement, I want to read table it_ccenter and pass the target1 i.e. cost center to one of my statement.
select vkgrp vkbur bzirk kunnr into table it_sales
from knvv
for all entries in it_tab01
where kunnr = it_tab01-custid.
select target1 into table it_ccenter
from K9RAED1500001
for all entries in it_sales
where SOUR1_FROM = it_sales-vkgrp.
Thanks
Rajeev gupta
‎2007 Sep 06 9:54 PM
read table it_sales with key kunnr = it_tab01-custid.
read table it_ccenter with key SOUR1_FROM = it_sales-vkgrp.
‎2007 Sep 06 10:00 PM
If the internal tables are large, you should consider sorting them and adding the BINARY SEARCH addition to the READs.
Rob
‎2007 Sep 06 9:56 PM
hi you may also have to select the cost center trom the table K9RAED1500001 apart from target1..
select costcent target1 into table it_ccenter fromK9RAED1500001 for all entries in it_sales where sour1_from = it_sales-vkgrp.
read table it_cccenter with key costcent = <ur cost center>.
Cheer's
Mahesh