on 06-17-2009 9:57 AM
HI,
Experts,
I have downloaded the WD Java appplication from url
While the running the application i am getting this error
java.lang.NoSuchMethodError: java.math.BigDecimal.<init>(I)V
at com.sap.tut.wd.tutwd_table.tablecomp.TableComp.getProductsTOTAL_PER_ARTICLE(TableComp.java:237)
at com.sap.tut.wd.tutwd_table.tablecomp.wdp.InternalTableComp.getProductsTOTAL_PER_ARTICLE(InternalTableComp.java:176)
at com.sap.tut.wd.tutwd_table.tablecomp.wdp.IPublicTableComp$IProductsElement.wdGetObject(IPublicTableComp.java:437)
at com.sap.tc.webdynpro.progmodel.context.MappedNodeElement.wdGetObject(MappedNodeElement.java:351)
at com.sap.tc.webdynpro.progmodel.context.AttributePointer.getObject(AttributePointer.java:158)
... 81 more
How to over come this
Thanks in advance,
Shabeer ahmed.
Hi,
Go through the below thread:
In TableComp Controller: change the code as below in the method getProductsTOTAL_PER_ARTICLE()
public java.math.BigDecimal getProductsTOTAL_PER_ARTICLE(IPrivateTableComp.IProductsElement element)
{
//@@begin getProductsTOTAL_PER_ARTICLE(IPrivateTableComp.IProductsElement)
BigDecimal bigDecimal0=new BigDecimal("0");
BigDecimal bigDecimalQty=new BigDecimal(""+element.getQUANTITY());
return element.getQUANTITY() < 0
? bigDecimal0
: bigDecimalQty.multiply(element.getPRICE());
//@@end
}
And also change the method getTotalPriceAMOUNT in TableCompBasketView as below.
public java.math.BigDecimal getTotalPriceAMOUNT(IPrivateTableCompBasketView.ITotalPriceElement element)
{
//@@begin getTotalPriceAMOUNT(IPrivateTableCompBasketView.ITotalPriceElement)
BigDecimal total = new BigDecimal("0"), pricePerProduct;
int n = wdContext.nodeProducts().size();
for (int i = 0; i < n; ++i) {
total = total.add(wdContext.nodeProducts().getProductsElementAt(i).getTOTAL_PER_ARTICLE());
}
return total;
//@@end
}
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Hav you downloaded from this loaction:
Ready-to-use project: The ready-to-use project is available to _download from SDN.
Regards,
Charan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Working with Tables in Web Dynpro
A) Creating Tables
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.