07-07-2006 1:41 PM
hi friends,
iam developing a function module. import parameter is business unit in(ZMAP) table.
ZMAP:company code and business unit.
user sending<b> business unit</b> as input and display the differnt <b>internal orders</b>(table coas) based on business unit. here company code exits in both table.
assumption: convert business unit to company code(FM1)
based on company code display internal orders.
(FM2)
pls help
chandu
07-07-2006 1:46 PM
Develop a function with business unit as an import parameter and it_orders as tables parameter which will contain the internal orders
Inside the function
1. get the company codes for the input business unit from the ZMAP table.
2. Select all the orders from COAS for the comp codes selected in step 1
-Kiran
07-07-2006 1:46 PM
SElect <company code>
<Business unit>
from zmap
into table it_zmap
where <Business Unit> = i_bus_unit. "IMporting parameter
if not it_zmap[] is initial.
select AUFNR
AUART
AUTYP
REFNR
ERNAM
ERDAT
AENAM
AEDAT
....
.
.
.
from COAS
into table t_coas
for all entries in it_zmap
where bukrs = it_zmap-<Comp Code>.
Regards,
Ravi
endif.