‎2008 Jan 04 6:19 AM
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
‎2008 Jan 04 6:25 AM
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.
‎2008 Jan 04 6:26 AM
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
‎2008 Jan 04 6:28 AM
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
‎2008 Jan 04 6:33 AM
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.
‎2008 Jan 04 6:38 AM
Use
p_lifnr TYPE LIFNR vendor num
p_bukrs TYPE BUKRS company code
Rgds
Sathar
‎2008 Jan 04 7:24 AM
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.