Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Module

Former Member
0 Likes
868

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

2 REPLIES 2
Read only

Former Member
0 Likes
655

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

Read only

Former Member
0 Likes
655

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.