‎2007 Jun 06 11:37 AM
Hi,
Requirment : To create a Function Module
INPUTS : vbeln (mandatory)
posnr (optional)
file path (mandatory)
OUTPUT : File (type .txt)
Please let me know the steps involved and the DATA TYPES that need to be defined in F.M for
input fields and output .
Thxs,
Vind.
‎2007 Jun 06 11:50 AM
hi,
We can create FM in Function-builder for that one we work with SE37.
for declaring fields choose option IMPORT of function builder, under that define
field<b> vbeln</b> type <refarence table-field > and provide value for it type , check the mandatory option.
<b> posnr</b> type < refarence table-field>and check the optional option.
file path type c . here u choose the proper dictionary datatype.
next Select the option EXPORTING.
file type ( specifies the same type as mentioned above)
regards,
sudheer.
‎2007 Jun 06 12:19 PM
Hi ,
First u need to create a function group
use SE37 goto--> function groups --> create group
Use this FG to create a FM
Import parameters
VBELN type VBELN Optional = " "
FILE TYPE LOCALFILE Optional = " "
POSNR TYPE POSNR Optional = "X"
There will be no export parameter .
within the FM use WS_DOWNLOAD , GUI_DOWNLOAD to crete the file on the path specified.
write the code
activate the top include & the FM together
Regards,
Gaurav
‎2007 Jun 06 12:23 PM
hi
good
go through this link,which ll give you detail about creating a function module
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
thanks
mrutyun^