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

Difference between exporting & importing....

Former Member
0 Likes
10,455

Please help me in giving me the difference betweeen Exporting & importing??

I also want to know what the following codes imply??

Why do we use exporting & importing??

I could not understand from abap keywords help....

CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'

EXPORTING

iv_date = sy-datum

IMPORTING

ev_month_begin_date = vbap-aedat.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,127

Hi

exporting means what the function module uses to do any action.

Importing means what you get from function module.

In your example,Your fm uses sy-datum and returns the vbap-aedat

9 REPLIES 9
Read only

Former Member
5,127

Hi,

exporting parameter tells what u are sending

to the function module

importing parameter tells what u are getting in reply from function module

in the example we are sending sy-datum as exporting parameter and getting aedat as importing parameter

Regards

Read only

Former Member
0 Likes
5,127

hi,

You call function modules from ABAP programs using the CALL FUNCTION statement. The name of

the function module is displayed in single quotation marks. After EXPORTING, the system assigns the

parameters that are passed/ to be passed to the function module. After IMPORTING, the system assigns

the parameters that are passed from the function module to the program. Most function modules support

additional exceptions.

If so, after EXCEPTIONS, the exceptions are assigned to values that will be set in

the system field sy-subrc, if a system error occurs. On the left side of the Parameter assignment screen,

the system displays the names of the interface parameters, while the right side of the screen displays

the program's data objects.

When you exchange data with function modules, you can distinguish clearly between three kinds of parameters:

Importing parameters, which are received by the function module

Exporting parameters, which are returned by the function module

Changing parameters, which are both received and returned.

By default, all parameters are passed by reference. To avoid unwanted side effects, you can only change exporting and changing parameters in the function module. If you want to pass parameters by value, you must select the relevant option when you define the interface.

You can also declare importing and changing parameters as optional. You do not have to pass values to

these parameters when you call the function module. Where possible, you should use this option when

you add new parameters to function modules that are already in use. You can assign a default value to an optional parameter. If you do not pass a value of your own when you call the function module, the system then uses the default value instead. Export parameters are always optional.

Hope this helps, Do reward.

Edited by: Runal Singh on Mar 10, 2008 4:47 PM

Read only

Former Member
0 Likes
5,127

Hi,

Exporting parameters are used to send the data to function module to manipulate it.

Importing parameters are used to take tha value from function module to use further operations in program,if necessary.

Thanks,

Chandu

Read only

Former Member
0 Likes
5,127

Hi,

Through exporting parameters we have to send data to the function module for processing.Through importing parameter we will get the result or output from the function module.In the code,your are passing current date to function module using system variable sy-datum.And you are getting begining date of the month into variable vbap-aedat.

Hope this will help.

Reward if useful.

Regards

shibin

Read only

Former Member
0 Likes
5,129

Hi

exporting means what the function module uses to do any action.

Importing means what you get from function module.

In your example,Your fm uses sy-datum and returns the vbap-aedat

Read only

Former Member
0 Likes
5,127

Hi,

See whenever you call a function module , you have to give some inputs to it , and eventually the function module will give you the output.

The inputs which you give, will be given in "Exporting", ie sending something, and the output which you get from the function module should be specified in "Importing", ie getting something.

If you see the coding of the function module in SE37, The parameters which you EXPORT in your code, will be IMPORTED here, and the parameters which you IMPORT in code, ie the output, will be EXPORTED from here, ie sent from here to your code.

Reward if helpful.

Regards.

Read only

Former Member
0 Likes
5,127

hi,

This is explained in program:

Exporting is nothing but the value u r passing inside the FM .

after that it will do all process and return the value in Importing parameter.

like that if u use tables u can pass values and u can get the values in same TABLES parmeter itself.

If u see the same thing in FM:

The parameter which u Exported from program 'll be taken as IMPORTED one and the value that u get it in Importing in program 'll be considered asExported values... but the TABLES paraameters r same.

Thanks,

Reward if Useful.

Arunprasad.P

Read only

Former Member
0 Likes
5,127

Hi saswat,

In this particular example, you are passing today's date to the FM and you get the first day of the current month in return.

Regards,

Ravi Kanth Talagana

Read only

Former Member
0 Likes
5,127

Got a clear picture of the difference between exporting & importing.