You are on page 1of 3

ABS Coding

================================================================================
=============================================================
* Big Decimal to integer type converting :
-----------------------------------------set vTempint to 0
%java
vTempint = vTemp.intValue();
java%
here vTemp is a BigDeciaml variable to convert int variable vTempint
================================================================================
=============================================================
* String to BigDecimal type converting :
-----------------------------------------set vPick1 to 0.0
%java
vPick1 = new BigDecimal(vPick);
java%
here vPick is a String variable convert into bigdecimal varaible vPick1
================================================================================
=============================================================
* BigDecimal to String type converting :
----------------------------------------set vPLessthan to ""
%java
vPLessthan = vPLessthan1.toString();
java%
here vPLessthan1 is a BigDecimal variable convert into String varaible vPLesstha
n
================================================================================
==============================================================
* Date to String type converting:
---------------------------------------set vAttendanceCalendar to calendar of vTDate1
set vTDate2 to vAttendanceCalendar month
set vTDate3 to ""
%java
vTDate3 = vTDate2.toString();
java%
here month onle converting to String type.
================================================================================
===============================================================
* Invoice Type Selecting :
------------------------------if vInvTyVal = "0" TypeOfInvoice = "0" and
if vInvTyVal = "2" TypeOfInvoice = "2" and
if vInvTyVal = "3" TypeOfInvoice = "3" and
if vInvTyVal = "4" TypeOfInvoice = "4" and
if vInvTyVal = "5" TypeOfInvoice = "5" and
if vInvTyVal = "6" TypeOfInvoice = "6" and
if vInvTyVal = "7" (TypeOfInvoice = "0" or

if
if
if
if
if

vInvTyVal
vInvTyVal
vInvTyVal
vInvTyVal
vInvTyVal

=
=
=
=
=

"7"
"7"
"7"
"7"
"7"

TypeOfInvoice
TypeOfInvoice
TypeOfInvoice
TypeOfInvoice
TypeOfInvoice

=
=
=
=
=

"2"
"3"
"4"
"5"
"6"

or
or
or
or
)

here value filter in where condition..........


================================================================================
================================================================
* invoke when creating object Generic Bean :
-----------------------------------------------if ( vProductType = "1" or vProductType = "2" or vProductType = "3" or vProductT
ype = "4" or vProductType = "5" ) and vSpecificType = "1" then
set vWrkGB to results of invoke getCommonIType on me using vWrkGB as par
ameter
endif
================================================================================
=================================================================
* inserting values to table in directly :
--------------------------------------------create entity EPINMaster using
my CompanyCode, vMemberIdCode, vPINID, vPINNo, vPINType, vAmount, 0, null, vPD
ate, vRefTimestamp as parameters
================================================================================
=================================================================
* Value is null :
--------------------if vValue = null then
.....
.....
endif
or
if vValue isvoid then
.....
.....
endif
================================================================================
==================================================================
* Date Condition :
--------------------set vDate to today
----------> Refer Current date
set vCalDate to calendar of vDate
----------> Changing ABS Calendar Type
set vTempDate to vCalDate day
----------> Retrieve only day of the Dat
e
set vTempMonth to vCalDate month
----------> Reteieve only month of the D
ate
set vTempYear to vCalDate year
----------> Retrieve only year of the Da
te
================================================================================
===================================================================
* Creation Date :
------------------if my CreationDate = null then
set my CreationDate to Today
endif

here CreationDate is a Attribute name that name set current date.


================================================================================
===================================================================
* Num to Words in Indian ruppee :
------------------------------------stringvar number:=CStr ({?num});
stringvar str;stringvar rupees;
stringvar paise;
stringvar array a;
a:=split(number,'.');
rupees:=a[1];
paise:=a[2];
numbervar leng := length(rupees);
if leng=10 then str:=str & towords( CDbl( mid( rupees,1,1 ) ),0 ) & " Crore ";
if leng=10 then rupees:= mid( rupees , 2 ,9 );
if leng=11 then str:=str & towords( CDbl( mid( rupees,1,2 ) ),0 ) & " Crore ";
if leng=11 then rupees:= mid( rupees , 3 ,9 );
leng := length(rupees);
if leng=7 then str:=str & towords( CDbl( mid( rupees,1,1 ) ),0 ) & " Lakh ";
if leng=7 then rupees:= mid( rupees , 2 ,6 );
if leng=9 then str:=str & towords(CDbl(mid(rupees,1,3)),0) & " Lakh ";
if leng=9 then rupees:=mid(rupees,4,6);
str:=str & towords(CDbl (rupees),0) & " Rupees And " & towords(CDbl (paise),0) &
" Paise Only.";
propercase(str)
================================================================================
===================================================================

You might also like