BSSV - Convert Integer to MathNumeric

jdesuren

Member
Hi,

Could anyone please let me know on how to convert Integer to Mathnumeric.

Do we need to create two separate variables, one for integer & one for mathnumeric or is there any other alternative ?

It would be great, if anyone provides the snippet of it.
 
Hello jdesuren,
You need to create MathNumeric variable and pass Integer in the constructor

Here is a extract from MathNumeric class
Code:
   // Constructors
    public MathNumeric() { }
    public MathNumeric(Integer p1) { }
    public MathNumeric(int p1) { }

Standard InternalProcessContact BSSV
\J0100003\valueobject\InternalProcessContact.java

Code:
     public void setMnAddressNumber(Integer iAddressNumber) {
       if (iAddressNumber != null){ 
         this.mnAddressNumber = new MathNumeric(iAddressNumber);
       }
     }

As you can see mnAddressNumber variable (MathNumeric type) will be created with the value from the iAddressNumber variable (Integer type).

Here is a good BSSV tutorial from Oracle, there are more available online.
JDE Business Services Workshop
http://www.oracle.com/technetwork/topics/jde-bssv-database-business-service-131800.pdf
 
Requesting for another document

Hi,
Thanks for the PDF document!
Based on your PDF doc, I can work on Table insert. So I want to try on small business function Ex: Get next unique key.
I got some of the documents from the JDE list but no use. The descriptions are not matching with the Screenshots which they provided in the doc.
Please share the document if you have any.
Thanks in advance.

Thanks,
Devraj


Hello jdesuren,
You need to create MathNumeric variable and pass Integer in the constructor

Here is a extract from MathNumeric class
Code:
   // Constructors
    public MathNumeric() { }
    public MathNumeric(Integer p1) { }
    public MathNumeric(int p1) { }

Standard InternalProcessContact BSSV
\J0100003\valueobject\InternalProcessContact.java

Code:
     public void setMnAddressNumber(Integer iAddressNumber) {
       if (iAddressNumber != null){ 
         this.mnAddressNumber = new MathNumeric(iAddressNumber);
       }
     }

As you can see mnAddressNumber variable (MathNumeric type) will be created with the value from the iAddressNumber variable (Integer type).

Here is a good BSSV tutorial from Oracle, there are more available online.
JDE Business Services Workshop
http://www.oracle.com/technetwork/topics/jde-bssv-database-business-service-131800.pdf
 
Hello,

As further help to this post, use below code in BSSV to convert int to MathNumeric:

If i is the int variable then create MathNumeric variable m1 and write statement like this:

MathNumeric m1 = new MathNumeric(i);
bsfnParams.setValue("mnLineNumber", m1);

Thanks
Gautam Dasgupta
E1 9.2, Tools: 9.2.5.1
 
Back
Top