Checking the long value is null or not
Hi
Can anybody help me how to check that a long variable is null ot not?
karthikeyan.v wrote:
its ok...but reply me that how to check a long variable contains any content?If your code compiles, it always has predictable "content" (value).
class Foo {
long z; // 1
void bar() {
long y; // 2
// 3
long x = y; // 4
}Because of #1, every time you create a Foo object that object's z variable has a value of 0 after construction has finished. Member variables are initialized to 0/false/null before you can even see them.
Local variables, however, do not have a value until you assign one to them. The compiler knows this, and will not let you use a local unless it has been "definitely assigned" (JLS term) at that point.
Here, because we do not assign a value to y at #2 or any time after that, as of #3 and afterwards, it does not have a value as far as the compiler is concerned. That means when we get to #4, we'll get a compile-time error.
If we get past #4 without a compile-time error, then it is guarnateed that y has been assigned a value by our code in the body of that metohd.
If this does not answer your question, please clarify what you're asking with something more precise and descriptive than "how to check it contains any content", which means nothing.
Similar Messages
-
How to Check the total value of a field
Hi,
I want to check the total value of a field (this total is obtain by using property of that field thru personalization).
that means , in a table 3 columns are there (col 1, col2 & col3). I personalized the total property as true for col3.
now i'm getting the total for that field.
I want to check that total whether it crossed 100 or not.
How to do this?
Thanks in advance,
SANHi San,
You can achieve by using OATotalRowBean, search for OATotalRowBean in this forum you should be able to get some sample code.
public class OATotalRowBean
extends TotalRowBean
implements OAWebBean, OAWebBeanConstants
A special row rendered at the bottom of a table which lets users see totals for columns which are designated for summing.
Note The total is calculated and displayed only for visible rows.
When you indicate that you want to total one or more columns, the OA Framework creates an OATotalRowBean and designates it as the columnFooter named child of the OATableBean. If the OATableBean is also configured to insert rows (so it has an "Add Another Row" button), then the total bean becomes an indexed child of the add table row bean (see OAAddTableRowBean), which the OA Framework in turn designates as the table's columnFooter object.
If you need to access the table's column footer object for any reason, call the OATableBean's getColumnFooter() method. If row insertions are enabled, this method returns an OAAddTableRowBean; otherwise it returns an OATableRowBean.
For detailed information about creating and working with tables, see OA Framework Developer Guide: Tables.
With regards,
Kali.
OSSi. -
Any function to check the input value is integer?
May I know if there's any function to check the input value is integer in Form 4.5?
Thanks.just to add :) - (couldn't resist) :
create or replace function is_integer ( p_number in varchar2 ) return boolean is
v_return boolean := true;
v_number number;
begin
v_number := p_number;
if v_number != trunc(v_number) then
v_return := false;
end if;
return v_return;
exception
when others then
v_return := false;
return v_return;
end;
begin
if not is_integer(1.1) then
dbms_output.put_line('is not');
end if;
if is_integer(1) then
dbms_output.put_line('is');
end if;
if not is_integer('a') then
dbms_output.put_line('is not');
end if;
end; -
How to check the numerica value
Dear Experts,
Would you please show me the code how to check a character value is numeric or not, include negative sign '-'.
For example the character value (01.-10) should not be a good numeric value use in later. the (-1.00) should be a good numeric value.
Thanks,
HelenHello,
Use the FM <b>NUMERIC_CHECK</b>
Regards,
Vasanth -
Hi
I have a scenario where i have to check the amount value sholuld be greater than Zero or not, if it is not greater than zero i have to raise an exception and skip that record ..
i wanna do that using UDF..How we do that
venkatHi paul
I need to Import Any Java packages .
It s giving Error :
Source code has syntax error: /usr/sap/D06/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map08e7dc10452d11dcb4a1e210bc394725/source/com/sap/xi/tf/_MM_ACEAwardInformation_to_TaxBalances_.java:113: operator > cannot be applied to java.lang.String,int if(Amount>0)
My code
public String AmountValue(String Amount,Container container){
int AmountValue =Integer.parseInt( Amount);
try{
if(Amount>0)
create record;
else throw new Throwable("Records not greater than 0...");
}catch(Throwable t){}
venkat -
BCExeption: The IDOC metadata for null is not available in SID
<h3>Hello Guys,</h3>
we need some information about the error message:
com.wm.pkg.sap.BCExeption: The IDOC metadata for null is not available in <SID>
We use a Business Connector 4.8 and the backend is an ECC 6.0, we have an inbound xml scenario with FTP.
We pick up the ORDRSP from the vendors ftp-server and we would like to drop it to our backend system.
We can read the xml file into a string, but not send to the backend system, we use following steps:
- bytesToString
- stringToDocument
- documentToRecord
- recordToIDOC
- lockSession
- createTID
so far works perfekt
- sendIDoc
- releaseSession
On the step "sendIDoc" we see the described error message, but what is the message from the message?
Any Ideas?
Thank you and regards,
MichaelHello Michal,
thank you for your quick answer!
In my opinion, i don't need any input for this service, because we pick up all data from the vendors ftp - server in a definied time interval.
All needed fields are available in the xml file. In the result tab is the IDocList filled correct, but no sending to the backend system because the error is displayed.
Is it a problem with my concept?
Regards,
Michael -
how can I add a language on pages (Greek) to check the spelling when that language is not on the list?
I can see other languages available for spelling check, but not Greek and I dont see how to add it.
I have added the Greek keyboard on the Mac, so I can write in Greek , but I dont know how to check the spelling in Greek on pagesYou can try to add a 3rd party spellchecker
http://milaraki.com/blog/2010/11/greek-spelling-at-pages-how-to/ -
T.Code for checking the total value of a material
Hi Experts,
Can anybody tel me the T.code for checking the total value of a material which is procured in a specified period?
Thanks in advance
ChannaRefer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get PO-GRN-INVOICE Qty & Value details
Last button on Application tool Bar it is in line of filter, total etc icons
Also check below reports :
MC$G - PURCHIS: Material PurchVal Selection
MC$0 - PURCHIS: PurchGrp PurchVal Selection
MC$< - PURCHIS: MatGrp PurchVal Selection
MC$4 - PURCHIS: Vendor PurchVal Selection -
Hi Experts,
i am using the BAPI : "BAPI_REQUISITION_CREATE". it' is working Fine.But i need to pass the Long Text Field of Header Note, Item Text, Item Note,Delivery text and Material P.O text through the BAPI.
Plz,Help me to Achieve this.
Thanks in Adv.
V.S.Naidu.Below is the code for BAPI_PR_CREATE just go through it and your dbout will be solved
it has example for multi line header text as well as line items...!
Hope it helps
CLEAR GV_BAPIMEREQHEADER.
MOVE 'NB' TO GV_BAPIMEREQHEADER-PR_TYPE.
move 'X' To GV_BAPIMEREQHEADER-AUTO_SOURCE.
CLEAR GV_BAPIMEREQHEADERX.
MOVE 'X' TO GV_BAPIMEREQHEADERX-PR_TYPE.
MOVE 'X' TO GV_BAPIMEREQHEADERX-auto_source.
CLEAR WA_BAPIMEREQITEMIMP.
MOVE :
'00010' TO WA_BAPIMEREQITEMIMP-PREQ_ITEM,
**'001' TO WA_BAPIMEREQITEMIMP-PUR_GROUP,
*'TWISTED PAIR CABLE' TO WA_BAPIMEREQITEMIMP-SHORT_TEXT,
'C-1030' TO WA_BAPIMEREQITEMIMP-MATERIAL,
'1000' TO WA_BAPIMEREQITEMIMP-PLANT,
'100' TO WA_BAPIMEREQITEMIMP-QUANTITY,
'20091001' TO WA_BAPIMEREQITEMIMP-DELIV_DATE.
APPEND WA_BAPIMEREQITEMIMP TO GT_BAPIMEREQITEMIMP.
CLEAR WA_BAPIMEREQITEMX.
MOVE :
'00010' TO WA_BAPIMEREQITEMX-PREQ_ITEM,
'X' TO WA_BAPIMEREQITEMX-PREQ_ITEMX,
*'X' TO WA_BAPIMEREQITEMX-PUR_GROUP,
'X' TO WA_BAPIMEREQITEMX-SHORT_TEXT,
'X' TO WA_BAPIMEREQITEMX-MATERIAL,
'X' TO WA_BAPIMEREQITEMX-PLANT,
'X' TO WA_BAPIMEREQITEMX-QUANTITY,
'X' TO WA_BAPIMEREQITEMX-DELIV_DATE,
'X' TO WA_BAPIMEREQITEMX-EXT_PROC_PROF.
*EXT_PROC_REF_DOC
*EXT_PROC_REF_ITEM
APPEND WA_BAPIMEREQITEMX TO GT_BAPIMEREQITEMX.
CLEAR EXTRA_FIELDS.
MOVE '00010' TO EXTRA_FIELDS-BNFPO.
MOVE '12345678901' TO EXTRA_FIELDS-ZZDANOSPR_NO.
MOVE 'MUM01' TO EXTRA_FIELDS-ZZPORT.
MOVE '20100505' TO EXTRA_FIELDS-ZZETD.
MOVE '20100506' TO EXTRA_FIELDS-ZZETA.
MOVE '123456789123456789' TO EXTRA_FIELDS-ZZEXTWG.
MOVE TEMP TO EXTRA_FIELDS-ZZrob.
CLEAR WA_EXTENSIONIN.
MOVE 'BAPI_TE_MEREQITEM' TO WA_EXTENSIONIN-STRUCTURE.
MOVE EXTRA_FIELDS TO WA_EXTENSIONIN-VALUEPART1.
APPEND WA_EXTENSIONIN TO GT_EXTENSIONIN.
CLEAR WA_EXTENSIONIN.
MOVE 'BAPI_TE_MEREQITEMX' TO WA_EXTENSIONIN-STRUCTURE.
MOVE EXTRA_FIELDS TO WA_EXTENSIONIN-VALUEPART1.
APPEND WA_EXTENSIONIN TO GT_EXTENSIONIN.
CLEAR WA_EXTENSIONOUT.
MOVE 'BAPI_TE_MEREQITEMX' TO WA_EXTENSIONOUT-STRUCTURE.
*MOVE EXTRA_FIELDS TO WA_EXTENSIONOUT-VALUEPART1.
APPEND WA_EXTENSIONOUT TO GT_EXTENSIONOUT.
clear wa_PRITEMTEXT.
MOVE '00010' TO wa_pritemtext-preq_item.
move 'B01' TO WA_PRITEMTEXT-TEXT_ID.
MOVE 'THIS IS JUST FOR TEST' TO WA_PRITEMTEXT-TEXT_LINE.
APPEND WA_PRITEMTEXT TO GT_PRITEMTEXT.
clear wa_PRITEMTEXT.
MOVE '00010' TO wa_pritemtext-preq_item.
move 'B01' TO WA_PRITEMTEXT-TEXT_ID.
MOVE 'THIS IS THE SECOND LINE' TO WA_PRITEMTEXT-TEXT_LINE.
APPEND WA_PRITEMTEXT TO GT_PRITEMTEXT.
BREAK-POINT.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
PRHEADER = GV_BAPIMEREQHEADER
PRHEADERX = GV_BAPIMEREQHEADERX
* TESTRUN =
IMPORTING
NUMBER = GV_NUMBER
PRHEADEREXP = GV_PRHEADEREXP
TABLES
RETURN = GT_BAPIRET2
PRITEM = GT_BAPIMEREQITEMIMP
PRITEMX = GT_BAPIMEREQITEMX
* PRITEMEXP =
* PRITEMSOURCE =
* PRACCOUNT =
* PRACCOUNTPROITSEGMENT =
* PRACCOUNTX =
* PRADDRDELIVERY =
PRITEMTEXT = GT_PRITEMTEXT
* PRHEADERTEXT =
EXTENSIONIN = GT_EXTENSIONIN
* EXTENSIONOUT = GT_EXTENSIONOUT
* PRVERSION =
* PRVERSIONX =
* ALLVERSIONS =
* PRCOMPONENTS =
* PRCOMPONENTSX =
* SERVICEOUTLINE =
* SERVICEOUTLINEX =
* SERVICELINES =
* SERVICELINESX =
* SERVICELIMIT =
* SERVICELIMITX =
* SERVICECONTRACTLIMITS =
* SERVICECONTRACTLIMITSX =
* SERVICEACCOUNT =
* SERVICEACCOUNTX =
* SERVICELONGTEXTS =
* SERIALNUMBER =
* SERIALNUMBERX =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
WRITE : 'THE PR CREATED IS : -',GV_NUMBER. -
I just purchased a Canon 7D Mark II, new DellXPS and the Lightroom 5.2. The Lighthouse is not openinging the 7DMark II but does open the older 7D that I imported. I checked the Abode update page and do not see one for the 7D Mark II. Please say it is there - if not when. I am "on hold till its done. Thanks.
Update to the current release, which is Lightroom 5.7.1. You can do this from the Lightroom help menu and choosing updates.
-
Hi;
i have install 2 MCS 7816 (publisher and suscriber) with call manager version 6.1, i have load the files licenses for the publisher and the phones, but when i load the file license for the suscriber in publisher server i had the error messeage :
Error : License File Exception (check the log file for details): ENT_PE_NODE not found in datastore
what s the solution.
Thanks for your helpHello,
I seen this issue before, all you have to do is Contact Cisco Licensing team. In order to generate new licenses for your server.
Thanks, -
Delete the records which have the Data values are NULL before load data to BPC model
Hi Everyone,
I am loading the data from flat file to BPC Model (10.0 Version).
Source data (Flat file) looks like below:
RP_Employee RPT_Currency Data
Test USD 8
Test1 USD
Test2 USD 6
My user requirement is that to delete the records which have the Data values are NULL before load data to BPC model.
So,Please let me know how can i meet to this requirement.
I am thinking that,it is possible by using start routine BADi. If i am correct please let me know process like creation of class and BADi implementation.
Thanks in advance!!Hi Nilanjan,
Please see my source data below:
Account Client Employee Time Data
123 XYZ Vishu 2014.01 300
456 2014.01
789 ABC Alexander 2014.02 200
If you see the second record,
If data value is ZULL, then the Employee or another dimension is also NULL.
So I want to delete second records.
If it is Start routine please share the code and steps to do.
Thanks in advance!!
Regards,
Viswanath -
Pl/sql stored procedure code2 check the emial id is correct or not
if the mail id is [email protected]@.com
then how we do validations means
there must be only one @
i wnat all tghis type of validations 2 check the email id is correct or not?
the procedure that i wnat to validate akll the validationsThis appears to be a duplicate of your existing thread
pl/sql stored procedure for email id validations
I'll answer there.
Justin -
Message AU390 when I check the aset values
Hi Gurus,
I get the message AU390 when I check the aset values via the asset explorer.
To sum up the situation, we have created a fixed asset Capitalized on 31.10.2002.
Then in asset explorer in depreciation area 10 i have the following values:
Status-- Per.--Old dep.
Legacy data transfer-2-----2,77
Posted--3--
0,72-
Posted--4--
0,68
Posted--5--
0,68
Posted--6--
0,68
Posted--11----0,68
Posted--12--
260,63 (This value is wrong!!!!!)
I don't understand and don't find where the problem can comes from!
Could you please advice a solution if you already had this problem.
Thank you SO much.Hi,
I think in that period (i.e.12) the Depreciation Key has been change (hopefully with a higher depreciation rate) . So SAP will recalculate and do a catch up Depreciation and post in that period.
Hope this helps
Thanks & Regards
Om -
UDF for Checking the field value
Hi
I want to check the whether the fiels conatins any value or not in mapping ... if not i want to raise the exception using the UDF
DO any one have sample code for writing the UDF
SVHi SV
what is your requirement first that should br clear.
i am giving you two UDF
1) i have written this uDF for string and comparing the field value XYZ
2) i am entering a string and its returning aa string which starts from the index of your input fixed length
int len = a.length();
String res = "";
String temp = "";
if ( len >= 10)
temp = a.substring(0,10);
if ( temp.equals("XYZ"))
res = temp;
else
res = "";
return res;
=======================================
String fixed = "ABCD";
String res = "";
int index = -1;
index = a.indexOf(fixed);
if (index == -1)
res = "NO INDEX FOUND";// or if u wanna set it as null res = "";
else
res = b.substring(index4,index12);
return res;
===
hope these may solve your problem
Thanks
Sandeep sharma
If helpful reward points
Maybe you are looking for
-
How do I remove my account from Skype?
I have already contacted skype by e-mail. It has been over 7 days now, since my e-mail was assigned to somebody at skype. Nobody has responded yet. I have also tried chat support, but it just keeps me waiting for long periods of time. Why isn't th
-
Search error in Content server
Hi All, We have Migrated documents from IPM 10 g to IPM 11g. Now currently we are working in Production environment. But whenever I search for documents in UCM I am getting Following error Unable to retrieve search results. Error occurred while proce
-
NO Sound or Audio with Bootcamp and Windows XP.
I have been trying to get this solved for months with no success. Everything I have read here . . . no one seems to know how to solve this problem from all the other sound problems I have read. I have a MacBook and IMac with Core 2 Duo. System 10.4.9
-
Premiere CS4 - Encoding with AME ridiculously slow
Hello there. After having read many threads on various forums, I have not come to a single hint as to why AME is encoding any type of video materal extremely slow. I'm sorry if this question has been asked many times on this forum, but maybe someone
-
"Use iCloud" option does not appear in GarageBand for iOS
For work, I have an iPad 2 running iOS 7.0.4. I recently updated GarageBand on that device to version 2.0. I have several songs on my work iPad that I would like to share via iCloud to my new home iPad mini (Retina) WiFi also running iOS 7.0.4, also