You are on page 1of 2

fUNCTION MODULES - REUSABLE COMPONENTS: CREATING ONLY ONCE AND USED IN SEVERAL

PLACES.

SE37- Transaction code.

1. Create function group : container for function module.


SE80 to create function group.

2. right click and activate function group- always.

3. Create a functional Module se38, now create a functional module- provide name of
the functional group which you have provided..

4. ATTRIBUTES GROUP---- it will show you the information

5. Import tab: is used for input and export tab: for output.

in case of functional module, import tab will acess input and export will acess
output.

6.raise exceptions in the exceptions tab

7. a variable whose value is changing we will put it in a variable tab

8. Source coude: write the logic.

SE11 - DDIC ( SAP table bkpf)

we will pass 3 input fields and display the details but while output 5 things.

create 3 input parameters in the input tab

pbukrs type bukrs


ppbelnr type belnr_b
pgjahr type gjahr

now we will work with export tab

pout_bukrs type bukrs


pout_belnr type belnr_d
pout_gjahr type gjahr
pout_bldat type bldat
pout_blard type blart

writing logic in the source code:

Select single bukrs belnr gjahr blart bldat from bkpf (** the fields which we are
fetching, single because we are fetching single record)
into ( pout_bukrs, pout_belnr,pout_gjahr, pout_bldat , pout_blard type blart)
( ** write the output parameters)
whee bukrs = pbukrs,
and belnr = pbenr,
and gjahr = pgjahr.
(** what is happening here is that we are fetching 5 values into export parameters
on the basis of the input parameters)

You might also like