cancel
Showing results for 
Search instead for 
Did you mean: 

How to display BAPI decimal values into webdynpro!

Former Member
0 Kudos

Hi All,

I have a problem to display decimal values from R/3 system to webdynpro table.

Iam using structure there declared all the varaibles as decimal 15,2 .

But I am not able to disply the decimal values intable of webDynpro.

Please help me for this.

Thanks in advance.

BHI

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You can use the below code to fix the no. of decimal places you want to show.

NumberFormat nf = null;
nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(2);
nf.setMinimumFractionDigits(2);

Hope this helps you all.

Former Member
0 Kudos

I have used for currencies the simple type currency included in Web Dynpro.

With other decimals when Web Dynpro is not showing it the way I want it I use Strings and do all the checking myself. Then I have full control.

Frank

Former Member
0 Kudos

BHI,

<i>But I am not able to disply the decimal values intable of webDynpro</i>

Ok, the type is not decimal. Is string or integer?

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi Valery,

Same problem. Mapped the table to the output of the Bapi.

The Currency fields in the bapi are being converted into type decimal with respective decimal places in the model.

But in case of examples like 21.20 only 21.2 being displayed. or incase of 21.00 only 21 being displayed.

Former Member
0 Kudos

Could you describe how you fixed this issue please. Since I have the same issue.

Thanks in advance

Former Member
0 Kudos

Even i'm also having same issue. can you please explain if solved

Former Member
0 Kudos

Use this below code to format the decimal attribute to make sure to display 2 decimal points.

currencyAttrInfo = wdContext.nodexxxxxt().getNodeInfo().getAttribute('metricColumnName');

currencyAttrInfo.getModifiableSimpleType().setFormat("###,###,###,###,##0.00");

Yashpal
Active Contributor
0 Kudos

Hi,

as u r importing RFC model all the datatypes in java side corresponding to r/3 are also created .

see in the dictonary of ur project .simple and structure type are created and u can use it.

and u r storing the data in some model node so when u r using table control rightclick on table and select structure binding it will display the context in ur view and from there u can select the attributes u want to display.

if u r copying data of modelnode to value node u can also select structure binding option in wizard which set the datatype for the attributes .

thanks,

yashpal