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

Creating FM

Former Member
0 Likes
519

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.

3 REPLIES 3
Read only

Former Member
0 Likes
494

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.

Read only

Former Member
0 Likes
494

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

Read only

Former Member
0 Likes
494

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^