Application Development 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: 

standard function modules

Former Member
0 Kudos

how can we make use of standard function modules

3 REPLIES 3

Former Member
0 Kudos

There is a pattern button on one of the tool bars click it and enter your function module name.specify importing and exporting parameters

example fm which converts units of material from kg to ton


md_convert_material_unit

CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = l_matnr
i_in_me = l_meins_in
i_out_me = 'KG'
i_menge = l_gsmng
IMPORTING
e_menge = l_gsmng
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.

former_member230674
Contributor
0 Kudos

hai

suman,

Standard function modulaes are predefined by sap to perform specific task.

we can use those modules in our programs by going to

patterns -> call function option. Then give the name of the standard function module and click on ok.

Before going to use a standard function module, you should find first by going to

transaction SE37 based on the name of the concept.

eg: To translate the internal date format to external date format or vice versa,

converting one unit of measure to another unit of measure,

converting hexadecimal to characters

Once , u get the fm in your program , identifying the mandatory parameters passed to fm and give proper values.

Go through the example prevoius reply.Then u got the clear idea.

we are using standard fm's very frequently.

There are so many fm's used in real time programs.

it simplifies our job by reducing the coding work substatially.

Reward points if useful,

Thank you,

G.V.K.Prasad

Former Member
0 Kudos

In se38 when you are editing the program you can find the PATTERN button in Menu Bar use that and write the function module which you want to use than press OK

It will provide with all mandatory field, IMPORT , EXPORT Parameters than use this.