cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed with conditions in Table View

Former Member
0 Kudos

Another question regarding the dashboard we are building:

We use a custom function module to display marketing attributes for a particular customer. There are three kinds of marketing attributes of which we want to display the value:

- Z_QUADRANT

- Z_SOW

- Z_WALLET

If I use the function module as a data service in Visual Composer and use a standard table view as ouput, we get these kind of output:

Atnam - Atwrt - Atflv - Atzhl (<-- these are the column labels)

Z_QUADRANT - 4 - 0 - 0

Z_SOW - 0 - 5 - 0

Z_WALLET - 0 - 75.000 - 0

I just want to display the data as follows:

QUADRANT: 4

SOW: 5%

WALLET: 75.000

So I need to hide the obsolete fields and values and just need to display the relevant values. How can I achieve this? I was guessing I needed to implement some sort of conditional formula like "IF atnam = Z_QUADRANT, display Atwrt(value)" or something, but I am terrible at these kind of things. Can somebody explain it to me or point in the right direction of some good documentation or guide on this? Thanks in advance!

Best regards,

Jan Laros

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The function module got changed in the backend and now these are the results:


Label   Label
A          1
B          2
C          3

How can I make sure that the values in the first column are mapped as follows:

A --> Wallet

B --> Share

C --> Quadrant

Former Member
0 Kudos

Hi Jan,

Here is the formula for your requirement. Try this.

if(@ATNAM=='EU_BP_NPS_QUADRANT','Quadrant',if(@ATNAM=='EU_BP_NPS_WALLET_SIZE','Wallet Size',if(@ATNAM=='EU_BP_NPS_SOW','Share of Wallet',@ATNAM)))

Regards

Basheer

Former Member
0 Kudos

Sealed the deal Basheer! Thanks again and full points awarded.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jan,

Check the below links for formula making.

http://help.sap.com/saphelp_nw04s/helpdata/en/bd/90db4238bbf140e10000000a1550b0/frameset.htm

/people/jakob.diness2/blog/2008/06/19/using-multi-search-functionality-from-one-field-in-any-visual-composer-application

For basic functionality check the below guide which describes the usage of all functions.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/63f2052e-0c01-0010-b9a2-e1f7457a...

Regards

Basheer

Former Member
0 Kudos

I now chose to use a form which uses the output from the tables. This is the table I use as input for the form:

http://tweakers.net/ext/f/DWmYaePz4gdzVhwMJ3naA5UQ/full.jpg

I use the following formula for the quadrant:

IF(@ATNAM=="EU_BP_NPS_QUADRANT",@ATWRT,"0")

This returns a value of "4" which is correct.

For SOW I use the following formula:

IF(@ATNAM=="EU_BP_NPS_SOW",@ATFLV,"WRONG")

Strangely enough the return value is "WRONG" in the form. What am I missing here?

Regards,

Jan

Former Member
0 Kudos

Hi Jan,

ATFLV is a numeric field so i think you cannot return a text("wrong") from the condition.

Regards

Basheer

Former Member
0 Kudos

Hi Basheer,

The condition is returning the text WRONG and that is displayed in the form at runtime. Any suggestions on how to make sure it returns the value of field ATFLV for records that meet the condition @ATNAM=="bladiebla"?

Best regards,

Jan

Former Member
0 Kudos

Any suggestions, Basheer? I hope you can help me as the top contributor you are in the VC 7.0 forums

Former Member
0 Kudos

Hi Jan,

The problem is the form will take only the first row of the table so the condition IF(@ATNAM=="EU_BP_NPS_QUADRANT",@ATWRT,"0") is only checked the first row and returned the result "4". But the next condition IF(@ATNAM=="EU_BP_NPS_SOW",@ATFLV,"WRONG") also checked for the first row so it can only returned the result "WRONG".

Try to change the 'Selection mode' property of the table as 'multiple' and in run time select all 3 rows using ctrl key. Now check all values are filled or not.

Regards

Basheer

Edited by: Basheer on Mar 3, 2009 4:38 PM

Former Member
0 Kudos

Yep, that is exactly the problem. I found that out last friday. But now; can we make sure that all rows are selected as a default?

Former Member
0 Kudos

Hi everybody,

Can anybody help me with this issue? Or is it just no possible to display the results from this function in a proper way? I can send a screenshot through mail if you wish.

Best regards and thank you in advance,

Jan Laros