11-28-2008 3:56 PM
Hello Everybody,
Can any one tell me how can I get the Changing Parameters from a sap function module.
Using JCO I only know getImportParameterList(), getExportParameterList(), getTablesParameterList(), ...
So, something like getChangingParameterList() doesn't exist.
Thanks in Advance.
Regards,
Kais
11-28-2008 4:10 PM
11-28-2008 4:10 PM
11-28-2008 4:22 PM
Thanks for replying Neha,
I'm asking whether or not it's possible to get the changing parameter using the getExportParameterList().
I've read that the changing parameter acte as an Import-Export Parameter.
So, if I have a changing parameter like this :
Changing
Value(T_DOC) TYPE ***
What should I do to get the value of T_DOC after executing the program.
Regards,
Kais
11-28-2008 4:45 PM
Hi
First you need to pass changing parameter as an Export parametre and once the function module is excecute you need to import the parametre.
Hope this is clear.
Coz in a normal function module a changing parameter is passed to FM and once the function moduel is executed then the value of changing parameter will changed after execution so in your case you need to import it.
Check this link:\
Regards
Neha
Edited by: Neha Shukla on Nov 28, 2008 10:15 PM
Edited by: Neha Shukla on Nov 28, 2008 10:22 PM
11-28-2008 5:40 PM
Hi Neha,
Another question relates to it.
How can I use Changing pass a table-data and then return the hole table.
For example :
mytab contains v3,v4,v5
mytab_internal contains v1,v2
Changing
mytab TYPE mytab_internal
Loop at mytab INTO wa_mytab.
INSERT mytab_internal VALUES wa_mytab.
ENDLOOP.
????
Get the mytab data.
Then the returned table "mytab" is then v1,v2,v3,v4,v5.
I don't not how to do this by a changing value.
11-28-2008 6:22 PM
Hi Kais
In function module you can change any table by pasing it to table parameter also.
Suppose :
mytab contains v3,v4,v5
mytab_internal contains v1,v2
Then we can pass table mytab_internal to the FM as table parameter and mytab as changing parameter or as table parameter also (the way it is defined in your FM).
Function module can be desined in two ways
1-Call Function 'ZNEHA'
Tables
mytab = mytab
mytab_internal = mytab_internal.
2-Call Function 'ZNEHA'
Tables
mytab_internal = mytab_internal
Changing
mytab = mytab .
Now the Function Module code has to handle this :
Loop at mytab.
*Read the table mytab_internal with the records of mytab one by one.
Read table mytab_internal with Field <Field Name > = matab-Field.
*if records not found then append the entry in mytab.
if sy-subrc ne 0.
append mytab_internal-<Field> to mytab.
endif.
Endloop.
Edited by: Neha Shukla on Nov 29, 2008 12:12 AM