cancel
Showing results for 
Search instead for 
Did you mean: 

Work Book Issue

pardeep_malik
Active Contributor
0 Kudos

Hi Export,

i am having a workbook with three sheet and each having different-2 query. when i am refreshing my workbook without selecting any sheet it asked me 'no query selected do you want to refresh all the query in workbook and i select yes' and it is showing me the variable screen of the last sheet then second sheet and then first sheet but i want to see first sheet variable screen first then second sheet and at last third sheet variable screen.Is there any way through which i can change the order?

Thanks

Pradeep

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all,

If I have 2 queries in a workbook and I'm using the button to refresh them and set the variable values (in Bex7) is possible to avoid one of these queries to be refreshed? Even if I select the DATA_PROVIDER in the button (I've one for each query) both ones are being refreshed. I also tried hidding and disabling the objects but nothing happened.

any ideas?

thanks a lot,

Martin

Former Member
0 Kudos

Martin,

I think the command SHOW_VARIABLE_SCREEN is workbook-specific, the additional DATA_PROVIDER does not help in your case

An alternative would be that you manage all your variable values in the workbook and transfer them dataprovider-specific, using:

DATA_PROVIDER 1 DP_1

CMD 1 PROCESS_VARIABLES

SUBCMD 1 VAR_SUBMIT

VAR_NAME_1 1 <tech. variable name>

VAR_VALUE_EXT_1 1 <variable value>

VAR_NAME_2 1 <and so on>

...

I would set up above table in Excel, and define the range in the "Command Range" field in the button definition.

Search for "Command Wizard" in the Netweaver documentation, there you will find more infos regarding this topic.

Hope this helps,

regards,

Berno

Former Member
0 Kudos

Hi Berno,

Thanks for your feedback. Sorry if I misunderstood you, but this is what I've done so far, as follows

Buton 1

NAME INDEX VALUE

DATA_PROVIDER 1 Refresh current month

CMD 1 PROCESS_VARIABLES

SUBCMD 1 VAR_SUBMIT

VAR_NAME_1 1 VSMCMY01

VAR_VALUE_EXT_1 1 1.2011

Buton 2

NAME INDEX VALUE

DATA_PROVIDER 1 Refresh Dec Curr. year

CMD 1 PROCESS_VARIABLES

SUBCMD 1 VAR_SUBMIT

VAR_NAME_1 1 VSMCMY01

VAR_VALUE_EXT_1 1 12.2011

What I have in this workbook is the same query inserted twice. The first query I need to refresh it using the actual month, and the second one using december this year.

When I press the Button 1, I got both queries refreshed with 1.2011 (in this case).

The difference with the variable screen is in this case, As I unchecked the option "display duplicated variables once" I am able to select a different value for each query, so in this screen I can select "01.2011" for the first query and "12.2011" for the second one.

Hope I was clear, and again, thanks for your help.

cheers,

Martin

Former Member
0 Kudos

Hi all,

Just to inform you I found the solution on this SAP NOTE.

SAP Note 1425496 - BExAnalyzer: variables are melted incommand VAR_SUBMIT

My MIS has to install a patch on BW and now when we use the MELT_VARIABLES it works perfect...

cheers!

Martin

0 Kudos

Hi All,

Please follow below steps to resolve this query.

steps:

1) Insert 3 queries in 3 sheets(i.e Expense summary, Time summary, Projects summary)

2) Before saving your workbook in roles , place the cursor in the first sheet and save it.

Now first sheet would be your default sheet and you can see variable screen of your first query.

Thanks

Madhu Koleti

Former Member
0 Kudos

Hello there,

I'm not sure, but I believe the system is displaying the variable screens according to the DP name where the queries are affected, i.e., the system is displaying the variable screen for DP_1, DP_2, and so on.

Can you validate that?

Hope this helps,

Regards,

Diogo.

pardeep_malik
Active Contributor
0 Kudos

Hello Diogo,

Thanks for your reply.

Could you please tell me what is the DP here?

Thanks,

pradeep

Former Member
0 Kudos

Hello again,

In your workbook on the BEx Design Toolbox click on the Design mode button. Afterwards click on the grid symboll which will appear above each query. This will indicate which DP (dataprovider) is.

You can also click on the Workbook settings and on the Data Providers tab you'll see the list of the data providers (DP).

Hope this helps,

Regards,

Diogo.

pardeep_malik
Active Contributor
0 Kudos

Hello Diogo,

but all the query are made on single multiprovider.

Thanks,

Pradeep

Former Member
0 Kudos

Hello,

All the queries might be on the same multiprovider, but each GRID on the excel sheet, each query, is assigned on a specific Data Provider, and that's why you have different variable screens, different queries.

Regards,

Diogo.

pardeep_malik
Active Contributor
0 Kudos

Hello,

No all the query are maintain on single multiprovider and in query there is no filter infoprovider specific.so is there any way through which i can change the order?

Thanks,

Pradeep

Former Member
0 Kudos

Hi,

There will be a tab called Workbook Settings in BEx analyser toolbar. In that you can see Dataproviders.

Here dataprovider means the underlying BEx query behind every Analyser Item.

So u can see which query is DP_1 , DP_2 so on.

pardeep_malik
Active Contributor
0 Kudos

Hello,

I am working with 3.X version and there is no such type of option.Please suggest me what should i do now.

Thanks,

Pradeep

Former Member
0 Kudos

Hummm,

Ok, that functionality of DP only exist on 7 version, not 3.X, that's why you couldn't find it.

Also not probably sure, but I believe the variable screen of the queries is appearing alfabetically or by the technical name of the query, or by the description of the query...

Can you check that?

Regards,

Diogo.

Former Member
0 Kudos

Hi there,

in 3.x BEx it refreshes the latest inserted queries as first. So if you insert your queries in opposite sequence into your workbook, you should get the desired variable sequence.

As alternative you can use the VBA API (SAPBEXsetVariables and SAPBEXrefresh), using this you have total control which query is refreshed first.

hope that helps,

Berno

pardeep_malik
Active Contributor
0 Kudos

Hello,

Could you please give me more information about this VBA API (SAPBEXsetVariables and SAPBEXrefresh) and how to use this in my workbook in 3.X.

Thanks,

Pradeep

Former Member

ok, let me try to explain

the setVariables you only need if the query contains manual input variables. if so, before coding in vba, you need to create a "variable box" on a (hidden) Excel sheet in the structure of RRX_VAR, eg:

VNAM VARTYP VPARSEL SIGN OPT LOW LOW_EXT HIGH

0FISPER 1 P I EQ 003

ZMYVAR 1 P I EQ XYZ

... (as many variables as you want)

you define this table (without the header) as a range, eg range "myvar"; additionally you put a name range on every query that you would like to refresh, I always put the range on the title of the query, but it can be anywhere on the query; in the example it would be the ranges Query1 and Query2.

then you can use the command in your VBA routine:

sub refresh()

' refresh query 1

lngRC = Run("SAPBEX.xla!sapBEXsetVariables", Range(myvar))

lngRC = Run("SAPBEX.xla!sapBEXrefresh", False, Range(Query1))

' here you might change the variable values

' ....

' refresh query 2

lngRC = Run("SAPBEX.xla!sapBEXsetVariables", Range(myvar))

lngRC = Run("SAPBEX.xla!sapBEXrefresh", False, Range(Query2))

' and so on...

end sub

Remark: this technique IS ONLY VALID FOR THE BEX 3.5!!! When you migrate to BI7/BEx7, you have to completely re-code the whole thing. There are also techniques in BI 7, similar to the Web Interface, but it is a completely different approach as in BEx 3.x

hope that helps,

regards,

Berno