cancel
Showing results for 
Search instead for 
Did you mean: 

Query Problem

Former Member
0 Kudos

In query i want to put following condition,

If 'Delivery Status'="X" Then

PO Balance=0

End IF

Delivery Status : Characteristics (Values:'X')

PO Balance : Calculated Key Figure ('PO Qty' -'Recd Qty')

means if the delivery status charecteristics value is "X" then put zero otherwise print PO Balance calculated key figure.

how can i do this?

Accepted Solutions (1)

Accepted Solutions (1)

former_member188325
Active Contributor
0 Kudos

HI Try this out:

1.Create two RKFs one for 'PO Qty x' and one for 'Recd Qty x'.

both should be restricted by 'Delivery Status'..'X'.

now Create a formula 'Po balance x' = 'PO Qty x'-'Recd Qty x'.

So this Fomula displays PO balance for delivery status 'x'.

U can hide two rkfs now.

2.now create one more formula 'PO balance' = ('PO Qty' -'Recd Qty')

<i>now in columns u will be having 'PO Qty','Recd Qty','Po balance x' ,and 'PO balance'.(and ofcourse two hidden rkfs)</i>

3.Now create one formula for required PO balance say 'PO balance-Req' = ( 'PO Balance x' <> 0 ) * 0 + ( 'PO Balance x' == 0 ) * NODIM ( 'PO Balance' ).

logic:'PO balance X' column will display some value whenever status is 'X' (becoz we restricted KFs with status X and difference of RKFs is 'PO balance x')

and 'PO Balance' will display values Regardless of status.

with that logic,when ever you have some value for 'PO Balance X' column, result would be 'PO Balance' otherwise 0.

Let's take an example: assume we have some value(including 0) for 'PO Balance X' = 10.

as per logic : 10 + 010 = 0( 'Po Balance-Req')

Assume we dont any value for 'PO Balance X'.

As per logic: 00 + 1 ('PO Balance') = 'PO Balance'.

P.S:Even if u have 0 for 'PO Balance X',formula will return 0.

Now you can hide 'PO Balnace X' and 'PO balance' also...

hope You understnad it.Let me know whether it works.if not we have alternative for this.

Thanks

Please don't forget assign points if it helps.

Message was edited by: Murali

former_member188325
Active Contributor
0 Kudos

Hi,

If you want to confirm whether this logic works or not...

Just drag and drop 'Status' characteristic into rows as first position. and enalble sorting order for this Characteristic (context menu---> properties of 'Status' Characteristic)...and from context menu of Material,set Suppress result rows to 'never'.

With this format,You can easily identify whether for all materials with Status 'X',PO balance is 0.

Thanks

Former Member
0 Kudos

Hi Murali,

thankx sir, problem is solved, if u have any study material on BEX please send me at suyash_vibhandik@yahoo.com

given u full marks

regd

suyash

former_member188325
Active Contributor
0 Kudos

Hi,

Your are always welcome!

Assigned full points!

But u have unassigned 6 points which are laready assigned ;(!

What kind of material on Bex you are expecting?

Thanks

Former Member
0 Kudos

any study material which will be helpfull for query designing.

regards

Suyash

former_member188325
Active Contributor
0 Kudos

Hi,

Hope You have BW Reporting Made easy 2.1c material?If you dont have it,i will send it across...Its very useful for reporting.

Thanks

edwin_harpino
Active Contributor
0 Kudos

hi Suyash,

also take a look this

sap help

bex query designer, web reporting to mobile bi etc ...

http://help.sap.com/saphelp_bw33/helpdata/en/5b/30d43b0527a17be10000000a114084/content.htm

http://help.sap.com/saphelp_bw33/helpdata/en/a2/06a83a4bd5a27ae10000000a11402f/frameset.htm

there is 'bw reporting made easy' book/cd

http://www.amazon.com/gp/product/1893570665/102-9958356-5476147?v=glance&n=283155

web reporting, javascript etc

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/13dc9190-0201-0010-71a4-a9f...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b1089290-0201-0010-288c-98e...

docs 'how to' related in service.sap.com/bi (need oss id)

-> service and implementation -> how to

for variable exit, virtual char/kf, table interface, bw ep reporting etc etc

some available in this sdn forum (no id required)

https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/e7100a2e-0a01-0010-4fb3-d0578f754105 [original link is broken]

e.g

How to Calculate with Attributes

This document explains how to calculate with attributes.

How to Use Variable Time References in Currency Conversion

This document explains how to use variable time references in currency conversions.

How to Enhance Web Printing

This document explains how to modify the format of BW Web Applications to improve the layout when printing from the web.

How to Enhance the Standard Web Query Template

This document explains how to upload a new web template (ZQUERY_TEMPLATE.htm) to the BEx Web Application Designer.

.....

www.bwexpertonline.com, vb macro etc

http://www.bwexpertonline.com/downloads.cfm?session=

e.g

http://www.bwexpertonline.com/downloads/Nissen.doc

http://www.bwexpertonline.com/downloads/boeke04.doc

http://www.bwexpertonline.com/downloads/fox04.doc

and all Raja's weblogs on bw query etc e.g

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b7658119-0a01-0010-39a9-b60...

and consider reporting performance, check especially Prakash weblog for good query design

/people/prakash.darji/blog/2006/01/27/query-creation-checklist

/people/prakash.darji/blog/2006/01/26/query-optimization

oss note

557870 'FAQ BW Query Performance'

and 567746 'Composite note BW 3.x performance Query and Web'.

BW Performance Tuning Knowledge Center - SAP Developer Network (SDN)

[original link is broken]

performance docs on query

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fad...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/064fed90-0201-0010-13ae-b16...

Former Member
0 Kudos

sir,

i have plant also in rows, means first when report runs it shows plant in rows when we drilldown to material it shows material in rows.

Your formula is working when we drildown it, but when material is not in rows only plant is their it will not work.

I want it should work in any case.In that report we have Material,PoNo,CalenderDate,Vendor,plant to drilldown.

please guid asap.

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Doodle

can you give me the steps to do this.

regd

Suyash

former_member188325
Active Contributor
0 Kudos

Hi,

do you have any KF which givies some value always when delevery status is 'X'only?

Thanks

Message was edited by: C C

Former Member
0 Kudos

"Balance Po Qty" is CKF which gives always value but i want it should be zero when delivery status is ="X"

Suyash

former_member188325
Active Contributor
0 Kudos

Hi,

can you give your Query structure..i.e. rows,columns...??

Former Member
0 Kudos

rows : Material

Col : "Po Qty", "Received Qty", "Balance Qty" (POqty-RecdQty)

and in this "Balance Qty" column i want zero if delivery status is "X".

Former Member
0 Kudos

Hi,

you can do that with a formula using boolean expressions.

Siggi