Can we write an IIF statement in Designer??
Hi dears,
Can we write an IIF statement in Designer when we connect to the SAP BI 7.0 InfoCube?
I try to add a new dimension object to my universe design by using IIF statement.
At the below you can find my simple IIF statement.
<EXPRESSION>IIF([0FISCPER3].[LEVEL01].[[40FISCPER3]].[Value]='January',1,0)</EXPRESSION>
Is there anything wrong with syntax or smt??
my Business Objects env is BOXI 3.2
thanks a lot,
Omer
Hi,
this one includes samples:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0a45246-ce76-2b10-e688-f5c8206203eb
Ingo
Similar Messages
-
How can I write a SQL statement which checks if a table exists?
How can I write a SQL statement which tells me whether a table exists?
execute an sql query: select * from <tablename>
catch the exception n check whether the erroe code
matches the one that occurs for table doesn't exist
that's itHow is your answer any different from the one given in the first reply?
It isn't.
As WorkForFood says DatabaseMetaData has a bunch of methods for getting information about tables but this is more useful when you don't know the names of any of the tables.. it sounds like you do so I would concur SELECT from table is probably the quickest way to go. If it helps the Xopen error should be either S1000 or 42S01 (I think) but I would try and see if there is a specific vendor code for table not found/not exists error and check for that. -
Can we write the select statement on maintence view for data retreval
Can we use the select statement on maintence view
Regrads
DivaNo. U cannot write a select on maintenance view.
-
How can i write the following statements in Java ???
Hi Everyone,
I'm studying UML and according to my textbook, it says if 2 classes have the following relationship then it can be said that there's an association relationship between those 2 classesl.
Class A and B are associated if :
- an object of class A sends a message to an object of class B
- an object of class A creates an object of class B
- an object of class A has an attribute whose value are objects of class B or collections of objects of class B
- an object of class A receives a message with an object of class B as an argument.
However, I dunno how to write those stuff into Java codes. Can someone please kindly write Java codes for those sentences ?? Thanks everyone in advance.Sorry guys. I know I shouldn't have asked in the first place without giving it a try first. Yeah, I been doing
Java without understanding the concept of real OOP and its terms.
- an object of class A sends a message to an object of class B // ?????
- an object of class A creates an object of class B // A obj=new A();
- an object of class A has an attribute whose value are objects of class B or collections of objects of class B // A varB;
- an object of class A receives a message with an object of class B as an argument. // ?????
I get confused with the very first line and the last line . I dunno what it means by sending a message but according to what JoachimSauer mentioned
it's "calling a method" but does that mean even I called an object of the same class within , can i still refers it as sending a message ?? Like what if
i call a static method of the calling object because I dun think i create an object when I call a static method ?
Let's say
class ExampleOne
public ExampleOne()
ExampleOne egOne=new ExampleOne();
egOne.display(); //can i refer to this as egOne object sending a message to an object of itself so the receiver is also egOne ??
public void displayOne()
System.out.println("Just an exampleOne");
class ExampleTwo
public ExampleTwo()
ExampleTwo.display(); // here no object creation occurs , just ExampleTwo class sends a message to itself so there's no association i assume .
public static void displayTwo()
System.out.println("Just an exampleTwo");
public class Main
public static void main(String args[])
ExampleOne exampleOne=new ExampleOne();
ExampleTwo exampleTwo=new ExampleTwo();
}I'm confused. at first , i thought sending a message means passing values as parameters when we call a function and receiving a message means the function
being called receive values as parameters. Phew, please help me out of this. -
Can I write merge SQL statement having count(*)?
Hi this is a followup question of my previous post. I tried to use a merge SQL statement to solve my problem but now I bump into another problem.
Now I have a table where the field I need to update is a partial PK
when using a merge SQL statement, I have to put a where clause that check if count(*) = 1 because of the PK constraint
Where can I put the count(*) = 1 clause?
Here are the details:
I have two tables TA and TB, where TA contains the fields ID, FULLNAME, TYPE and TB contains the fields ID, FIRSTNAME
I want to update the firstnames in TB to be the firstnames from TA where TB.ID = TA.ID and TA.TYPE = 'ABC'
{ID, FIRSTNAME} are PKs but for the same ID, there can be more than 1 firstname.
e.g.
TA
ID | FULLNAME | TYPE
1 Caroline T ABC
2 Mary C DEF
3 Peter J ABC
TB
ID | FIRSTNAME
1 Caroline
1 Carol
1 C,
3 Peter
I need to update TB with the new firstnames from TA where type is 'ABC' but only for those fields that have count(TB.ID) = 1
when I try to run this SQL statement
merge into TB B using TA A
on (A.ID = B.ID and A.TYPE = 'ABC')
when matched then update set B.FIRSTNAME = substr(A.FULLNAME, 1, instr(A.FULLNAME, ',') - 1)
I got this error SQL Error: ORA-00001: unique constraint (TEST.PK_TB) violated
which I believe is because I updated those fields say ID = 1, all with 'Caroline'
that means I will have to add a clause having count(TB.ID) = 1
How would you do it?
Server is Oracle 11g
Thank you!Hi,
One way is to join ta and tb in the USING clause, and eliminate the duplicates there.
MERGE INTO tb dst
USING (
SELECT ta.id
, REGEXP_SUBSTR ( MIN (ta.fullname)
, '^[^,]*'
) AS firstname
FROM ta
JOIN tb ON ta.id = tb.id
WHERE ta.type = 'ABC'
GROUP BY ta.id
HAVING COUNT (*) = 1
) src
ON (scr.id = dst.id)
WHEN MATCHED THEN UPDATE
SET dst.firstname = src.firstname
;If you'd care to post CREATE TABLE and INSERT statements for your sample data, then I could test this.
I used REGEXP_SUBST instead of SUBSTR and INSTR to find the firstname, because I find it a little cleaner, and becuase it returns something even when there is no ',' in fullname, which I'm guessing is what you really want. (None of the fullnames in your sample data have ','s.) You could use SUBSTR and INSTR instead. -
Writing an IIF Statement in SSRS using IN or LIKE
Hello,
I am trying to write an IIf statement with multiple conditions and I am getting an error. Here is the current syntax:
=IIf(Fields!role_sk.Value=4174 AND Fields!settle_type_sk.Value
LIKE (4159,4160), Fields!company_name.Value,"")
Here is the error:
Any ideas? I think it has to do with the LIKE.
ThankThe syntax on the Like is incorrect. The Like operator expects a string to compare to that uses an * as a wildcard for any character(s).
=IIf(Fields!Name.Value Like "F*", Fields!Name.Value, "Not F")
This will display the name field if it starts with an "F" or "Not F" if not.
The "In" operator is not available in expression builder but is available in filters (Tablix, Group, etc.). To use that, the Value must be an array. You can create
an array of static text using the Split function in expression builder.
=Split("Me,You,Them",",")
This creates an array with 3 elements:Me, You, and Them. If any are matched in the field or expression you are comparing to in the filter, the record will be displayed,
otherwise not.
"You will find a fortune, though it will not be the one you seek." -
Blind Seer, O Brother Where Art Thou
Please Mark posts as answers or helpful so that others may find the fortune they seek. -
Writing IIF Statements for Sales Reps Goals
I have a query that takes all of the Sales Reps Goals and divides them into daily goals based on Potential sales days. This works perfectly when a rep starts before the beginning of the year. The issue I have is when a rep starts mid-year. If a rep starts
in June the goal should be divided by the remaining sales days left in the year and not the full year. I want to write an IIF statement that says if the rep's hire date is greater than 1/1/2015 then calculate based on remaining sales days. The query that works
for old reps is below:
SELECT uSERS.lifeguard_id
, GOALS.ProductID
, GOALS.GoalAmount / (SELECT SUM(WC.[Total Potential Sales Days (excluding Sat)])
FROM MISC.WorkingCalendar WC
WHERE WC.Year = YEAR(GETDATE())
GROUP BY [YEAR]
) * WC.[Total Potential Sales Days (excluding Sat)] AS GOALS
, WC.Month
, WC.Year
, DATEADD(DD,-1, DATEADD(MM,1,cast( (cast(WC.Month as varchar) + ' 1 , ' + cast(WC.Year as varchar)) as date))) AS GoalDatea
,CASE WHEN WC.Month= 'Jan' THEN '201501'
WHEN WC.Month = 'Feb' THEN '201502'
WHEN WC.Month = 'Mar' THEN '201503'
WHEN WC.Month = 'Apr' THEN '201504'
WHEN WC.Month = 'May' THEN '201505'
WHEN WC.Month = 'Jun' THEN '201506'
WHEN WC.Month = 'Jul' THEN '201507'
WHEN WC.Month = 'Aug' THEN '201508'
WHEN WC.Month = 'Sep' THEN '201509'
WHEN WC.Month = 'Oct' THEN '201510'
WHEN WC.Month = 'Nov' THEN '201511'
WHEN WC.Month = 'Dec' THEN '201512'
END AS YearMonth
FROM (
SELECT [CRM Rep Name] as CRMREPNAME
, CASE GoalAmount.GoalType
WHEN 'Yearly Life' Then 'L'
WHEN 'Yearly DI' then 'DI'
WHEN 'Yearly CI' then 'CI'
WHEN 'Yearly AI' then 'AC'
end as ProductID
, GoalAmount.GoalAmount
, YEAR(GETDATE()) AS GoalYear
FROM BAMaster.SalesRep SalesRep
unpivot (
GoalAmount FOR GoalType in([Yearly Life],[Yearly DI], [Yearly CI], [Yearly AI])) AS GoalAmount
) GOALS
JOIN VISION.Users Users
ON GOALS.CRMREPNAME = Users.user_code
JOIN MISC.WorkingCalendar WC
ON WC.Year = goals.GoalYear
where lifeguard_id is not null
order by lifeguard_idSales Days
Year
Month
Weekdays
Saturdays
Holidays
Total Potential Sales Days (including Sat)
Total Potential Sales Days (excluding Sat)
2014 Running Total
2015
Jan
20
5
2
25
20
20
2015
Feb
19
4
1
23
19
39
2015
Mar
22
4
0
26
22
61
2015
Apr
22
4
0
26
22
83
2015
May
20
5
1
25
20
103
2015
Jun
22
4
0
26
22
125
2015
Jul
22
3
1
25
22
147
2015
Aug
21
5
0
26
21
168
2015
Sep
21
4
1
25
21
189
2015
Oct
21
5
1
26
21
210
2015
Nov
18
4
3
22
18
228
2015
Dec
20
3
3
23
20
248
Grand Total
248
50
13
298
248
These are the sales days. A rep's hire date could be any date in 2015. -
Please Help!!!
How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
January 2014 January
2013 +/-
Region Entry Exit Total Entry Exit Total (Total of Jan2014-Total of Jan2013)
A 2 3
40 5 7 30 40-30= 10What is a table structure? Sorry cannot test it right now..
SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
FROM tbl
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Can I write Design-time for JSP custom tag(not JSF components)
I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
the Exception is shown as follow:
java.lang.ClassCastException
at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
[catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
at com.sun.rave.text.Document$5.run(Document.java:631)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
the Exception is shown as follow:
java.lang.ClassCastException
at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
[catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
at com.sun.rave.text.Document$5.run(Document.java:631)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) -
Hi,
Can we write CASE statement in Where clause of select statement...
I searched on net, i found that case statement can be written in the having clause..
But how about in the where clause....You could have easily tried it.
sql> with mytab as
2 (select 1 col1, 'one' col2 from dual
3 union all
4 select 2 col1, 'two' col2 from dual
5 )
6 select * from mytab
7 where (case when col1 = 1 then col2
8 else 'dummy' end) = 'one';
1 one -
Can we write function in select statement?
i have function and it has Out parameter,so in this case can i write select statement for my function to retrieve the value?
Or, you could use pipelined function - i guess.
Like ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.00
satyaki>
satyaki>create or replace type a_obj as object
2 (
3 e_nm varchar2(30),
4 e_sal number(7,2)
5 )
6 /
Type created.
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>create or replace type a_rec as table of a_obj;
2 /
Type created.
Elapsed: 00:00:00.00
satyaki>
satyaki>create or replace function multi_return(e_cd in number)
2 return a_rec
3 pipelined
4 is
5 cursor c1
6 is
7 select a_obj(ename, sal) as a_det_rec
8 from emp
9 where empno = e_cd;
10
11 r1 c1%rowtype;
12 begin
13 for r1 in c1
14 loop
15 pipe row(r1.a_det_rec);
16 end loop;
17
18 return ;
19 end;
20 /
Function created.
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>select * from table(cast(multi_return(&e_no) as a_rec));
Enter value for e_no: 7369
old 1: select * from table(cast(multi_return(&e_no) as a_rec))
new 1: select * from table(cast(multi_return(7369) as a_rec))
no rows selected
Elapsed: 00:00:00.02
satyaki>
satyaki>
satyaki>select * from emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO JOB1 DOB
7521 WARD SALESMAN 7698 22-FEB-81 226.88 500 30 SALESMAN
7654 MARTIN SALESMAN 7698 28-SEP-81 1815 1400 30 SALESMAN
7788 SCOTT ANALYST 7566 19-APR-87 598.95 20 ANALYST
7839 KING PRESIDENT 17-NOV-81 7260 10 PRESIDENT
7844 TURNER SALESMAN 7698 08-SEP-81 2178 0 30 SALESMAN
7876 ADAMS CLERK 7788 23-MAY-87 159.72 20 CLERK
7900 JAMES CLERK 7698 03-DEC-81 1379.4 30 CLERK
7902 FORD ANALYST 7566 03-DEC-81 5270.76 20 ANALYST
7934 MILLER CLERK 7782 23-JAN-82 1887.6 10 CLERK
7566 Smith Manager 7839 23-JAN-82 1848 0 10 Manager 23-JAN-89
7698 Glen Manager 7839 23-JAN-82 1848 0 10 Manager 23-JAN-89
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO JOB1 DOB
7599 BILLY ANALYST 7566 10-JUN-09 4500 30
12 rows selected.
Elapsed: 00:00:00.01
satyaki>
satyaki>select * from table(cast(multi_return(&e_no) as a_rec));
Enter value for e_no: 7698
old 1: select * from table(cast(multi_return(&e_no) as a_rec))
new 1: select * from table(cast(multi_return(7698) as a_rec))
E_NM E_SAL
Glen 1848
Elapsed: 00:00:00.00
satyaki>
satyaki>/
Enter value for e_no: 7599
old 1: select * from table(cast(multi_return(&e_no) as a_rec))
new 1: select * from table(cast(multi_return(7599) as a_rec))
E_NM E_SAL
BILLY 4500
Elapsed: 00:00:00.00
satyaki>Regards.
Satyaki De. -
Can we write Field Symbols in SELECT statement?
Hi
Can we write teh Fiel Symbols in the SELECT Statement ?
Can you give how to write it, with Example ?
Regards,
N.L.NarayanaHi,
Do you ask for that ? :
field-symbols: <field1> type any ,
<field2> type any.
assign component 'TOTO' of structure 'TATA' to <field1>.
assign component 'TUTU' of structure 'TATA' to <field2>.
select single toto
into <field1>
from tata
where tutu = <field2>.
Rgd
Frédéric -
Is it possible we can write a perform statement in BADI?
Hi ,
Is it possible we can write a perform statement in BADI? Can any one please let me know .
Thanks.Sure it is possible, you just have to reference the program inwhich the FORM exists. Since the call is in a method, where do you put the actual FORM, well you need to put it in a separate program or subroutine pool, then you can call it from within the method.
perform some_form in program zsubroutine_pool.
Regards,
RIch Heilman -
Can we write in Italic font on to the screen by using the WRITE Statement
Hello Abappers,
Can we write in Italic font on to the screen by using the WRITE Statement.
Please reply.
Regards,
RahulHi Rahul,
>Sandeep Wrote:
If you have the codepage for Italian language installed in your machine , you can write the same.
The OP is asking about italic font not about the language.
You need to upload font files ITALICI.TTF. Go to SE73 . Click on Install True type font and upload the italic file on to your system.
Check Font Attribute Italic
We already have help files on this. Refer:
[Using TrueType Fonts|http://help.sap.com/saphelp_nw70/helpdata/en/36/5b3438fd263402e10000009b38f8cf/content.htm]
I don't have idea on write statement in ABAP reports. Hope it cannot be.
Edited by: K.Manas on Dec 30, 2010 6:08 AM -
Can i write write statement at AT SELECTION-SCREEN
Hi all,
can i write write statement at AT SELECTION-SCREEN
ThanksHi,
If u want show something on the selection screen then u can write the logic like this instead of write statement
selection-screen begin of block b3 with frame title text-057.
selection-screen comment /1(66) text-056.
selection-screen comment /1(12) txtgl1.
selection-screen comment 14(3) splgl1.
selection-screen comment /1(8) txtgl2.
selection-screen comment 14(3) splgl2.
selection-screen comment /1(6) txtgl3.
selection-screen comment 14(3) splgl3.
selection-screen end of block b3.
For Display of the 'SPLGL Indicator Help'
initialization.
txtgl1 = 'Chq Dishonor'.
splgl1 = '- D'.
txtgl2 = 'WCT TDS'.
splgl2 = '- L'.
txtgl3 = 'IT TDS'.
splgl3 = '- I'.
Maybe you are looking for
-
Nested Divs - BG images not showing in IE 6
I'm using nested divs for the layout of the site below. The div tags have a BG image in each. Everything works fine except in IE6. In that browser none of the BG images show up. Here's the site: http://www.jesseyoung.com/phenopath/test.html CSS is pa
-
Was lied to back in March about a contract.
Ok, back story. Back in March I offered to help a friend with a phone line when she was on hard times. Asked the rep at the store if it would be possible to cancel that line when my other contract was up, by "swapping" the contract to my current ph
-
Error while creating vendor master (xk01)
i am trying to create a vendor master in t.code xk01, using standard objects, ie company code R300, purchasing org- R300, account group---LIEF. In address screen, i entered country as US, system is giving an error *Communication error with the exter
-
RFC lookup with context values importing and exporting
Hi, Input parameters for my RFC Lookup: one simple field: Occurrence 1 one table type: Occurrence N I am getting table values from RFC Lookup and I need to repeat all values in the target structure. I am not able to capture the all
-
Not receiving eternal emails on eXchange 2010
I have eXchange 2010 on Hyper V for delivering email sitting on Server 2008 R2 I am able to send outgoing mail but I am not receiving anything from outside: this is for all accounts.