‎2006 Feb 17 11:11 AM
hi,
i am working on reports, i need to call a function module directly. i have used a subroutine to call the function module but how to call the fuction module without giving the subroutine.
Regards,
anitha
‎2006 Feb 17 11:20 AM
hI aNITHA
You can the Function module in the program like you did in the subroutine.
call function <function name>
exporting
...
importing...
tables...
for exd.
REPORT ZTESTFUNC.
DATA: ITAB LIKE ZMATTAB OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_MATNR LIKE zmattab-MATNR.
CALL FUNCTION 'ZMATF'
EXPORTING
MATNR = P_MATNR
IMPORTING
MATDESCRIPTION =
COUNTRYNAME =
MDATE =
TABLES
ZMAT = ITAB
.
LOOP AT ITAB.
WRITE: ITAB.
ENDLOOP.
regards
kishore
Message was edited by: Harikishore Sreenivasulu
‎2006 Feb 17 11:21 AM
‎2006 Feb 17 11:23 AM
Place the cursor where U want the FM
Press the Pattern push button .(Ctrl+F6)
In the Popup give the FM name U want to use.
‎2006 Feb 17 11:25 AM
‎2006 Feb 17 11:26 AM
Hai,
Use the Function Control to call the function module.
this link may help you...
http://help.sap.com/saphelp_webas630/helpdata/en/63/5d4f82c4a411d194ae00a0c94260a5/content.htm
Regards,
Srikanth.
‎2006 Feb 17 11:29 AM
hai
just click on the 'pattern' in the toolbar.
enter the function name in CALL FUNCTION.....
enter.
now the function module is automatically added to the program.
‎2006 Feb 17 11:41 AM
hi,
To call function module directly from the abap editor goto PATTERN.
from there you can call any function module.
if you want to create your own function mudule and use go to se37.
‎2006 Feb 17 11:46 AM
Hi anitha,
1. Are u talking about normal se38 reports.
Then u can directly call the FM
just as u call in subroutine.
*----
2. If uare talking about sapscript layouts,
then it cannot be done directly.
regards,
amit m.