Application Development 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: 

How to get the changing parameter of a FM using JCO

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

This message was moderated.

5 REPLIES 5

Former Member
0 Kudos

This message was moderated.

0 Kudos

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

0 Kudos

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:\

http://www.winfobase.de/lehre/lv_materialien.nsf/intern01/FB09D79A41930E34C125709F0046180C/$FILE/Tip...

Regards

Neha

Edited by: Neha Shukla on Nov 28, 2008 10:15 PM

Edited by: Neha Shukla on Nov 28, 2008 10:22 PM

0 Kudos

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.

0 Kudos

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