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

function module creation

Former Member
0 Likes
610

Hi All,

I'm trying to create a function module in SE37.

In the import parameters i'm getting error under "typing".

Parameters typing associated type short description

p_lifnr like bsik-lifnr vendor num

p_bukrs like bsik-bukrs company code

Pls tell me why im getting the error..

Also kindly explain me the step by step procedure to

create a function module that retrives the data from two fields:

lifnr & bukrs.

thanks,

mahathi

6 REPLIES 6
Read only

Former Member
0 Likes
590

Creating FM : se37 > goto>create fun group>Function module name> create import parameters to you req > in tables tab ztable (like).>source code .

To make the fm as remote-enabled module : attributes tab --> click on remote-enabled radio button --> start immed.

Read only

abdulazeez12
Active Contributor
0 Likes
590

Use TYPE instead of LIKE in typing..

Function Module Creation:

First Go to transaction code SE 37.

Then create. Function group.

Goto --> Function Groups --> Create Group

under Function Group we create Function Module

After Create Function Group Give Function Module Name click on create

then we have Import, Export, Tables, Change, Exception, Source Code tabs .

Press on Import tab. then give import parameters.

Let me know if have any doubt.

thanks

Shakir

Read only

i048168
Product and Topic Expert
Product and Topic Expert
0 Likes
590

Hi,

You plz give clear specification of the function module. You need to know

1. What are the inputs to the FM? ( export in call function and import in se37)

2. What are the outputs from the FM? (import in call function and export in se37)

3. Then u do the processing in the coding part with the help of inputs and give the results in outputs.

So make sure in what way you are going to use fields lifnr and bukrs ( input or output).

Regards

Vadi

Read only

Former Member
0 Likes
590

Thanks to all... I want to write function module for the following code. Till Imports I could able to enter but after that what should i do?

DATA : BEGIN OF ITAB1 OCCURS 0,

LIFNR LIKE BSIK-LIFNR,

BUKRS LIKE BSIK-BUKRS,

END OF ITAB1.

SELECT LIFNR BUKRS FROM BSIK INTO CORRESPONDING FIELDS OF ITAB1.

LOOP AT ITAB1.

WRITE : / ITAB1-LIFNR, ITAB1-BUKRS.

ENDLOOP.

Read only

Former Member
0 Likes
590

Use

p_lifnr TYPE LIFNR vendor num

p_bukrs TYPE BUKRS company code

Rgds

Sathar

Read only

Former Member
0 Likes
590

Hi,

Try using TYPE instead of Like.

Steps to create FM.

1. Go to SE37 --> Input the name for FM > Assign the FM to Function Group> Make sure to activate the FM otherwise it will give you an errror.--> To active the Function Group go to SE80 --> Select Function Group from the dropdown list --> Give the Function Group nama -->right click on it and select activate.

In the FM give the export, import parameters, tables, exception parameters. In the source tab, write the source code for the FM. Save and activate.

Thanks,

Sriram Ponna.