XDOFX if-then-else command testing of space and numeric value
Hi,
I have the following xdofx statement in a RTF template to display the value of one variable or another, depending on the value it contains: (the variable can contains both space or null or a numeric value).
<?xdofx: If Amount_1 = " then 'display amount_2' else If Amount_1 = 0 then 'display amount_2' else 'display Amount_1' end if?>
Result: When Amount_1 variable contains space or null value, then this If-then-else statement works. But When Amount_1 contains a number such as 0, it gives error "SBL-OMS-00203" (when it's checked against [=" ] in If condition). What's causing this? Is XDOFX being confused to test a variable that supposedly a character string (default by testing against [ =" ]), but find a number in the variable?
Any work around solution? (So [=" ] and [=0 ] can both be specified against a variable in an if-then-else statement in XDOFX).
Thanks a lot.
A.
try
<?xdofx:if (Amount_1 =’’) then ‘display amount_2’ else if (Amount_1 =’0’) then ‘display amount_2’ else ‘display Amount_1’ end if?>or
<?xdofx:if (Amount_1 =’’) then ‘display amount_2’ else if (to_number(Amount_1) =0) then ‘display amount_2’ else ‘display Amount_1’ end if?>
Similar Messages
-
ADD COMMAND-link 2 fields where numeric value matches
I have a Add Command that looks like this.
SELECT *
FROM "AS400"."MTMODBC"."#MTMTRP" "_MTMTRP"
LEFT OUTER JOIN (
SELECT CHGTRP, CHGFCD, Max(CHGDTE) As Max_CHGDTE, Max(CHGTIM) As Max_CHGTIM
FROM "AS400"."MTMODBC"."#MTMTCHG" "_MTMTCHG"
WHERE CHGFCD= '076'
GROUP BY CHGTRP, CHGFCD
) C1
ON
TRIP#=CHGTRP
LEFT OUTER JOIN "AS400"."MTMODBC"."#MTMGAS" "_MTMGAS" ON (TRIP#=GTRIP#)
LEFT OUTER JOIN "AS400"."MTMODBC"."#MTMMBR" "_MTMMBR" ON (TCSTKY=MCSTKY)
LEFT OUTER JOIN "AS400"."MTMODBC"."#DMSFAC" "_DMSFAC" ON (TDELZP=DFZIP and DFADDR1=TDELVA)
LEFT OUTER JOIN (SELECT TRIP# AS NTRIP#, THCPCS
FROM "AS400"."MTMODBC"."#MTMND" "_MTMND") N1
ON TRIP#=NTRIP#
WHERE TINSCD= '0342' and
(TRPFLG Like 'S%' OR
TRPFLG in ('X1','X2','X3')) and
TREASC not in ('53','81') and
TAPTDT>=20101001 and
TAPTDT<=20110331
The bolded fields are Alpha numeric and I would like to match them on values
EX: DFADDR1 has a value 123 High St
and TDELVA has a value 123 High St
How do I match them on the first 3 digits?
Thanks!
Achett13Hi,
What about using substing function in the join.
(TDELZP=DFZIP and substr(DFADDR1,0,3)=substr(TDELVA,0,3))
I have assumed that numeric filed length is fixed.Which is the database?
Regards,
Bilahari M -
Sum function within if/then/else (xdofx:if)
I'm attempting to display a total at a particular group within my report. This total is conditional and should choose to display a placeholder value or the sum of another placeholder value (in a child group).
I have been able to vary my output based on the value I want to check: FIXED_QUOTE_FLAG - I have the if/then/else working in a simplified fashion
I can display literals and some placeholders correctlly eg. print a literal value of 00110011 or the value of placeholder QUOTED_PRICE
I can also display a calculated placeholder, using sum within the group I am concerned with: sum (current-group()/ACTIVITY_CHRG)
But when I try to get everythign working together ...
I cannot get the sum to work inside the if/then/else condition. The result is NULL (blank in HTML output).
The following is the snippet which is not working correctly:
<?xdofx:if FIXED_QUOTE_FLAG = 'Y' then QUOTED_PRICE else sum (current-group()/ACTIVITY_CHRG) end if?>
Message was edited by:
gareth_adamsonTo answer you first question, perhaps sum is not a supported function in the xdofx namespace. It's annoying when this problem comes up because xdofx namespace seems to be the only way to do if then else clauses. I'm not entirely certain on the above, but you could resort to using BI Publisher's built-in if statement.
For your problem, something like this:
<?if: FIXED_QUOTE_FLAG='Y'?>
QUOTED_PRICE
<?end if?>
<?if: FIXED_QUOTE_FLAG!='Y'?>
<?sum(current-group()/ACTIVITY_CHRG)?>
<?end if?>
EDIT:
There is a way to do if else without xdofx namespace. It is done with <?choose:?> <?when:?> and <?otherwise:?> tags. Here is example syntax copied from Tim Dexter's blog:
<?choose:?>
<?when:count(TRX_NUMBER) > 0?>
Invoice Table
<?end when?>
<?otherwise:?>
No Data Found
<?end otherwise?>
<?end choose?>
To answer the second question about a running total, you will need to use the <?xdoxslt:set_variable($_XDOCTX,'var_name',var_value)?> and the <?xdoxslt:get_variable($_XDOCTX,'var_name')?>. This method of working with variables is the only method that allows you to update a variable. This makes it good for running totals. Consult the official user guide under "Creating an RTF Template" the section about using variables and calculating running totals.
So, in your problem, once you get the first part working, you will have to add that value to your running total. It will look something like this:
<?xdoxslt:set_variable($_XDOCTX,'running_total',xdoxslt:get_variable($_XDOCTX,'running_total') + conditional_value)?>
Remember to initialize the running total to zero! Hope this helps.
Thanks,
Matt Soukup
Message was edited by:
Matt Soukup -
Nested if-then-else with double condition
Hi everybody, I tried to see on the forum how to build a complex if-then-else statement....but I didn't still find an answer
So, I'll explain my situation:
First I have to check if the field PROJ_DT_TO is null or not and then the language parameter:
1. if the field PROJ_DT_TO IS NULL then I have to check the language parameter:
a) if this last one is equal to 'English' I want to write inside my template 'Today',
b) if instead is equal to 'Greek' I want to write 'Σήμερα'
2. else if the field PROJ_DT_TO IS NOT NULL, again, I have to check the language parameter:
a) if this last one is equal to 'English' I have to write <?format-date:PROJ_DT_TO;'MMMM yyyy'?>
b) if instead is equal to 'Greek' I have to write <?format-date-and-calendar:PROJ_DT_FR;‘MMMM yyyy’;'GREGORIAN';'Europe/Athens'?>
I used the following syntax...but it didn't work...
<?choose@inlines:?>
<?when@inlines:PROJ_DT_TO=''?>
<?xdofx:if $p_language = 'Ελληνικά' then 'Σήμερα' else if $p_language = 'Αγγλικά' then 'Today' end if?><?end when?>
<?otherwise@inlines:?>
<?xdofx:if $p_language = 'Ελληνικά' then <?format-date-and-calendar:PROJ_DT_FR;‘MMMM yyyy’;'GREGORIAN';'Europe/Athens'?> else if $p_language = 'Αγγλικά' then <?format-date:PROJ_DT_TO;'MMMM yyyy'?> end if?>
<?end otherwise?>
<?end choose?>
The first piece, until the first <?end when?> instruction works....it's the <?otherwise@inlines:?> and the rest which doesn't work.....
If, instead, I use (without reaching my goal):
<?choose@inlines:?>
<?when@inlines:PROJ_DT_TO=''?><?xdofx:if $p_language = 'Ελληνικά' then 'Σήμερα' else if $p_language = 'Αγγλικά' then 'Today' end if?><?end when?>
<?otherwise@inlines:?>
<?format-date:PROJ_DT_TO;'MMMM yyyy'?><?end otherwise?>
<?end choose?>
I see the date PROJ_DT_TO even if always in the date format 'MMMM yyyy'
Anybody knows how can I rewrite my statement in order to reach the if-then-else situation I metioned above ?
Thanks in advance
Best Regards
AlexHi Vetsrini, thaks for your answer and your hint !!
I tried your code, but without the command 'when@inlines' doesn't work...
So I tried this :
<?choose@inlines:?>
<?when@inlines:PROJ_DT_TO=''?>
<?xdofx:if $p_language = 'Ελληνικά' then 'Σήμερα' else if $p_language = 'Αγγλικά' then 'Today' end if?>
<?end when?>
<?otherwise@inlines:?>
<?format-date:PROJ_DT_TO;'MMMM yyyy'?>
<?end otherwise?>
<?end choose?>
and It works..
But, look at this ! I discovered on the manual that inside the Preferences it's possible to set the Report Locale with the language you want.....and if I set my Report Locale in Greek, using the code above I correctly see all dates in Greek....but ALWAYS !!
I need to see dates in Greek or English dinamically according to the value of the parameter p_language passed inside the template at the beginnig (<?param@begin:p_language?>).
Even if inside the code there is the double condition ($planguage = 'Ελληνικά' or $p_language = 'Αγγλικά') for the two cases PROJ_DT_TO='' or PROJ_DT_TO !='', I see ALWAYS dates in the language set inside the Locale Report....
Is there a way to manipulate the Report Locale Setting and make it dinamic ?
Thanks in advance
Alex
So this preference is static, even if inside my report I have the parameter p_language I can see the data and headings with -
IF - THEN - ELSE in RTF Template in MSWord
I have an adjustment column that I am trying to calculate.
<?xdofx:if AC_EARNINGS[REPORTING_NAME='Regular'and RATE_MUL is NULL] then CURRENT_AMOUNT else 0 end if?>
When I use this I do not get any errors but do get zeros where I would expect a value.
I have had suggestions for using XSL-FO but this seems to be for more formatting than what I am needing.
Any suggestions.
ThanksLooks like I spoke too soon. When we were looking at the data I discovered that I did not take it far enough. I missed some date qualifications
Any suggestions on how to embed something like this into BIP. I understand that I may not be able to but really want to try somehting that I know works and gives is the correct number.
How discouraging. :-(
function CF_adjustmentFormula return Number is
l_pay_value number := 0;
l_retro_pay_value number := 0;
l_manual_pay_value number := 0;
begin
IF (:c_hours is not null) THEN
IF ( :cf_retro_hours_salary_flag = 'N' ) THEN
l_retro_pay_value := 0;
ELSIF ( :cf_retro_hours_salary_flag = 'RH' ) THEN
IF :earn_reporting_name = 'Regular' THEN
BEGIN -- Retro pay value for Regular OTM
select sum(to_number(prrv.result_value))
into l_retro_pay_value
from pay_run_results prr
, pay_element_entries_f peef
, pay_run_result_values prrv
, pay_input_values_f pivf
where 1 =1
and pivf.element_type_id = :earn_element_type_id
and prrv.result_value is not null
and pivf.input_value_id = prrv.input_value_id
and pivf.name = 'Pay Value'
and peef.effective_start_date between pivf.effective_start_date and pivf.effective_end_Date
and prr.run_result_id = prrv.run_result_id
and prr.source_type = 'E'
and prr.status = 'P'
and prr.entry_type='E'
and prr.source_id = peef.element_entry_id
and prr.assignment_action_id = :assignment_action_id
and peef.creator_type = 'RR'
and not exists ( select 1
from pay_element_entries_f pee
, pay_element_types_f pet
where 1 = 1
and pee.effective_start_date = peef.effective_start_date
and pee.assignment_id = :assignment_id
and pee.element_type_id = pet.element_type_id
and pee.effective_start_date between pet.effective_start_date and pet.effective_end_date
and pet.element_name in ('Field Training Officer', 'Motorcycle Time')
and pee.creator_id = peef.creator_id
EXCEPTION
WHEN OTHERS THEN
l_retro_pay_value := 0;
END; -- End of Retro Pay value
ELSE
BEGIN -- Retro pay value
select sum(to_number(prrv.result_value))
into l_retro_pay_value
from pay_run_results prr
, pay_element_entries_f peef
, pay_run_result_values prrv
, pay_input_values_f pivf
where 1 =1
and pivf.element_type_id = :earn_element_type_id
and prrv.result_value is not null
and pivf.input_value_id = prrv.input_value_id
and pivf.name = 'Pay Value'
and peef.effective_start_date between pivf.effective_start_date and pivf.effective_end_Date
and prr.run_result_id = prrv.run_result_id
and prr.source_type = 'E'
and prr.status = 'P'
and prr.entry_type='E'
and prr.source_id = peef.element_entry_id
and prr.assignment_action_id = :assignment_action_id
and peef.creator_type = 'RR';
EXCEPTION
WHEN OTHERS THEN
l_retro_pay_value := 0;
END; -- End of Retro Pay value
END IF;
ELSE
BEGIN -- Retro pay value
select sum(to_number(prrv.result_value))
into l_retro_pay_value
from pay_run_results prr
, pay_element_entries_f peef
, pay_run_result_values prrv
, pay_input_values_f pivf
where 1 =1
and pivf.element_type_id = :earn_element_type_id
and prrv.result_value is not null
and pivf.input_value_id = prrv.input_value_id
and pivf.name = 'Pay Value'
and peef.effective_start_date between pivf.effective_start_date and pivf.effective_end_Date
and prr.run_result_id = prrv.run_result_id
and prr.source_type = 'E'
and prr.status = 'P'
and prr.entry_type='E'
and prr.source_id = peef.element_entry_id
and prr.assignment_action_id = :assignment_action_id
and peef.creator_type in ('RR', 'EE');
/* and not exists (select 1 from pay_element_entries_f
where effective_start_date = peef.effective_start_date
and assignment_id = peef.assignment_id
and creator_type = 'EE'); */
EXCEPTION
WHEN OTHERS THEN
l_retro_pay_value := 0;
END; -- End of Retro Pay value
END IF;
BEGIN -- Manual Adjusment Pay value
select sum(to_number(nvl(peevf.screen_entry_value, '0')))
into l_manual_pay_value
from pay_run_results prr
, pay_element_entries_f peef
, pay_element_entry_values_f peevf
, pay_input_values_f pivf
where prr.assignment_action_id = :assignment_action_id
and prr.source_type = 'E'
and status = 'P' -- Processed
and prr.entry_type = 'E' -- Entry
and prr.source_id = peef.element_entry_id
and peef.creator_type = 'F' -- Manual Adjustment
and peef.date_earned is not null -- Non-Recurring Element
and peevf.screen_entry_value is not null -- Pay value exists
and peef.element_entry_id = peevf.element_entry_id
and peef.effective_start_Date = peevf.effective_start_Date
and pivf.name = 'Pay Value'
and peevf.input_value_id = pivf.input_value_id
and peef.effective_start_Date between pivf.effective_start_Date and pivf.effective_end_Date
and pivf.element_type_id = :earn_element_type_id
and not exists (select 1
from pay_element_entry_values_f pev
, pay_input_values_f piv
where pev.element_entry_id = peef.element_entry_id
and pev.effective_start_Date = peef.effective_start_Date
and peef.effective_start_Date between piv.effective_start_Date and piv.effective_end_Date
and pev.input_value_id = piv.input_value_id
and piv.name = 'Hours'
and pev.screen_entry_value is not null);
EXCEPTION
WHEN OTHERS THEN
l_manual_pay_value := 0;
END; -- End of Manual Adjusment Pay value
-- Total Adjustment Amount
l_pay_value := nvl(l_retro_pay_value, 0) + nvl(l_manual_pay_value, 0);
return (l_pay_value);
else
return (null);
end if;
end; -
Problem with if-then-else using BI Answers dataset
Hi, I'm having issues using the if-then-else logic with a BI Answers dataset. I'm running two versions of a report - one that access the SH schema tables directly, and one that uses a BI Answers dataset based on the SH schema.
My problem is with the if-then-else operator. It works fine against the relational tables when I use the following syntax:
<?xdofx:if CUST_GENDER = 'M' then 'Mr.' else 'Ms.' end if?>
However, when I go against a BI Answers report, the name of the field changes from CUST_GENDER to Customers._Cust_Gender_. If I make an exact find and replace on the if-then-else code, it doesn't work (nothing at all displays)
<?xdofx:if Customers._Cust_Gender_ = 'M' then 'Mr.' else 'Ms.' end if?>
Can anyone help?
Thanks,
ScottIs it possible that any of the fields have null values? If so, see my blog post about null handling in Crystal for more information: What is Null and Why is it Important for Crystal Reports | SAP BI BLOG
-Dell -
Wierd Behaviour of IF then ELSE standard function
Hi All,
I am facing a very wierd behaviour of the IF then ELSE function in a mapping.
Condition to be checked: if GDS_id = 1, then (condition 1 - RFC lookup ) ElSE (condition 2 - JDBC Lookup followed by an RFC lookup).
Issue: The input payload is 0-unbounded with a possibility of a different GDS_id values.
Case 1 :
As shown below, in case the input payload has 3 repitions of the RECORD, with the Fit set having GDS_ID = 01, the mapping runs perfectly fine . All the If then Else branches are getting executed.
Case 2:
Where as iF the first GDS_ID != 01 (not 01) , thenthe target value is not getting populated properly .
I have tried all the possibilities and combinations but i am unable to resolve this. Please help.
Attached the screen shot of the message mapping, and sample test results of both the use cases.
For instance, below is a sample payload:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_EMERGO_common xmlns:ns0="http://sabreEMERGO_common.com">
<Record>
<booking_date>08012013</booking_date>
<iata_code>2325540</iata_code>
<gds_id>01</gds_id>
<pos_code>RD3A</pos_code>
<gds_code>01</gds_code>
<net_booking>11</net_booking>
</Record>
<Record>
<booking_date>08012013</booking_date>
<iata_code>2325540</iata_code>
<gds_id>02</gds_id>
<pos_code>54S8 </pos_code>
<gds_code>02</gds_code>
<net_booking>11</net_booking>
</Record>
</ns0:mt_EMERGO_common>Hi All,
I have changed the message mapping like below. Even though i am not getting my target filed as value. As per my requirement if GDS_ID=01 then perform the RFC lookup and pass the value to target fields KUNNR and else GDS_ID=02 then perform the JDBC LOOKUP and JDBC LOOKUP output to RFClookup .RFC LOOKUP output pass to my target field KUNNR.
Result of my mapping is 1st record only populated KURNNR in Target side and 2nd record not showing as KUNNR filed in target side .But I have taken look on display queue in If then else out showing 2 values but it is not passing to target filed.
Please provide any suggestion to resolve this issue.
Please find the mapping logic:
Please find the test screen:
Please find the test Data:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_EMERGO_common xmlns:ns0="http://sabreEMERGO_common.com">
<Record>
<booking_date>08012013</booking_date>
<iata_code>2325540</iata_code>
<gds_id>02</gds_id>
<pos_code>54S8 </pos_code>
<gds_code>AA</gds_code>
<net_booking>11</net_booking>
</Record>
<Record>
<booking_date>08012013</booking_date>
<iata_code>2325540</iata_code>
<gds_id>01</gds_id>
<pos_code>RD3A</pos_code>
<gds_code>AA</gds_code>
<net_booking>11</net_booking>
</Record>
</ns0:mt_EMERGO_common>
Regards,
Ramesh -
Question regarding the If-then-else function
Hi folks ,
I have been constantly putting threads on this subject for the past day, hope it doesn't annoy any one here.
My scenario is really simple, and i am almost close to the solution, but there is just 1 thing missing and i know that is a very small thing, could be the context too. Hope some one can help by pointing it out>
Mapping:
In my source i have a header(0-unbounded) & detail(0-unbounded). At a given instant either header / detail will occur in source, depending on that the target node "response" will occur(0-n times)
i have achieved this in the mapping.
the problem is this:
Both the Header/Detail have a field in it called Sequence# which is mandatory and can occur only once in the Header/Detail node.
Now depending on what occurs: ie Header/Detail i need to map that particular seq# into my Target Respone's SEQ_#.
I have done the mapping for this and have done a standalone testing.
Mapping: Check if HEADER EXISTS, if yes? then map the HEADER.Seq# to TARGET.Seq#
Here are my findings:
Scenario1: 3 header nodes(No Detaili) each with a seq # in it. Out put 3 Target node each with 3 seq # in it.
Scenario2: 2 Detail Nodes(No header) each with a seq # in it. Output fails to produce the 2nd Target Structure's Seq# and Fails
When i look into the Display Queue in the mapping , i examine the iF-Then-Else function:
Since HEADER doesn't exist i c 1 Suppress in my If-Condition hence the if condition becomes FALSE., now since its false its supposed to map the seq# from my detail. (This case i have 2 ).
But in the output of the IF-Then Else, i get out only 1 seq # which is the 1st one,
What i am thinking is that the exists condition is giving out only 1 FALSE instead of 2, If there were 2 false from the exists then i would have had both the seq # in my output,
I hope my question is clear, Would appreciate anysort of help . And i apologize if I seem to be brigning up the same question over again experts.
I don't wnt to create a UDF for this matter because i know there is something i am not doing right,
HankSorry I could not give my udf in my last post.
Udf1:
Create a context udf and name it as RemoveSuppress. Take two input arguments a and b. Imports: java.*;
Add this code:
//write your code here
boolean found = false;
for (int i=0;i<a.length;i++) {
if (a<i>.equals(b[0])) {
found = true;
break;
if (found == true)
result.addValue("true");
else
result.addValue("false");
Then it should work.
Regards,
---Satish -
How to total 2 colums with an -If then else- statement each
Hello,
I have 2 colums A en B who generate data based on an “If then else” statement.
Colum A
<?xdofx:if (OMZET_YTD_VJ )!='' then ((OMZET_YTD_VJ) * (BM_YTD - BM_YTD_VJ)) div 100 else 0 end if?>
Colum B
<?xdofx:if (BM_YTD)!='' then ((BM_YTD) * (OMZET_YTD - OMZET_YTD_VJ)) div 100 else 0 end if?>
Colum C needs to be the sum of both. Who can help me?
Thanks a lot.Can you send me the RTF template and xml file to [email protected]? I can take a look and try to help.
Thanks,
Bipuser -
How to use if-then-else-end if in template building?
hi,
I am not able to use the "if-then-else-end if" in my template. I want to display a data based on a condition. My requirement is as follows:
if bal_for_vd < 0 then
bal_for_vd * no_of_days
else 0
end if
I tried using
1.<?if: BAL_FOR_VD < 0 then BAL_FOR_VD*NO_OF_DAYS else 0 end if?>
2.<?xdofx:if BAL_FOR_VD < 0 then BAL_FOR_VD * NO_OF_DAYS end if?>
3.<?choose:?>
<?when:BAL_FOR_VD < 0?> <?BAL_FOR_VD * NO_OF_DAYS ?>
<?end when?>
<?otherwise?>0
<?end otherwise?>
<?end choose?>
4.<?if:BAL_FOR_VD < 0?><?BAL_FOR_VD*NO_OF_DAYS?><end if?>
but ended up getting errors or nothing is getting displayed.
When i used <?BAL_FOR_VD * NO_OF_DAYS ?> alone its working fine and correct getting result. But on giving condition its erring out.
I will be glad if i get some solution for this.
Regards,
Vishnu T RamakrishnanHi..
Below syntax should work..I tried with a sample xml..
<?xdofx:if BAL_FOR_VD < 0 then BAL_FOR_VD * NO_OF_DAYS
else
0
end if?>HTH.. -
How to do IF THEN ELSE logic in Workflow?
I need to do "if then else" logic in Workflow. The key part of the probem is that there are several "else" (elsif) possibilities, so I can't use a Boolean or Yes/No as a return result code. When I use a function, I can't see a way to "check" the value before it passes to a next process. HELP!
Whether you are using a function as your comparator or the Standard WF Compare Operators, this can be done. I will explain two scenarios, one with your own written functions as the comparator and the other using the standard Compare Text function.
Create a PL/SQL procedure that returns a boolean. In this procedure you would pull two attributes from the workflow, the test case and the value you want to compare to. You would check to see if they are equal and return true, otherwise false. I do not know what you are trying to compare in your if statement, but whatever it is, if its true, return true, otherwise false.
Now in the workflow, you would put a couple of these in your process diagram representing each if statement. Set the two (or more) attributes in the Node Attributes tab of each function node to the values you want to compare. For the first node, have the <true> transition go to whatever you want done and then to an END node. Have the <default> or <false> transition point to the next function node you have. Do the same for each one except at the last one, its only transition would be <default> and that would go to END. This way if the first function resolves true, it will do whatever should be done and then skip the rest of the conditions. If its false, it will go to the next conditional. The last one will be gotten to only if every other conditional was false that would be your final else statement.
To do this with the Compare Text option, have the same set up in your workflow diagram exception have the <EQUALS> be your true path and the <DEFAULT> transition go to the next compare text node.
-->O-{default}->O-{default}->O->default
| | | |
true true true |
| | | |
doWork doWork doWork else
| | | |
---------------->---------------->------------|
|
end -
Is there a method I can use to test the space cost of a Java program?
I am trying to test the space cost of a Java program (or a few lines of executed codes), however...
Firstly I tried to use the method freeMemory() in runtime class at start and end of a number of lines tested on, and then find the differences between them. But because I don't know when JVM releases memories, this idea seems not working.
I also tries to use the -verbose:gc to print the GC actions, which is also hard to be automatically collected (Computing the results one by one by hand is too burdensome).
Is there a method in some classes can be used for doing this? Could anyone help me on this, please?Up _+ ...
-
Values are not populated properly - if then else conditon
Hi,
I 've a requirement like...
If meinh = ZTU then lfimg/umrez else display the values of lfimg
I 've used if then else condition afterthat i mapped to target field lfimg. But, when i check the queue the result displays correctly, but when i execute the mapping from Test tab it displays all the values for LFIMG
My question here is ...Why the output is not display properly after i use if then else condition
Help me how can i get proper values to display at target
Kind regards,
Y.Rajhi
As my understanding you are giving both cases true and false the same input.
If meinh = ZTU then lfimg/umrez else display the values of lfimg
if meinh = ZTU
then umrez
else lfimg
try this
if still its not working write a simple UDF for the same.
Regards
Vijay -
Spaces and MS Word for Mac 2008..anyone else having this problem
Hello,
I know MS Word for Mac 2008 isn't a Apple Product but is anyone else having the same problem as me and is there a solution?
I have it set up to be in "spaces 4" and I'll be working on it and suddenly it ends up in space 2, or 1. Really aggravating.
SeanYes. Exact same problem. Folks at the MS MacBu are aware of it and say that both Apple and MS are working on it. It's still an incredibly annoying problem, though. In fact, it's even worse than you descrine.
Not only does Word 2008 work with spaces, it makes it impossible to use spaces with other applications. I've tried to leave all Word docxs (and docs) in one space and then put other applications in other spaces. It doesn't work. Word doc(x)s still move around randomly.
It's one thing for Word 08 not to work with spaces, but to actually interfere with other apps that do (did) work with spaces, that's pretty bad. I have to admit I feel quite foolish for purchasing Microsoft Office 2008 (at considerable expense). I do at least hope both companies are working on a fix. -
i have a doubt with the body of IF--THEN--ELSE construct.
Normally, we have:-
if (statement) then
else
end if;
If i include another if--then--else construct in the else part, like :-
if (statement) then
else
if (statement) then
else
end if;
end if;
would it produce unexpected results or would it be ok.
I hope, my question is clear. Please help in solving the doubt as it is urgent.
Regards.Unreadable, incomprehensible, unmaintainable, bug ridden code can be written using any construct known to programmers. This is particularly true when dealing with conditional logic. It is not the particular construct chosen, but the faulty reaoning and lack of proper testing that leads to bug ridden code.
The following is a greatly simplified version of some code I came across recently. The comment is a direct quote.
CREATE PROCEDURE test (p_num IN NUMBER) AS
BEGIN
CASE
WHEN p_num > 5 THEN
process_common_status();
WHEN p_num = 4 THEN
process_exception_status_four;
WHEN p_num = 5 THEN
process_exception_status_five;
WHEN p_num = 6 THEN
-- New status 6 must be handled with special care
-- in the rare case it happens
process_exception_status_six;
ELSE
process_other_exceptions;
END CASE;
END;Although I am not asking you to prove your assertion, I would be interested to see some of the documentation you refer to.
John
Maybe you are looking for
-
Captivate 4, interaction SWF using XML and the Reviewer tool Problem
Hello everyone! I am an advanced AS3er and am only months old working with Captivate 4. I've found some cool ways to use Captivate and incorporating swfs that use CSS and XML for their dynamic content builder and interactivity as well. However, I've
-
Can multi-select picklist be used in Expression Builder?
Does CRMOD allow the use of multi-slect picklist in Expression Builder within workflow?
-
Hi, We are having two links 4 mbps and 2 mbps, and we are running OSPF on these lines. How do we load balance on these lines ? As per bandwidth . That is 75 % of data should flow on 4 mb line and 25 5 should flow on 2 mb line. Is such balancing possi
-
Business Functions concept in JD Edwards.
Can u please explain me the Business Functions concept in JD Edwards. Thank you..
-
PersonalJava 1.1 beta 1: Class not found error
Hi there. I have a problem to run a simple java app on a pocket pc. It works if I make a executable jar file with only one class and no package structure. But if I have the class in a package the vm throws an java error: Cannot find class "de.KeyTest