04-05-2008 5:12 AM
04-05-2008 5:50 AM
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.
04-05-2008 6:14 PM
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
04-14-2008 1:46 PM
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.