‎2006 May 30 3:38 PM
Hello Friends,
I am new in the world of SAP and also SDN.I would like to know which fields need to be filled for different function modules. Each function module has a different set of fields to be filled. Please fill me on the details.
Thank you,
Reson.
‎2006 May 30 3:48 PM
hi
goto se37 and open the FM documentation u want
u will find some thing like this
*"----
""Lokale Schnittstelle:
*" IMPORTING
" VALUE(CON_NAME) TYPE DBCON_NAME <b>OPTIONAL</b>" TABLES
*" LOCK_LIST STRUCTURE LOCK_L_SDB
*" EXCEPTIONS
*" NO_CONNECTION
*"----
u need not fill the params which r indicated as <b>optional</b> but the rest r mandatory & shud b filled
‎2006 May 30 3:42 PM
hi
just go to the function module and see the impoting and exporting parameters.
you will cone to know thw parameters to be passed and their types
to find the madatory fields to be passed see whether the
field is optional or not.
Message was edited by: Vijay Kumar Reddy
‎2006 May 30 3:42 PM
Hi Reson,
It depends on the function module and ur requirement , mandatory fields has to be filled
‎2006 May 30 3:44 PM
hi Reson,
WELCOME TO SDN.
It depends on which FM you are using and what are the Mandatory fields in that.
For Example if you are using GUI_DOWNLOAD then these are the parameters to be passed.
CALL FUNCTION <b>'GUI_DOWNLOAD'</b>
EXPORTING
filename = ld_fullpath
filetype = 'ASC'
APPEND = 'X'
write_field_separator = 'X'
CONFIRM_OVERWRITE = 'X'
TABLES
data_tab = it_datatab[] "need to declare and populate
EXCEPTIONS
file_open_error = 1
file_write_error = 2
OTHERS = 3.
Regards,
Santosh
‎2006 May 30 3:43 PM
CALL FUNCTION <module>
[EXPORTING
f1 = s1
f2 = s2
fn = sn (parameters which you pass from program to function are
s1, s2, sn)]
[IMPORTING
f1 = r1
f2 = r2
fn = rn (parameters which program receives you pass from function in
r1, r2, rn)]
[TABLES f1 = a1 fn = an]
EXCEPTIONS notvalid = 1
not correct = 2
OTHERS = 5].
It depends on the condition where u use it, if u are simply defining a function module on ur own then u can pass ur variables in <b>exporting</b> and get the return values in <b>importing</b>
‎2006 May 30 3:43 PM
Hi,
Every FM has IMPORTING, Exporting , Exception parameter.
Importing :- r those parameter which used by FM to generate result.
They are 2 type mandatory and option ( Has the Name Suggests)
Exporting :- r those parameters ; actually a result
Exception :- always uncomment the exception to avoid dump.
exceptions r handled statement between
if sy-subrc = exception Number
.......exception Handling.
endif.
Go through the link ( A Book for freshers )
http://cma.zdnet.com/book/abap/index.htm
Please mark Helpfull answers
Regards
Message was edited by: Manoj Gupta
‎2006 May 30 3:44 PM
Hi,
Go to SE37 and give the FM name and go in display mode and check the import and table parameters if they mark it as Optional then you need not to pass for those parameters. if it is not optional then you have to pass the data to that parameters.
Regards
vijay
‎2006 May 30 3:48 PM
hi
goto se37 and open the FM documentation u want
u will find some thing like this
*"----
""Lokale Schnittstelle:
*" IMPORTING
" VALUE(CON_NAME) TYPE DBCON_NAME <b>OPTIONAL</b>" TABLES
*" LOCK_LIST STRUCTURE LOCK_L_SDB
*" EXCEPTIONS
*" NO_CONNECTION
*"----
u need not fill the params which r indicated as <b>optional</b> but the rest r mandatory & shud b filled
‎2006 May 30 3:50 PM
Just wanted to point out that you don't have to code the function module signature in your ABAP code. All you need to do is use the CALL FUNCTION pattern. Doing so, the system will write the entire signature for you in your ABAP program.
Go to Se38 and edit your program, put your cursor at the desire spot and click the "Patterns" button, in the dialog enter the name of your function module and hit enter. You will see that the function call has been populated in your program.
Regards,
Rich Heilman