‎2007 Apr 04 12:15 PM
can I create a subroutine inside the function module. if possible where should the code for the form should be written.
‎2007 Apr 04 1:23 PM
Hai,
You sholud not(can not) write Sunroutine definition in source code of function module.
Just write:
perform sub1 in source code of function module.
<b>Double click on subroutine name</b> then a dialog box appears press enter.
Click on Top-include name(L followed by Function group name folloed bt TOP ,For example if your FG name is FG1 then click on LFG1TOP which is called TOP INCLUE) and Press Enter.
There write your subroutine code.
Hope you can perfectly go forward.
<b>Award points if it helps you.</b>
Regds,
Rama.Pammi
‎2007 Apr 04 12:20 PM
Hi Jenibalet S ,
Yes, You can create a subroutine inside the function module.
FUNCTION XXXXXX.
perform sub1.
ENDFUNCTION.
The form ... endform of the subroutine should be in an include under the same function group.
Regards,
Tanmay
‎2007 Apr 04 12:22 PM
Hi,
Subroutines cld be created in FM's. they go in the includes of fM.
Check the link for info ;
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
‎2007 Apr 04 12:22 PM
YES IN SOURCE CODE OF FN MODULE
PERFORM P_FORM.
ENDFUNCTION.
FORM P_FORM
<SOME CODE>
ENDFORM.
OR YOU CAN WRITE THE FORM IN SOME INCLUDE PROG ALSO..
REGARDS
SHIBA DUTTA
‎2007 Apr 04 1:23 PM
Hai,
You sholud not(can not) write Sunroutine definition in source code of function module.
Just write:
perform sub1 in source code of function module.
<b>Double click on subroutine name</b> then a dialog box appears press enter.
Click on Top-include name(L followed by Function group name folloed bt TOP ,For example if your FG name is FG1 then click on LFG1TOP which is called TOP INCLUE) and Press Enter.
There write your subroutine code.
Hope you can perfectly go forward.
<b>Award points if it helps you.</b>
Regds,
Rama.Pammi