cancel
Showing results for 
Search instead for 
Did you mean: 

Export variable from form to method

Former Member
0 Kudos

Hi All,

I'm new to SAP / ABAP / Smartforms so sorry if this question is a bit noddy, had a search but couldn't find a simple answer to this.

We have a form that within the Global Definitions / Initialisation, finds the Company name against who the form is ran, and puts it into a variable defined in the Global Definitions. What i would like to know however, is how i can then export from the form to the Method that runs the form?

I could re run the function and populate the data again, but it seems a waste of time when it's done in the initialisation! Is this possible?, tried to add the variable name to the Export tab of the form interface, but this gave an error as the variable name was defined already.

Thanks in advance.

Andy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Andy,

The reason is that your are defining a variable twice. 1st time in Export tab and 2nd time in Global definition. I propose you change the name of the Global variable.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi There,

I found the answer I was looking for. Had to remove the variable definition from my Global Definitions and put into the Export parameters instead, thanks for the pointers, I didn't follow what you meant at first, but it pointed me in the right direction!

Andy

Former Member
0 Kudos

In that case how would I export it?, could I pass into another variable to export to the method, and if so, where would it need defining?