Application Development and Automation 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: 
Read only

how to call the function module

Former Member
0 Likes
950

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

8 REPLIES 8
Read only

Former Member
0 Likes
924

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

Read only

Former Member
0 Likes
924

hi,

try this.....CALL FUNCTION FUNCTIONNAME.

Read only

Former Member
0 Likes
924

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.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
924

click on the pattern above and give ur fn module name

Read only

Former Member
0 Likes
924

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.

Read only

Former Member
0 Likes
924

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.

Read only

Former Member
0 Likes
924

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.

Read only

Former Member
0 Likes
924

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.