Skip to Content
avatar image
Former Member

How to display BAPI decimal values into webdynpro!

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 20, 2006 at 05:45 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 20, 2006 at 10:26 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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");

  • avatar image
    Former Member
    Nov 09, 2009 at 05:30 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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