‎2011 Aug 11 10:46 AM
Hello all,
I have an issue while displaying DMBTR field in one of zreport using basic list display.
DMBTR field is with 2 decimals but the output is coming with 4 decimals , resulting in display of wrong figures.
eg . instead of 621,000.00 rs 6,210.0000 is been shown.
I debugged and checked the type of output variable its coming right in debugger but in list display its getting wrong.
Thanks n regards ,
Sij.
‎2011 Aug 11 10:56 AM
Hi
Just check the number of decimal points that are assigned to the currency that is referencing your amount field that you have typed to DMBTR. You can check in table TCURX.
regards
Prince Isaac
‎2011 Aug 11 10:57 AM
Hi
Please check whether the final table [ which u pass to display ] DMBTR type is also type P decimal 2.
If this is correct please let me know .
Simple solution might be have the DMBTR value as Text for final table type. DMBTR TYPE TEXT.
Thanks
hariharan
‎2011 Aug 11 11:04 AM
hi Sij,
Are you wrinting the amount on to the list from DMBTR field direclty or moving it to some varibale and wrintg the same, can you please post your code for reference.
Meanwhile you also check with following FMs which can help you in formating amounts.
1.HRCM_STRING_TO_AMOUNT_CONVERT
2.BAPI_CURRENCY_CONV_TO_EXTERNAL
3. CONVERT_AMOUNT_TO_CURRENCY
4.CURRENCY_AMOUNT_DISPLAY_TO_SAP
5. CURRENCY_AMOUNT_SAP_TO_DISPLAY
Best Regards
Manoj
‎2011 Aug 11 11:05 AM
‎2011 Aug 11 11:15 AM
Hi
As you are currency this probelm will come .
give this code before write
SET COUNTRY SPACE.Please try this and let me know
Thanks
hariharan
‎2011 Aug 11 11:12 AM
Hi
You can also control it via field catalog.
GW_FCAT-FIELDNAME = 'DMBTR'.
GW_FCAT-COL_POS = '1'.
GW_FCAT-TABNAME = 'GT_FINAL3'.
GW_FCAT-SELTEXT_L = TEXT-120.
*GW_FCAT-decimals_out = 2.*
APPEND GW_FCAT TO GT_FCAT.
CLEAR GW_FCAT.Thanks
Hariharan
‎2011 Aug 11 11:15 AM
‎2011 Aug 11 11:39 AM
Dear all,
I got the solution actually instead of WRBTR i need to display DMBTR which i did. Coz in wrbtr the field was in USD and the requirement was to display the report in INR which is in DMBTR.
Now the INR field was displayed in USD format because of the below statement
GS_BSID-Z_WRBTR_S CURRENCY GS_BSID-WAERS LEFT-JUSTIFIED
since in WAERS the value was USD.
So i set the value WAERS as INR (default )
‎2011 Aug 11 12:00 PM
Hi
yes u need to use DMBTR that is for Local Currency
Thanks
Hariharan