cancel
Showing results for 
Search instead for 
Did you mean: 

Filter (exclusion of one company code) on Query in Visual Composer

Former Member
0 Kudos

Hi all,

I'm trying to create a model in VC which shows two charts from one query.

Chart 1

- Containing data from only company code 0001

Chart 2

- Containing data from all companies except 0001

Chart 1 is no problem. The challenge lies within the exclusion of CC 0001 for Chart 2. I can't get it to work.

Anyone got an idea? We are trying to use as minimal queries as possible so creating another query is not an option.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use variable in your query for the company code. Then drag the query on the storyboard twice and set the value for the variable as input for the queries. That's it. For more details check the [Modeler's Guide |http://help.sap.com/saphelp_nw70/helpdata/en/42/c2ba85545e3116e10000000a1553f7/frameset.htm].

Best Regards,

Marcel

Former Member
0 Kudos

Marcel,

Thanks for your input. However this doesn't work for excluding a value.

When I try to exclude using an operator like <>, != or NOT in the formula, I get: Syntax error near !=

How can I solve this?

Edited by: V. Beumer on Jul 8, 2008 10:51 AM

Answers (1)

Answers (1)

JUNG
Participant
0 Kudos

Hello,

It seems Visual Composer have been enhanced in SAP NetWeaver 7.0 SP 12 :

http://help.sap.com/erp2005_ehp_05/helpdata/en/4a/c7d38b0e10415b99db44c8b6becd77/frameset.htm

"Excluding" filters

Enhanced

The Filter operator has been enhanced to enable you to define filters that exclude data using negative expressions such as Does not contain, Is not equal to, Is not greater than and so on.

Unfortunatly I do not find this enhancement in SAP NW 7.31.

Rgds

Gilles

marc_estvez
Explorer
0 Kudos

Hello, you can do the same (exclude values) in 7.31 by using the expression editor in the column "Field" when you are defining the operator.

Marc

JUNG
Participant
0 Kudos

Hello,

Could you kindly share a screen shot ?

In filter I have columns :

  • Field
  • Condition (is equal to, starts with, ends with, contains) : in previous VC releases we had more.
  • Expression

In "field" column I have a field name so I do not fully understand how to use the expression editor.

Rgds

Gilles

marc_estvez
Explorer
0 Kudos

Hello,

I mean you don't have to select any field but you have have to define an expression in the column called "Field" that returns true or false.

For example, I want to exclude the records who have the value '01' in the field called LEIHG so I will define the operator in this manner:

Regards

Marc