2007 Sep 05 10:57 AM
Hi,
Can any body pl stell me the Use of Changing and table parameters in the FM .
Please give some examoples with coding.Urgent
Thanks
2007 Sep 05 10:59 AM
Hi,
Changing and Tables paramters both act IMPORT and EXPORT parameters.
<b>That is you can use them to pass the data to the function module and also get the data from the function module.</b>
<b>Only difference</b> is TABLES parameters are always internal tables where as changing parameters can be Innternal tables or any data of any type.
Regards,
Sesh
2007 Sep 05 11:02 AM
Thanks for your answer.
Please tell me how to use cahnging parameter.
In changing parameter one pass by value option is there.
Basically in which case we need to pass the variable in changing parameter.
How the cahnging parameter will work ....please gv an example.
THANKS
2007 Sep 05 11:00 AM
HI,
The changing parameter.
For example , if you are adding two fields and putting in third field.
Now you need to use third fields and find percentage and you need to get value in the same third field itself then you can take it as changing parameter..
Table parameter.
for example you have a mara internal table and you want to add deletion flag 'X' in delete column of same internal table.
for material 1 you need to add 'X' and material 2 you need to add space.
You can take this as table parameter.
rewards if useful,
regards,
nazeeer
2007 Sep 05 11:01 AM
Changing - values can be changed and changed values are returned to the caller
Tables - always changing, but data is two dimensional (ie: an internal table)
tables cannot be passed as import / export parameters
2007 Sep 05 11:02 AM
hi
changing and tables are the keywords used for passing the values
to a FM.
tables : used for passing database tables as parameter.
changing : used for passing the values.
2007 Sep 05 11:02 AM
Changing are used for variables which conatin value in both calling program and FM where as tables are used for internal tables it is also contain value which will be remain same in program and FM.
Rewards if useful...
Minal
2007 Sep 05 11:02 AM
Hi..
Find the Exact purpose:
For Eg We want to Call a FM that takes the Matno , stock , Received qty then returns the Updated Stock.
Import: MatNo , ReceivedQty (These are only imported to the FM )
Changing : Stock (It is Imported as well as exported)
Tables: is also same as Changing i.e Imported as well as exported. But it is only meant for passing INTERNAL TABLES.
<b>reward if Helpful.</b>
2007 Sep 05 11:14 AM
Thanks ofr ur answer,
Can u please tell me the use of exception parameter in the FM with example.
Thanks
2007 Sep 05 11:18 AM
If an error occurs in the program such as divide by 0, a non existing file etc, SAP would throw a dump to the calling program
however, if you define an exception and throw it in your FM, the calling program can catch that exception and handle it
To catch the exception, the program calling the function module can check sy-subrc
if there was an error, it will be set the the error number (as defined in the exceptions parameters)
else sy-subrc will be 0 in case of no errors