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: 

Passing field-symbols to a function module

Former Member
0 Kudos
485

Hey experts.

In this scenario I am in the need to pass two buffer fieldsymbols (one contains a string, the other one a table) from my main programm to a function module.

The main programm handles the user input and double-loops the function call with changing parameters. I cannot initialize the field-symbols within a loop since I'd loose the data. So I need to declare them BEFORE the function call proceeds, get them transfered over to the function module AND I need them saved from one call to the next one.

Any suggestions ?

How can I set global parameters available in my main programm and my function module?

1 REPLY 1

Sandra_Rossi
Active Contributor
0 Kudos
81

Hi Paul,

Field symbols never contain data but refer to some existing data objects, so what you need is to copy the latter (string and internal table in your case), and you can define to which data objects the field symbols refer to, at any time. To duplicate a data object, it will depend if they are defined statically or dynamically?

How can I set global parameters available in my main programm and my function module?

It's difficult to give you one answer, it may depend on your scenario, you have lots of possibilities, interface work area, global data that is written and read using dedicated procedures, export/import to memory...

A little excerpt of your code would help.

BR

Sandra