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: 

Function modules & IT

Former Member
0 Kudos

Hi all,

i have small doubts i.e..

1) when we call a function module in a program,

into which memory both the function module and program are lodaded i.e.. both are loaded into one memory or loaded into different memories.

2) when we call a function module in a program,

only function module is loaded or total function group is loaded into memory.

3) can we append records to any table ....

i.e.. standard table, sorted table, hashed table..

2 REPLIES 2

former_member589029
Active Contributor
0 Kudos

1)

If you call a function module within a program they will be loaded into the same LUW (logical unit of work) hence you have access to the report variables even if you are within the function module.

in the debugger: (Report_name)variable_name

in the code:


constants: lc_variable type char60 value '(Main_Program)Variable_name'.                                                                  
data: lv_temp type variable_type.

FIELD-SYMBOLS: <fs_any> type variable_type.                                                                     assign (lc_variable) to <fs_any>.                                                                                if <fs_any> is assigned. 
  lv_temp = <fs_any>. 
endif.

In this case you would have the variable content from the main program in lv_temp in the function module

(2)

I am not sure about the whole function group, but the main program and the data declarations definitely are because you are using those and in case you have form routines in there they are loaded as well.

Therefore I would say that the whole function group is loaded

(3)

Standard - YES

Sorted - YES - however this will cause the table to be resorted

Hashed - No append statement possible

Hope that helps,

Michael

0 Kudos

Thank u for your quick response,

can i known why we cannot append record to hashed table.