Skip to Content
author's profile photo Former Member
Former Member

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

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 ?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 08:44 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 09:21 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2009 at 12:44 AM

    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?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.