cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Issue

Former Member
0 Kudos

Hi,

I have an issue using variables in Query Designer.

My question is, "Can't we use same variable on Characteristic (0SEG_LEV1) and navigation attribute (0BPARTNER__0SEG_LEV1) ?"

If I use the same variable as stated above, In the Development system, it is throwing an error saying "Variable 'Segment Level1' is used for two different characteristics" but in the Production System & Quality System, it looks fine.

When I execute the query in RSRT, it is not giving me any errors that are shown up at the time of checking the query.

I don't understand if I am doing something wrong ?

Please help me out on this.

Thanks,

Sai.

Accepted Solutions (1)

Accepted Solutions (1)

cornelia_lezoch
Active Contributor
0 Kudos

Hi Sai,

you may not use the same variable within one query, but you can use them in several queries separately.

If you use the same variable separatly in different queries - once for char and once for navi, you will still get the error message, but you can ignore it.

If you need exactly the same restriction within one query - then use the variable for the char and create a new variable for the navi, type replacement path and replace the value from your first variable.

regards

Cornelia

Former Member
0 Kudos

Hi Cornelia,

Thank you for the reply.

In my scenario, I am using the same variable in different queries (one for char and other for navi).

So, isn't it a problem while I move the transports into the target system ? (as I am getting this error)

Thanks,

Sai.

anshu_lilhori
Active Contributor
0 Kudos

Hi,

I think you can use same variable in two different queries that should not be a concern.

It may also not throw error while transporting as well.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

Mr Sai,

Hope you are not reading my replies. I clearly explained that you cannot use same variable(same technical name). The error what you get is genuine one. You cannot transport to the target systems.

Regards,

Suman

anshu_lilhori
Active Contributor
0 Kudos

Hi Suman,

I think we can use same variable in different queries but not in a single query as as he stated that he is using it in different queries so it should not be a issue.

Correct me if i am wrong.

Regards,
AL

former_member182470
Active Contributor
0 Kudos

Hi Anshu,

I say big No. Even if you want to use in other query, the same variable(technical name) should populate under available variables of Nav Attr field, right? This won't happen. You can't see this variable under that. So, it's not possible.

Regards,

Suman

anshu_lilhori
Active Contributor
0 Kudos

Hi,

I am skeptical how it behaves in case of navigational attribute but if you say about characteristic then we use same standard variables of SAP across different queries.

Lets say for eg: Variable 0CMPCODE on company code is used in 100 of queries in my client system and with no issues.

I hope we both are on same page.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

It doesn't behave the same way with Nav Attr. We have 0plant as main char and 0plant__ZBRAN is the nav attr with branch. We cannot use same variable for plant and Nav attr either in same query or else where. The reason is simple. It won't show up the plant variable under the list of available variables under Nav Attr and vice-versa. I am talking with proof.

anshu_lilhori
Active Contributor
0 Kudos

Ok so here i conclude that we cannot use the same variable for char and its navigational attribute.Neither in same query nor in different query.

Correct me suman if my understanding is wrong.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

Hope you understood all my explanations. Your conclusion is correct.

cornelia_lezoch
Active Contributor
0 Kudos

Hi Sai,

I also get these messages, but only when I am in the query designer.

The queries run without a problem, so I just ignore the message 🙂

If you want to have no message, you need to create a new variable for the navi and exchange it in your queries.

regards

Cornelia

Former Member
0 Kudos

Hi Suman,

I strongly agree to your point (as shown below)

We have 0plant as main char and 0plant__ZBRAN is the nav attr with branch. We cannot use same variable for plant and Nav attr either in same query or else where.

But in my case ZBRAN is the characteristic (direct info object) (not 0PLANT) and the navigation attribute is 0PLANT__ZBRAN.

But I really agree to your replies. Thanks for your time.

Regards,

Sai.

former_member182470
Active Contributor
0 Kudos

Hi Saideep,

I want to correct you about your Nav Attr.

If your main char is ZBRAN and its Nav Attr is 0plant then your Nav Attr will look like ZBRAN__0PLANT but not 0PLANT__ZBRAN.

Thanks for understanding and agreeing to all my replies. Please cross check your variables and queries with respect to my explanations. Then, you will get the complete picture.

Regards,

Suman

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Saideep,

Nice question. It will help us to think in several ways.

We can use same variable on Characteristic (0SEG_LEV1) and navigation attribute (0BPARTNER__0SEG_LEV1).

Note: The variable would have been created on one object and the same has been reflected at all places. There will not be any issue with the overall result.

  • Since we have same master data, you will get blank entries in BPARTNER case if you restrict with 0SEG_LEV1 alone - for the places where there is no PARTNER entries.
  • You will get only PARTNER related segment levels only if you restrict with 0BPARTNER__0SEG_LEV1 (v/v)

In the Development system, it will show warnings (with red or yellow color). But it is just for our reference and the same warnings wont come further or in execution.

During transports it will not give any problem, because variable originated from some master object, that would have been transported before and also it will consider developed procedure instaed of usage behaviour.

Hope this provide you clarification.

regards,

kumar

Former Member
0 Kudos

Hi Suman & Anshu,

Thanks for the reply.

But the info object used is the same. The only difference is, in the first place, the characteristic is directly used in the report but in the second place, the characteristic is coming as navigation attribute of a master data object.

Thanks,

Sai.

former_member182470
Active Contributor
0 Kudos

As far as Bex is concerned, infoobject and Nav Attr will be treated as separate objects. Since the main infoobject is same, you would not get the same variable under the available list of variables to use in both the objects.

Why don't you create a new one similar to the existing one and use it, right?

anshu_lilhori
Active Contributor
0 Kudos

Hi,

Yes you may not use the same variable for two different characteristics.

You can create two different variables and specify the value of one variable and with the help of replacement path you can pass the same value to other variable.

Please share your exact requirement for more inputs on the same.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

Actually, it is not possible to use same variable. It doesn't show in the available list of variables. How come it is ok in Qua and Prod? Please check there might be using different variables in Qua and Prod.