RMPS - Case indicator and generation rule
Hello gurus!!!
I need your help. My problem is:
I try to define the generation rules for a case (case indicator), instead of a record number in RMPS.
Iu2019m using the case attributes to fill the information that I need to generate the rule.
But, when I create a case the case indicator isnu2019t completed.
I've read that I have to use the record attributes to define the generation rule but I donu2019t know if the case attributes could be inherit to the record attributes. Do you know if a bapi exit for transfer the attributes between the case and the record?
Should I customize something for generated the rule for the caso as well as the transaction SRMREFRULE.
For example:
I would like define a rule with the attribute Z_NUM_CASE but I donu2019t know if I shoul customizing this attribute in the srmregedit for the record. And, Do the record inherit the attributes for the case? should I customizing something? Should i use a bapi for transfer the values between the case and the record?
Thanks
Hi Husalban,
as you have marked this question as solved, I would kindly ask you to post if you have found a suitable solution for your requirement and how it was realised. This will help all other forum users to get similar issues solved too.
Best regards,
Christoph
Similar Messages
-
Mail - Forwarding attachments manually and with rules - how do I keep my attachments?
I have the latest updates of Lion on by MacBookPro (late 2010 model). I use mail to receive mail from my business account (Exchange account) and my personal account (IMAP account). Up until this summer, everything was working peachy with the system. I have multiple folders in my accounts and many rules to sort the mail and some that automatically forward mail messages to other people in my office who are also on exchange server.
Since this summer, we really noticed in August, we have noticed that the attachements are sometimes missing from emails I send out either automatically through rules (attachements never appear in the emails on the receiver's end) or manually, sometimes they receive, sometimes they don't (most of the times, but not always, when they don't work, it is a pdf in attachement, although it has happened on occasion with docs and jpgs or other graphics files). The bizarre thing is that on occasion a receiver replies to my email telling me there is no attachement, and although the email I receive doesn't show a paperclip, the attachament is actually embedded in the email!
If I write a new mail, and manually add an attachement, it seems to work.
My IT guy, who runs the exchange server says that it is bizarre because he can see the attachement in my email, but when it is delivered it disappears, but if he opens it at the server, it reappears. He has made all the latest updates and has trolled the support sites, but has found no solution.
I receive a newsletter everyday, which is a rather large 8-10 Mb pdf. My rule tells it to automatically forward to the receptionnist so that she can send it out to her mailing list. The message I receive always has the attachment, but in the forwarded message the attachment dissappears. In this case, when I look at message in my sent mail folder - there is no attachment. I tried using re-direct instead of forward as a rule and it still did the same thing...
I guess I want to know if anyone is experiencing the same issue, and if anyone has any other solutions to make forwarding work better.
P.S. When I use the IMAP account, the forwarding doesn't seem to be a problem, however I can't figure out how I could run a rule for an email I receive on my exchange account so that it forwards via my IMAP account. Also this would not be ideal, as then all my business contacts would get mail from my personal account...
Thanks for any help you could provide.Uncheck:
But you'll still have to navigate around the icon. -
Dear all,
first of all thanks for reading this topic :-)
In our enviroment, we have a Exchange 2010 server (Version: 14.01.0438.000), whitch is installed with all server roles (CAS, HT and MB) on one server(OS is Windows Server 2008 R2 Enterprise). This exchange server sends all external mails to a smarthost (Redddox).
We are using Outlook Anywhere, Active Sync and OWA.
Now, we need to migrate this Exchange server to another one, because we think, that the server´s OS is corrupt and also, there are wrong licenses installed. The "new" server will have the same OS Version and Exchange Version (2010).
Currently I´m a little afraid, to install a new one - because I think when I will install the CAS and HT role, something will happen in my productive enviroment (Autodiscover, SMTP Connectors, Cerficates a.s.o.).
To install the mailbox role, I think this will not affect anything.
Can you help me a little bit in what to take care of? Do I need to preconfigure something, before I will install the second exchange? What about the version / service pack of Exchange to install? Must it be the same as installed on the first one?
Any help would be appreciated!
JennieHi Jennie,
Below are the steps if you are not planning to upgrade.
1) Install new Exchange2010-SP3 Server all roles Please check
this
2) Install the certificate in the new server by requesting a duplicate from the 3rdparty CA. Or export from the existing Exchange 2010 and import to the new one. Please check
this
3) Set your autodoscover, OAB, ECP, OWA URLs same as the current Exchange. Below artciles will help you to do that.
For OAB, Autodiscover, EWS please check steps 5,6,7in this
For setting OWA and ECP URLs please check
this.
4) Move few mailboxes as a test and check. If no errors move the rest.
5) Move your OAB generation server to the new server. Please check
this
6) Move you public folder contents to the new server you have. Please check
this
7) Configure your firerwall to receive emails on the new server and other services like EWS, OWA, ActiveSync.
8)
Add the new server as the source server and in the current send connector and remove the old server from the send connector.
Shutdown the server for a couple of days and monitor. So you will know if you missed something.
Uninstall Exchange2010 from the add remove programs.
Thanks, MAS
Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. -
Cost Centers and distribution rules
I need to allocate costs to profit centers and would like to have the costs be allocated first to the department cost center then distributed to product profit center by %.
Example: An invoice is first allocated to the sales department, then the distribution rule will allocate the cost between 4 product lines (33 % chemical A, 33 % chemical b, 17 % chemical c and 17 % chemical d).
How would I setup the profit centers, cost centers and distribution rule to accomplish the above task.
Thank you,
WayneHi Fred,
I assume you using 8.81?
1. Administration - General Settings - Cost Accounting : Tick "Use Multidimensions" option
2. Financial - Cost Accounting - Dimensions : Tick "Dimension 1" and "Dimension 2".
Give proper description to each dimension, in your case maybe "Department" to Dimension 1 and "Product" to Dimension 2
3. Financial - Cost Accounting - Cost Centers : Create your intended cost centre, "Sales" cost centre with dimension "Department", "Chemical A" to "Chemical D" with dimension "Product"
4. Financial - Cost Accounting - Distribution Rules :
As for your intention to allocate the invoice to Sales Department, since you want to allocate it 100% to Sales Department, you don't need to create a distribution rules, since B1 will automatically create a distribution rule with 100% allocation for each cost centre you created.
As for your production cost allocation, create a distribution rule with your code "DR-P01" as an example, choose dimension "Product", set the Total with "100". In the detail section, choose each cost centre (Chemical A to D), enter respective value and click "Add" button. -
Maintain Field Mapping and Conversion Rules//LSMW
Hello Friends,
I want to add new fields in the step.no.5(Maintain Field Mapping and Conversion Rules).
Indetail i'm going to upload the GL balances, for DR and CR line item fields are same so system is not accepting the same field value, so i have added 1 for the CR line item fields like in the below example.
BSEG-WRBTR(Dr line item)
BSEG-WRBTR1(Cr line item)
but BSEG-WRBTR1(Cr line item) field not displaying in the step.no.5 to mapping to source field.
please let me know the solution for this.
thanks
swapna.Hi,
I would like to ask few questions.
1. Are you using batch input recording or using any program for uploading. (through LSMW)
2. Whether all your debit or credit line items are same every transactions. I believe they should be same, because you are uploading the balances.
You should not have two similar fields for example, if it is WMBTR, then again WMBTR should not be there, it should WMBTR1 and WMBTR2. Make sure you have done the field mapping properly. When you have done the field mapping all the fileds must have been mapped. If any one of the fields are not mapped, then it will not be uploaded.
Please see the following LSMW sample guide:
http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
Maintain Object Attributes Do the recording - Make sure that you do not have two fields with the similar name. If you have two fields with the same name double click on the field name and add1 or 2 to differentiate between field names. Just Copy those fields and descriptions in excel sheet, delete the blank lines, then in excel data => text to columns, your field names and descriptions will be now in two columns. Copy them, then put your cursor on the next sheet, then edit => Paste Special => Transpose, all the columns will become your rows. Now your file structure is ready. Maintain Source Structures Give some unique structure name and description Maintain Source Fields Here you add the fields that are being used in EXCEL first sheet, just copy them and make all the fields as C (Constant) and then give length of 60 for all fields. Maintain Structure Relations Though structure relations are already created just go to this step, click on edit, then click on create structure relation, just accept the message stating that the structure relation has already been created. Maintain Field Mapping and Conversion Rules Do the field mapping for all the fields, all the fields willl be stretched and you will see five rows against each row. In case if there is any row that has NOT stretched means, there is something wrong in the mapping. Maintain Fixed Values, Translations, User-Defined Routines There is nothing to be done at this step. You can simply ignore this. Specify Files Make you must have saved your excel file as .txt (before saving make sure you have copied data from sheet2 to sheet 3 and then sheet 3 is saved at tab delimited file. Text (Tab delimited) Select your file, make SURE that you have select "TABULATOR" radio button and say OK. Assign Files Go to this step and click on Create assignment button and accept the message and say ok. Read Data Remove two check boxes and just click on execute button. See the log. Make sure you have number of entries (lines) in your excel file are matching with this. Display Read Data Display data give 1 to 999 lines and double click on one of the line and see whether fields are mapped correctly are not. Convert Data Execute and see the log match the number of entries. Display Converted Data Display converted data, give 1 to 999 and double click on one of the line and see whether fields are mapped correctly or not. Create Batch Input Session Check on Keep Batch Input sessions check box, then execute. If you select that check box, even after execution it will be there and you can analyze what happened. Run Batch Input Session (Takes you to SM35) Go to SM35 select the batch and click on process button (execute), make sure you have checked right hand side first three check boxes and FOREGROUND (because you want to save what it is creating) Say OK Keep on press ENTER on your key board in order to move the session further. If you follow these steps along with the guide, surely you should be successful. There may be small difference between the file and what I have explained but ultimately the purpose is same. Hope this is useful and let me know in case if you have any issues.
Regards, Ravi -
Special GL indicator and document type
Hello ,
I 'm not well acquainted to the FI applications but I know special GL indicator and document type are two important thing on Financials .
I want to learn for what purpose these two fields used . Also I would like to learn interactions between FI GL and FI AR . If you can share a detailed explanation about my questions, it will be much appreciated
thanks in advance
guestHi,
Special GL Indicator's you have to declere for special cases like Down payment and Bills of exchange etc..
those tables are stored in different different tables and not in regular tables.
Doc Type
based on document type we will identify that Vendor Invoices , Customer Invoices , memo, JV.
each doc type is having a seperate no range.
FI-gl handled all GL issues.
FI-AR handleds all customer issues.
we will get more help at http://help.sap.com/
Reg
Madhu -
Can we call the Human Task operations and the Rule Designer, etc. from outs
Hi,
I just had one of my customers ask me -
Can we call the Human Task operations and the Rule Designer, etc. from outside the SOA Suite ??
Since these are independent applications, and that they are based on Service Oriented Architecture, I should be able to call these services from outside Oracle SOA Suite (SCA) for reuse.
In case you have any idea about the possibilities, could you share some real world examples / URLs please ?
Thanks & RegardsHi Vaibhav,
Yes, you are right. We are using Oracle SOA suite 11g.
My question is, can these Web Services be directly accessed from, say a .NET application without using BPEL PM, or is using BPEL a must to invoke these services in Human Task operations, Rule Designer, etc ?
Regards -
OEE Report: KPI formulas and aggregation rules?
Hello,
is there documentation about the formulas and aggregation rules used in the OEE Report? Customers will only trust the KPIs in this report if they can verify them.
Formulas & Aggregation
How are the KPIs calculated?
How are the KPIs aggregated, if a work center or resource type is selected instead of a single resource?
Data & Variables
Which data is used? Where do the variables used in the formulas come from? E.g. which tables and columns or which SQL SELECT statements are used?
There is just very little information about the OEE Report in the online help or in the "SAP ME for Discrete Industries" document. And the MII "OEE Report Action", where obviously all the magic happens, is a black box.
Best Regards,
MartinHi Daniele,
Is Saichand correct in assuming that you have SUM setup in the BMM layer? If so, follow Saichand's recommendation.
If you are specifying the aggregation in the Answer Request itself, then try this.
Let's say this is your situation:
SELECT DIMENSION, MEASURE_1
FROM CRITERIA1
UNION ALL
SELECT DIMENSION, MEASURE_2
FROM CRITERIA2
UNION ALL
SELECT DIMENSION, MEASURE_3
FROM CRITERIA3
UNION ALL
SELECT DIMENSION, MEASURE_4
FROM CRITERIA4
Change it to this:
SELECT 'CRITERIA1' CRITERIA, DIMENSION, MEASURE_1 MEASURE
FROM CRITERIA1
UNION ALL
SELECT 'CRITERIA2' CRITERIA, DIMENSION, MEASURE_2 MEASURE
FROM CRITERIA2
UNION ALL
SELECT 'CRITERIA3' CRITERIA, DIMENSION, MEASURE_3 MEASURE
FROM CRITERIA3
UNION ALL
SELECT 'CRITERIA4' CRITERIA, DIMENSION, MEASURE_4 MEASURE
FROM CRITERIA4
Then in the combined criteria, add two new measures:
new_measnure1 = SUM(CASE WHEN CRITERIA in ('CRITIERA1','CRITIERA1') then MEASURE END
new_measnure2 = AVG(CASE WHEN CRITERIA in ('CRITIERA3','CRITIERA4') then MEASURE END
NOTE: The syntax for the new_measure* may need to reference the saw naming convention, ie. saw0 = CRITIERIA, saw1 = DIMENSION, saw2 = MEASURE.
That should work out for you.
Good luck and let me know if this helps.
-Joe -
Copy config and payroll rules & shemas and 2 years data into ECC6 from 4.7
Hi ,
we need to copy config and payroll rules & shemas and 2 years data into ECC6 from 4.7 enterprise .
Please let me now How to do it ?
I will give points for suitable answers pl
Thanks,
SunithaHi Sonu Gupta,
Can please explain bit more ...
Config and Data both i wanted to move 4.7 sytem to ECC6 system . both are diffrent systems .
what is this peace list ?How to create ?
in case of Config how to trsnfer .
Please Help Me ...
Sunitha
Edited by: Sunitha Reddy on Apr 10, 2008 3:34 PM -
Open Interface for Approved Supplier Lists and Sourcing Rules
Hi All,
Is there an open interface or an API available for Appeoved Supplier Lists and Sourcing Rules.
Thanks and Regards,
MPHHi sandeep,
I prefer to use the API mentioned.
However this is in Oracle Manufactirung and we dont use that module instead I want to define them in Oracle Purchasing.
can I still do it in Purchasing using the same API.
Further as per the document there are 3 entities
01) Sourcing Rule/Bill of Distribution
02) Receiving Organization
03) Shipping Organization
Do I need to define all 3 in order to make it work?
Thanks and Regards,
MPH -
Discontinuation indicator and follow up material.
Hi,
I am facing the strange issue for which i need your expertise. The requirement is like:
1. "X" material is discontinued and "Y" is as follow-up in two plants A & B. Discontinaution group and follow-up group has also been assigned in the BOM.
2. Now The client want to reverse the settings . means "Y" should be discontinued and "X" should be follow-up in both plants A & B.
Now I have removed the discontinuation indicator and follow up material from "X" in both plants. But when I am going to discontinue the "Y" material and putting " X" as a follow-up material, The system is giving the message "The specified follow-up material results in recursiveness
Message no. M3609
Diagnosis
You have entered a follow-up material. However, the BOM explosion for the follow-up material leads to the discontinued material, resulting in unpermissible recursiveness.
Procedure
Enter another follow-up material or cancel the entry.
Please suggest me where I am missing in my settings and what is the reason for this message.
Regards
Deepak SharmaDear ,
Check the following :
1.Validity of the Bill Of Material or any deletion flag is set in the present BOM.
2.Please check the following SAP notes :
Note 161742 - Consulting note: BOM recursion/low-level code 999
Note 839879 - Trace 'BOM is recursive'
Note 139517 - Recursiveness for follow-up materials
Note 42891 - Recursiveness check
Hope this will help you to figure it out
Regards
JH -
CASE STATEMENTS AND CASE EXPRESSIONS IN ORACLE9I PL/SQL
제품 : PL/SQL
작성날짜 : 2001-11-13
CASE STATEMENTS AND CASE EXPRESSIONS IN ORACLE9I PL/SQL
=======================================================
PURPOSE
아래의 자료는 Case 문에서 oracle 8.1.7과 Oracle 9i의 New Feature로 8.1.7에서는
sqlplus 에서만 가능했고, 9i 부터는 pl/sql 까지 가능하다.
Explanation
1. Oracle 8.1.7 Feature
Oracle 8.1.7 에서 Case 문은 Decode 문과 유사하지만, 기존의 decode 문을 쓰는 것보다
더 많은 확장성과 Logical Power와 좋은 성능을 제공한다. 주로 나이와 같이 category 별로
나눌때 주로 사용하고 Syntex는 아래와 같다.
CASE WHEN <cond1> THEN <v1> WHEN <cond2> THEN <v2> ... [ELSE <vn+1> ] END
각각의 WHEN...THEN 절의 argument 는 255 까지 가능하고 이 Limit를 해결하려면
Oracle 8i Reference를 참조하면 된다.
The maximum number of arguments in a CASE expression is 255, and each
WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices,
you can nest CASE expressions. That is expr1 can itself be a CASE expression.
Case Example : 한 회사의 모든 종업원의 평균 봉급을 계산하는데 봉급이 $2000보다 작은경우
2000으로 계산을 하는 방법이 pl/sql을 대신하여 case function을 사용할 수 있다.
SELECT AVG(CASE when e.sal > 2000 THEN e.sal ELSE 2000 end) FROM emp e;
Case Example : 나이를 column으로 가지고 있는 customer table을 예로 들어보자.
SQL> SELECT
2 SUM(CASE WHEN age BETWEEN 70 AND 79 THEN 1 ELSE 0 END) as "70-79",
3 SUM(CASE WHEN age BETWEEN 80 AND 89 THEN 1 ELSE 0 END) as "80-89",
4 SUM(CASE WHEN age BETWEEN 90 AND 99 THEN 1 ELSE 0 END) as "90-99",
5 SUM(CASE WHEN age > 99 THEN 1 ELSE 0 END) as "100+"
6 FROM customer;
70-79 80-89 90-99 100+
4 2 3 1
1 SELECT
2 (CASE WHEN age BETWEEN 70 AND 79 THEN '70-79'
3 WHEN age BETWEEN 80 and 89 THEN '80-89'
4 WHEN age BETWEEN 90 and 99 THEN '90-99'
5 WHEN age > 99 THEN '100+' END) as age_group,
6 COUNT(*) as age_count
7 FROM customer
8 GROUP BY
9 (CASE WHEN age BETWEEN 70 AND 79 THEN '70-79'
10 WHEN age BETWEEN 80 and 89 THEN '80-89'
11 WHEN age BETWEEN 90 and 99 THEN '90-99'
12* WHEN age > 99 THEN '100+' END)
SQL> /
AGE_G AGE_COUNT
100+ 1
70-79 4
80-89 2
90-99 3
Example
2. Oracle 9i Feature
Oracle 9i부터는 pl/sql에서도 case문을 사용할 수 있으면 이것은
복잡한 if-else 구문을 없애고, C언어의 switch문과 같은 기능을 한다.
아래의 9i pl/sql Sample 및 제약 사항을 보면 아래와 같다.
Sample 1:
A simple example demonstrating the proper syntax for a case
statement
using a character variable as the selector. See the section entitled
'Restrictions' at the end of this article for details on which PLSQL
datatypes may appear as a selector in a case statement or
expression.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
begin
case achar
when 'A' then dbms_output.put_line('The description was Excellent');
when 'B' then dbms_output.put_line('The description was Very Good');
when 'C' then dbms_output.put_line('The description was Good');
when 'D' then dbms_output.put_line('The description was Fair');
when 'F' then dbms_output.put_line('The description was Poor');
else dbms_output.put_line('The description was No such Grade');
end case;
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 2:
A simple example demonstrating the proper syntax for a case
expression
using a character variable as the selector. See the section entitled
'Restrictions' at the end of this article for details on which PLSQL
datatypes may appear as a selector in a case statement or
expression.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
description varchar2(20);
begin
description :=
case achar
when 'A' then 'Excellent'
when 'B' then 'Very Good'
when 'C' then 'Good'
when 'D' then 'Fair'
when 'F' then 'Poor'
else 'No such grade'
end;
dbms_output.put_line('The description was ' || description);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
NOTE: The above simple samples demonstrate two subtle differences in the
syntax
required for case statements and expressions.
1) A case STATEMENT is terminated using the 'end case' keywords; a
case
EXPRESSION is terminated using only the 'end' keyword.
2) Each item in a case STATEMENT consists of one or more
statements, each
terminated by a semicolon. Each item in a case expression
consists of
exactly one expression, not terminated by a semicolon.
Sample 3:
Sample 1 demonstrates a simple case statement in which the selector
is
compared for equality with each item in the case statement body.
PL/SQL
also provides a 'searched' case statement as an alternative; rather
than
providing a selector and a list of values, each item in the body of
the
case statement provides its own predicate. This predicate can be any
valid boolean expression, but only one case will be selected.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
begin
case
when achar = 'A' then dbms_output.put_line('The description was
Excellent');
when achar = 'B' then dbms_output.put_line('The description was Very
Good');
when achar = 'C' then dbms_output.put_line('The description was
Good');
when achar = 'D' then dbms_output.put_line('The description was
Fair');
when achar = 'F' then dbms_output.put_line('The description was
Poor');
else dbms_output.put_line('The description was No such Grade');
end case;
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 4:
This sample demonstrates the proper syntax for a case expression of
the
type discussed in Sample 3 above.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
description varchar2(20);
begin
description :=
case
when achar = 'A' then 'Excellent'
when achar = 'B' then 'Very Good'
when achar = 'C' then 'Good'
when achar = 'D' then 'Fair'
when achar = 'F' then 'Poor'
else 'No such grade'
end;
dbms_output.put_line('The description was ' || description);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 5:
This sample demonstrates the use of nested case statements. It is
also
permissable to nest case expressions within a case statement (though
it
is not demonstrated here), but nesting of case statements within a
case
expression is not possible since statements do not return any value.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
anum1 number := &anum1;
anum2 number := &anum2;
answer number;
begin
case anum1
when 1 then case anum2
when 1 then answer := 10;
when 2 then answer := 20;
when 3 then answer := 30;
else answer := 999;
end case;
when 2 then case anum2
when 1 then answer := 15;
when 2 then answer := 25;
when 3 then answer := 35;
else answer := 777;
end case;
else answer := 555;
end case;
dbms_output.put_line('The answer is ' || answer);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 6:
This sample demonstrates nesting of case expressions within another
case
expression. Note again the absence of semicolons to terminate both
the
nested case expression and the individual cases of those
expressions.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
anum1 number := &anum1;
anum2 number := &anum2;
answer number;
begin
answer :=
case anum1
when 1 then case anum2
when 1 then 10
when 2 then 20
when 3 then 30
else 999
end
when 2 then case anum2
when 1 then 15
when 2 then 25
when 3 then 35
else 777
end
else 555
end;
dbms_output.put_line('The answer is ' || answer);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Although PL/SQL anonymous blocks have been used in all of the examples
so far,
case statements and expressions can also be used in procedures,
functions, and
packages with no changes to the syntax.
The following samples are included for completeness and demonstrate the
use of
case statements and/or expressions in each of these scenarios.
Sample 7:
This sample demonstrates use of a case statement in a stored
procedure.
Note that this sample also demonstrates that it is possible for each
of
the items in the case body to consist of more than one statement.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
create or replace procedure testcasestmt ( anum IN number ) is
begin
case
when anum = 1 then dbms_output.put_line('The number was One');
dbms_output.put_line('In case 1');
when anum = 2 then dbms_output.put_line('The number was Two');
dbms_output.put_line('In case 2');
when anum = 3 then dbms_output.put_line('The number was Three');
dbms_output.put_line('In case 3');
when anum = 4 then dbms_output.put_line('The number was Four');
dbms_output.put_line('In case 4');
when anum = 5 then dbms_output.put_line('The number was Five');
dbms_output.put_line('In case 5');
else dbms_output.put_line('The description was Invalid input');
dbms_output.put_line('In the else case');
end case;
end;
exec testcasestmt(&anum);
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 8:
This sample demonstrates the use of a case statement in a stored
package.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
create or replace package testpkg2 is
procedure testcasestmt ( anum IN number );
function testcasestmt_f ( anum IN number ) return number;
end testpkg2;
create or replace package body testpkg2 is
procedure testcasestmt ( anum IN number ) is
begin
case
when anum = 1 then dbms_output.put_line('The number was One');
dbms_output.put_line('In case 1');
when anum = 2 then dbms_output.put_line('The number was Two');
dbms_output.put_line('In case 2');
when anum = 3 then dbms_output.put_line('The number was Three');
dbms_output.put_line('In case 3');
when anum = 4 then dbms_output.put_line('The number was Four');
dbms_output.put_line('In case 4');
when anum = 5 then dbms_output.put_line('The number was Five');
dbms_output.put_line('In case 5');
else dbms_output.put_line('The description was Invalid input');
dbms_output.put_line('In the else case');
end case;
end;
function testcasestmt_f ( anum IN number ) return number is
begin
case
when anum = 1 then dbms_output.put_line('The number was One');
dbms_output.put_line('In case 1');
when anum = 2 then dbms_output.put_line('The number was Two');
dbms_output.put_line('In case 2');
when anum = 3 then dbms_output.put_line('The number was Three');
dbms_output.put_line('In case 3');
when anum = 4 then dbms_output.put_line('The number was Four');
dbms_output.put_line('In case 4');
when anum = 5 then dbms_output.put_line('The number was Five');
dbms_output.put_line('In case 5');
else dbms_output.put_line('The description was Invalid input');
dbms_output.put_line('In the else case');
end case;
return anum;
end;
end testpkg2;
exec testpkg2.testcasestmt(&anum);
variable numout number
exec :numout := testpkg2.testcasestmt_f(&anum);
print numout
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 9:
This sample demonstrates the use of a case expression in a stored
package.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
create or replace package testpkg is
procedure testcase ( anum IN number );
function testcase_f ( anum IN number ) return number;
end testpkg;
create or replace package body testpkg is
procedure testcase ( anum IN number ) is
anumber number := anum;
anothernum number;
begin
anothernum :=
case
when anumber = 1 then anumber + 1
when anumber = 2 then anumber + 2
when anumber = 3 then anumber + 3
when anumber = 4 then anumber + 4
when anumber = 5 then anumber + 5
else 999
end;
dbms_output.put_line('The number was ' || anothernum);
end;
function testcase_f ( anum IN number ) return number is
anumber number := anum;
anothernum number;
begin
anothernum :=
case
when anumber = 1 then anumber + 1
when anumber = 2 then anumber + 2
when anumber = 3 then anumber + 3
when anumber = 4 then anumber + 4
when anumber = 5 then anumber + 5
else 999
end;
dbms_output.put_line('The number was ' || anothernum);
return anothernum;
end;
end testpkg;
variable numout number
exec testpkg.testcase(&anum);
exec :numout := testpkg.testcase_f(&anum);
print numout
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
제약 사항
다음의 databasetype은 case 문에서 지원되지 않는다.
BLOB
BFILE
VARRAY
Nested Table
PL/SQL Record
PL/SQL Version 2 tables (index by tables)
Object type (user-defined type)
All of these types except for object types face a similar restriction
even for if statements (i.e. they cannot be compared for equality directly) so this is unlikely to change for these types. Lack of support for object types is simply an implementation restriction which may be relaxed in future releases.
Reference Ducumment
Oracle 8.1.7 Manual
NOTE:131557.1I have done the following code but doesn't
like the statement of - "case(butNext)". What do you mean "doesn't like" -- did you get an error message?
I'm guessing it won't compile because you're trying to switch on a Button.
I tried something
like "g.fillOval(100,50,70,90, BorderLayout.NORTH)"...no that doesn't make sense. You only use BorderLayout.NORTH when you're adding components to a BorderLayout layout manager. An oval is not a component and fillOval isn't adding a component and Graphics is not a Panel or layout manager.
Would appreciate it if someone could tell me how to position
shapes using the graohic method. I think the problem is that you're confusing shapes with components. -
i would like to know how can i compare a switch case 1 and case 2 in C# is it possible to do that? obs i am a begginer :) I tried to do it with search and sort but it did not go well
let me give you an example if you add a word case 1( lagg ord) how can i compare that word with case 2 words ( in case 2 already exist 5 words)
here is the my program
using System;
namespace ConsoleApplication1
class Program
static void Main(string[] args)
//Meny
Console.WriteLine("\n HÄNGA GUBBE\n");
Console.WriteLine(" 1) Lägg till ord");
Console.WriteLine(" 2) Lista alla ord");
Console.WriteLine(" 3) Spela");
Console.WriteLine(" 4) Avsluta");
bool utgång = false;
do
int Valet;
Console.Write("\n\tVälj 1-4: \n ");
try
Valet = int.Parse(Console.ReadLine());
catch (Exception)
Console.WriteLine("Du skriver fel character!\n" +
"\nSkriv bara mellan 1 och 4");
continue;
switch (Valet)
case 1:
Console.WriteLine("\n lägg ett till ord! ");
var input = Console.ReadLine();
break;
case 2:
Console.WriteLine("\n Lista med alla ord :\n");
string[] array = { " Lev", " Skratta", " Gledje", " Gråt", " Njut" };
Array.Sort<string>(array);
foreach (var c in array)
Console.WriteLine(c);
Console.WriteLine("\n");
break;
case 3:
string guesses, bokstäver;
Console.Write("\n Hur många fel får man ha? ");
guesses = (Console.ReadLine());
Console.WriteLine(" Utmärkt, då spelar vi!\n");
Console.WriteLine(" Felgisningar :" + "0/" + guesses);
Console.Write(" Gissade bokstäver ");
bokstäver = (Console.ReadLine());
Console.WriteLine("Aktuellt ord");
Console.Write("Gissa bokstav : " + bokstäver + " \n");
break;
case 4:
Console.WriteLine("\n HEJ DÅ! \n");
Console.Beep();
utgång = true;
break;
//avbryter while loopen, avslutar spelet
} while (!utgång); -
Error in Asset Accounting Specify Intervals and Postings Rules
Hi,
I am configuring for Asset Accounting and when I go to this part:
Asset Accounting > Integration with the General Ledger > Post Depreciation to the General Ledger > Specify Intervals and Postings Rules
I get the error "Company code XXXX is not defined" (message no. AC519).
The company code specified in the error was deleted in the system before. I am thinking that there is a table where this company code is not yet deleted. How can I solve this? Thanks a lot.Create the company again, make your changes and delete the company again
-
How to use, Case function and Filter in Column Formula?
Hello All,
I am using case function and also would like to filter value to populate.
Below is showing error :
case
when '@{Time}' = 'Year' then "Time"."Fiscal Year"
when '@{Time}' = 'Quarter' then "Time"."Fiscal Quarter"
when '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')
else ifnull('@{Time}','Selection Failed') end
Thanks, AKwhen '@{Time}' = 'Month' then FILTER ("Time"."Fiscal Period" USING "Time"."Fiscal Period" NOT LIKE 'A%')I dont think Filter this works here or any other data types except number.
Try to use option Column's->Filter->Advanced->Convert this filter to SQL
If helps mark
Maybe you are looking for
-
Page up & page down keys don't work in Preview
why don't the Page Up and Page Down keys on an extended (Apple) keyboard work in Preview? very annoying. only the up-down arrows seem to work, and only one line at a time. i'd like to jump whole pages, or something close to that. if anyone knows a ke
-
My iMac G5 was running too slow. I tried everything I could think of or find in the literature, but finally had to start over by reinstalling OX and then Snow Leopard. I lost all my folders and applications, so I used the Migration Assistant on my Ma
-
Issue in reverse engineering the model source is excel
Hi Everyone, I am new to ODI, i am trying to export the excel file data into oracle table. For doing this created physical and logical schema for Excel file and Oracle database. Tried to created a Model and reverse engineer the excel file to get the
-
We want to create a test Magic Triangle where we can test major changes before deploying them in production. We have a Mac Xserver 10.6 (matches production), Active Directory at Windows 2008 R2 functional level (Production is at 2003), and NetApp fil
-
Email Alert Configurationu0085
Hi All, Already I have create the Alert and I just need to send the errors coming in to my Alert Inbox to my SMTP email Inbox. I followed the below steps I followed from one of the XI forum. To send an EMAIL, assign an EMAIL ID to the corresponding u