cancel
Showing results for 
Search instead for 
Did you mean: 

how to transfer variable value from one query to another query?

Former Member
0 Kudos

I create two queries which contain the same variable "Year" and "Month".

In the wad,Query1 is used to be a table and Query2 is used to show the chart in the condition with the same variable value of Query1

So I want to transfer the variable value from query1 to query2.

Can anyone help me ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you use the same variable in both the queries,

the same value will be used id the queries are in de same design.

The user will be asked for a value only once.

Success,

Udo

Answers (2)

Answers (2)

Former Member
0 Kudos

Let me explain the issue in detail.

In Query Designer, both the year and month variables are defined by user exit function to read current year and month and can be modified during the query runtime.

In WAD, Query1 is used to be a table with a table interface to hyperlink a chart which is defined by Query2 with the same variable value of Query1.

During the runtime of template, if I change the variable value of Query1 , I want the variable of Query2 to be changed automatically with the same new value.

So in the table interface of Query1 , I write the ABAP code in "SE24" and related source code to the variable is following:

concatenate

'function fire_urlJGSP_Col(filter) {'

Cl_rsr_www_renderer=>c_lf

'chart_url="' url '" + "&CMD=LDOC'

'&TEMPLATE_ID=GCCHART_9' "WEB ID of the work book

'&PAGEID=Graphics' "Name of the view

'&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VAR_NAME=Z2MYEAR&VAR_VALUE_EXT=" + filter'

Cl_rsr_www_renderer=>c_lf

'openWindow(chart_url,"chart_window","dependent=yes","600",'

'"450","true")'

' }'

Cl_rsr_www_renderer=>c_lf

into l_coding.

In this way , I can only transfer the year variable value from Query1 to Query2 and not two variables .

So , how shall I do to transer the two variable value in the same?

Former Member
0 Kudos

Hi

If you have same Variable for both of the Queries, the variable user Input is used to call both.

Make sure that you have same settings for both the Queries for this Variable.

Hope it helps