How to acheive IF elseif elseif else condition using std mapping functions
How to perform the following mapping using standard graphical functions:
if (a = 1)
result.addValue("3");
else if (a = 2)
result.addValue("6");
else if (a = 5)
result.addvalue("7");
else if (a = 10)
result.addValue("11");
else
result.addValue(a);
can this requirement be acheived without using a UDF?
Regards
bhasker
UDF is better way to get this done.
you try like this using Standard function:
Const 3 /THEN
(A equals 1) IF (output of ifThenElse) ->TragetFiled
\ELSE
/THEN /(output of IfThenElse input to else of first If)
IF /
\ELSE
Like wise for other conditions....
In else part of ifThenElse, give the output of second ifThenElse. here in ths case you need four ifThenElse.
CodeGenerated:
/ns0:MT_/targetFIELD = iF(const([value=3]), stringEquals(/ns0:MT_XML_OB/A=, const([value=1])),
iF(const([value=6]), stringEquals(/ns0:MT_XML_OB/A=, const([value=2])),
iF(const([value=7]), stringEquals(/ns0:MT_XML_OB/A=, const([value=5])),
iF(const([value=11]), stringEquals(/ns0:MT_XML_OB/A=, const[value=10])), /ns0:MT_XML_OB/A=))))
Ritu
Edited by: Ritu Sinha on Apr 13, 2009 2:48 PM
Similar Messages
-
Spliting files based on condition using multi mapping with BPM
Hi All,
Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
Thanks
Govindu.Hi All,
Sorry for mistake this question for Exchange infrastructure guys.
Thanks,
Govindu -
how do i remove this feature? where using google maps the input box has this in it( Enter your address line 2 here)/In hotmail new email on the enter page it reads (Enter your email here) .
You have the remove these statements before entering an address , and before sending an email or with the email it will stay on the email , google maps will not work.Try this -
<img src="assets/jpgs/Prodigy Logo Large 2014.jpg" width="180" height="180" alt="" style="display:block;">
What you are seeing as whitespace is the space reserved for glyph descenders on any element that is rendered within a text box (i.e., an inline element). By making the image "display:block" you eliminate that space because a block element doesn't have descenders. If that works to your satisfaction then you can give the logo an id, and create a CSS selector containing that block style. -
Using iPad mail program I have a draft of an email. I have attempted to "cancel" this and "delete draft" but the email stays on my screen. How can I exit this so that I can use other email functions?
Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot. -
How to Count schedule lines in IDoc ORDERS05 using XSLT Mapping
Hi Experts,
In a Scenario where we are sending Purchase order (ORDERS05) to SAP SNC using XSLT Mapping,
where in we need to count the no. of schedule lines against the Purchase Order line.
As in Schedule line segment there is no such provision, so it needs to be handle in XSLT mapping to count the schedule lines.
Can you all please guide me how to go about the same.
Regards,
Nitin PHi Satish,
Thank you very much for the reply,
as there is only Quantity and other information is maintained against schedule lines how we can count the schedule line repeatation against PO line ? Is that very simple as you suggested or some other consideration also needs to be taken.
Please clarify the same and let me also know if there are some standard documents also for the same.
Regards,
Nitin P -
How to replace namespace tag with new value using -JAVA MAPPING
Hi Guys,
I need to replace namespace Tag in Target xml with a new value.
For Eg: My namespace Tag is - <ns0:TestHeader xmlns:ns0="http://0020.TestHeader.SS.com">
I want My target xml to have value- <ns0:TestHeader>
How can i achieve it using JAVA mapping?
Can you provide me the code to do so.Sarjana,
Not well-formed XML is only possible by Java Mapping. Please use below replace logic in Java map.
inputContent.replaceAll("<ns0:TestHeader xmlns:ns0=\"http://0020.TestHeader.SS.com\">", "<ns0:TestHeader>");
Link1, Link2. -
How to acheive this scnerio in PL/SQl using collections
Hi All,
In my apllication we are handling two types of procedures which runs based on the jobs.
Due to some problem few records where got missed in prouduction.
We have tried to run this jobs manaually one by one and it is taking time to execute..
I have got a suggetsion from my senior to do in a collection and run this packages at a time..
Here is my exact scenerio, can you please help me out to implemnet in collections..
Steps:
Populate the missing records namely ordered, event sequence, Start date, end date, region in to plsql table/collection. ( Hard-coded since this will run the code
for a date which will take less time and take less record).
looping the plsqltable/collection for missing records
Running the procedure p_Daily with startdate and end date parameter
-- if the above executed successfully we need to execute second procedure i.e p_Region procedure by checking records in f_daily_report exist/relevant table
(Id and sequence).
Running the procedure p_region with start date and region id ( checking whether id and sequece is exist f_daily_report table).
end loop
The above steps which i have explained needs to achievd thru collections, can anybody helps me out on this.
Note:
1. All the missing jobs wil fal under differnt date rane groups.
2. For second job i.e p_region i have mentioned that it will run based on start date and region id..This job will run on three differnt region id's..We can find the
region id based on by joining f_region and d_region table. It seems that these misisng records belongs to all three regions
Hope u all understand my scenrio. can you please help me out..
Thanks in advance,
Anoo..Anoo wrote:
Hi,
Hope you have not clear my question..The reason is i want to know how we can achieve my problem in collection
rather than select statement.. Even though if we can get in simple statement is not advisible in my case..That is the reason why i was looking collections...
Rather than providing data is it possible to how we can proceed in collections.That's like saying you want to write poor code that performs slowly rather than fast and performant code.
Without clear explanations and examples of data and output, there doesn't appear to be a valid reason for using collections. The reason you're not getting many responses on your thread is because you're not explaining clearly what is required with examples. Please read {message:id=9360002} for an idea of what people need from you in order to help you. -
How do you flush a device's buffer using LabVIEW GPIB functions?
I know the VISA Flush function is an alternative, but I started my program with the low level GPIB functions and it would be a huge task switching now, so if anyone knows how I would do the buffer clear I would greatly appreciate it if you can show me how it's done. Thanks.
OtmanYour comment about an indicator getting "clogged up with data" doesn't make any sense. The contents of a string or array indicator can get large and slow things down but a numeric indicator cannot get clogged up. If the data stops making sense, then you are incorrectly reading the instrument and converting that data to a numeric. With your comments about the device transmit buffer, I suspect you have occasionaly set the byte count too low and unread bytes are there that you then read the next time. As long as the instrument is fairly new, it will send out a termination character (typically EOI) that will terminate the read. You can then set the read count to some arbitrarily high number to ensure you've got the entire tr
ansmit buffer contents. It's also possible that you periodicaly have an error condition where the instrument is sending unexpected information. For example, if it normally sends a floating point number as a result and then it sends an error message string, you might not be intrepreting it correctly. -
How do you pass an array of characters using the DLL functions
I have exported C code into my DLL and I want to know how to pass an array of characters using LabVIEW.
Mont;
If you want to pass a string from LabVIEW to your dll, and you do NOT change size of the string, you can use a C String pointer (CStr), which is equivalent to (unsigned) char *.
If you do modify size of the string, pass string as a LabVIEW structure (LStrHandle).
The example "Passing a Variety of Data Types from DLL to LabVIEW" is an excellent starting point. Also make sure you check the manual "Using External Code in LabVIEW".
Regards;
Enrique
www.vartortech.com -
How do I retrieve records from a table using JCO RFC Function Call
Hi
I am totally new to SAP Java Progamming. And I would like to know if I am writing code correctly. I read some tutorials in the Internet but I am still not sure if I am doing it the correct way.
This is what my vendor has given me.
My question is whether this is the correct optimum way to do get the customer detail based on an array of input values for the customer reference number.
Input:
I_CUSTNO - Any number customer IDs. This is a table similar to I_CUSTDETL
Output:
Structure name: I_CUSTDETL
Note: The CUSTID column has been added in the structure to identify the address of the relevant customer id
Field details:
Field Name Data Type Length
CUSTID Character 10
COMPANYNAME Character 40
EMAIL Character 40
This is my code:
JCoFunction function = connect.getFunction("Z_GET_CUSTOMER");
JCoTable cust = function.getTableParameterList().getTable("I_CUSTNO");
cust.appendRow();
cust.setValue("CUSTID", "10000700");
cust.appendRow();
cust.setValue("CUSTID", "10000701");
cust.appendRow();
cust.setValue("CUSTID", "10000702");
connect.execute(function);
JCoTable table = function.getTableParameterList().getTable("I_CUSTDETL");
System.out.println("Table size: " + table.getNumRows());
for (int i = 0; i < table.getNumRows(); i++, table.nextRow()) {
String custid= table.getValue("CUSTID").toString();
String companyname = table.getValue("COMPANYNAME").toString();
String email = table.getValue("EMAIL").toString();
System.out.println("----
System.out.println("Record Number::" + i + "::");
System.out.println("----
System.out.println("Value custidis::" + custid+ "::");
System.out.println("Value companyname is::" + companyname + "::");
System.out.println("Value email is::" + email + "::");Hi,
Answer to your question :whether this is the correct optimum way to do get the customer detail based on an array of input values for the customer reference number? is
YES.
Regards,
Ganga -
Query on handling else condition in Oracle Business Rules.
Hi all.
I am working on Jdeveloper 11.1.1.1.0 Business Rules. While creating rules... i am able to write if conditions around the facts and attributes and also replicate the same using decision tables and is able to derive the action.
My Question is.. can i write an else condition which should be executed when none of the if condition are matched. If we can how... Instead of else condition, is there any way that we can initialize the facts and attributes to be derived to a default value.
Please help me guys in this... If this is not the right foru,... please redirect me to the correct one.. coz i couldnt find a forum for oracle business rules..
Thanks
EldhoThanks a lot for the response..
I have posted the query in
Query on handling else condition in Oracle Business Rules.
Thanks
Eldho -
Yesterday I received an email from Apple <[email protected]> requiring me to verify an apple ID with my email address; how can I prevent/stop somebody else from using my email as an ID??
JRHDZ wrote:
Yesterday I received an email from Apple <[email protected]> requiring me to verify an apple ID with my email address; how can I prevent/stop somebody else from using my email as an ID??
You can't. Only the person that signed up for that Apple ID (using that email address as the name) and has the password to that Apple ID can modify that Apple ID house a different email account.
Nothing about your personal email account is at risk. It just means that someone probably made a typo (maybe they have a very similar email address to yours), and they never got the verification email. You did instead. No one at Apple can change that for you.
Again; only the person that has the password to that Apple ID can adjust the primary email address of that account.
How to reset your Apple ID password.
Go to iforgot.apple.com and type in your Apple ID, then click 'Next'.
Verify your date of birth, then click 'Next'.
You'll be able to choose one of two methods to reset your password, either E-Mail Authentication or Answer Security Questions.
If neither method works, then go to https://getsupport.apple.com
(If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
Choose 'More Products & Services', then 'Apple ID'.
A new page will open.
Choose 'Other Apple ID Topics', then 'Lost or forgotten Apple ID password'.
Click the blue 'Continue' button.
Select the contact option that suits your needs best. -
How to skip first TWO Lines of .txt file using XSLT Mapping
Hi Friends ,
I have an .txt file in has the format as
<TEST>
4564564545
56456444566
56465
How can i skip the first two Lines when i am writing the XSLT Mapping ?
That <TEST> and empty line shouldn't go the rfc .
How can i skip and sent to rfc using XSLT Mapping ?
Best Regards .,
V.Rangarajanyou can avoid the empty lines in your File Content Conversion by defining offset.
<i>Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.</i>
ref: http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
then the generated XML after FCC will not have the empty lines. -
So, now I've been trying to learn If, elseif and else statements properly. And I'm doing something wrong.
A guy told me his website would email specific people based on what zipcode they put in the contact form on his site. I was wondering how he did it, so I tried to recreate something similar.
Here is what I've done:
1. I created a file called zipcodes.php
2. In this file it has set every zipcode to a variable. For instance:
<?php
$Nashville=("37010" or "37027" or "37040" or "37055" or "37152");
?>
3. I created a form with a field called 'zip'.
4. I created a php file called phpmail.php to send this form.
5. Right now, the top of this file looks like this:
<?php
include("zipcodes.php");
$zip=$_POST["zip"];
//NASHVILLE//
if ($zip==$Nashville)
$my_email = "[email protected]";
//Knoxville//
if ($zip==$Knoxville)
$my_email = "[email protected]";
//Huntsville//
if ($zip==$Huntsville)
$my_email = "[email protected]";
...etc.
This doesn't work. It sends them all to the last option which is texas or [email protected]
Before I had the first if set to if and all the others set to elseif
But that didn't work. It sent all the emails to Nashville email I made.
If statements must work though in this way. Because if I have this:
if ($zip==$Nashville)
$my_email = "[email protected]";
//Anything Else//
else $my_email = "[email protected]";
It works. Meaning if a zipcode is in Nashville it goes to one email - and if it isn't in Nashville - it goes to hippityhoppity.
Am I not getting something about all of this? Thanks!Yeah I know. I also wish it'd let me use PHP syntax instead of plain. I think it'd make things easier to read.
Here is the entire script. It is made to work with any form with little regard for what the form has in it. So long as there is an email field and a zip field.
<?php
include("zipcodes.php");
$zip=$_POST["zip"];
if (in_array($zip, $Nashville)) {
$my_email = ".....";
}elseif (in_array($zip, $Knoxville)) {
$my_email = ".....";
}elseif (in_array($zip, $Huntsville)) {
$my_email = ".....";
}elseif (in_array($zip, $Florida)) {
$my_email = ".....";
}elseif (in_array($zip, $Georgia)) {
$my_email = ".....";
}elseif (in_array($zip, $SouthCarolina)) {
$my_email = ".....";
}elseif (in_array($zip, $NorthCarolina)) {
$my_email = ".....";
}elseif (in_array($zip, $Pennsylvania)) {
$my_email = ".....";
}elseif (in_array($zip, $Maryland)) {
$my_email = ".....";
}elseif (in_array($zip, $Virginia)) {
$my_email = ".....";
}elseif (in_array($zip, $Texas)) {
$my_email = ".....";
} else { $my_email = ".....";
$continue = "/";
$errors = array();
if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}}
function recursive_array_check_header($element_value)
global $set;
if(!is_array($element_value)){if(preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc: )/i",$element_value)){$set = 1;}}
else
foreach($element_value as $value){if($set){break;} recursive_array_check_header($value);}
recursive_array_check_header($_REQUEST);
if($set){$errors[] = "You cannot send an email header";}
unset($set);
if(isset($_REQUEST['email']) && !empty($_REQUEST['email']))
if(preg_match("/(%0A|%0D|\n+|\r+|:)/i",$_REQUEST['email'])){$errors[] = "Email address may not contain a new line or a colon";}
$_REQUEST['email'] = trim($_REQUEST['email']);
if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}}
if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";}
function recursive_array_check_blank($element_value)
global $set;
if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}}
else
foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);}
recursive_array_check_blank($_REQUEST);
if(!$set){$errors[] = "You cannot send a blank form";}
unset($set);
if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;}
if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");}
function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");}
$message = build_message($_REQUEST);
$message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL."";
$message = stripslashes($message);
$subject = "FormToEmail Comments";
$headers = "From: " . $_REQUEST['email'];
mail($my_email,$subject,$message,$headers);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Dreamweaver Tutorial - Contact Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<div>
<center>
<b>Thank you <?php print stripslashes($_REQUEST['name']); ?></b>
<br>Your message has been sent
<p><a href="<?php print $continue; ?>">Click here to continue</a></p>
</center>
</div>
</body>
</html> -
If elseif else echo statement with radio buttons
Hi everyone Please help me out here. I have a standard php file with 4 groups of questions (radio groups). The user must answer "yes" to ALL 4 questions where after "You Qualify" will echo on the same page. If any of the questions are answered "No" to, then "you do not qualify" must echo on the same page. If no answer is selected - then no echo This sounds like a simple if elseif else statement, but for some reason I just cant get it right. Could anyone please help me out with this? Herewith code that I have tried:
Do you like apples? Yes No
Do you like oranges?
Yes No
Do you like pears?
Yes No
Do you like lemons?
Yes No<?php
if ($a > $b) {
echo "a is bigger than b";
} elseif ($a == $b) {
echo "a is equal to b";
} else {
echo "a is smaller than b";
?>
Maybe you are looking for
-
How do i find a user manual for i Pad Model A1219
where do i find a user manual for an iPad model A1219?
-
WRT54G- Set up Wizard Password Issue
I just got my linksys and am using the setup wizard. On #8 it keeps prompting me for a password. I use the default "admin", the system runs the checking computer function, I get to @ 98% and then just keeps asking me for a password over and over.
-
All the tables used for Organisation details
Hi All, Kindly request to specify all the tables ( or atleast possible list of tables ) that are updated when we change / insert / modify the organisation details for a transaction number in CRM. Thanks and regards.
-
Editor closes program when panorama is selected elements 7
editor closes program when panorama selection of photos is selected, elements 7
-
Hi am new in abap .am tin smart forms am trying drag and drop the fields .but it is giving the problem .is there any settings to drag and drop the fields. In smart forms. Is any other way pls give me a solution.