on 04-13-2016 8:38 AM
Hi Guys
I'm facing a issue with open hub file. After the file is generated to the user , I see keyfigure values are rounding up. user wants to see with decimal values.
The bex report is working fine with decimal values. But when it comes to file the key figure values are getting roundup which should not be.
please suggest me to solve this.
write field routine as following,
data : lv_value type p length 16 DECIMALS 3.
CLEAR LV_VALUE.
IF SOURCE_FIELDS-IO IS NOT INITIAL.
lv_value = SOURCE_FIELDS-IO.
IF LV_VALUE IS NOT INITIAL.
RESULT = LV_VALUE.
IF LV_VALUE LT 0.
SHIFT RESULT RIGHT DELETING TRAILING '-'.
SHIFT RESULT LEFT DELETING LEADING ' '.
CONCATENATE '-' RESULT INTO RESULT.
ENDIF.
ENDIF.
else.
RESULT = '0.000'.
ENDIF.
It will remove trailing space, add - sign to right and decimal places as you want you can define in the code.
Just replace info object with your info object.
Thanks,
Bhavin Vyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bhavin
Could you pls explain why i need to write routine. I have bex report on multiprovider where keyfigure values are as expected eg 4863.78.
I have open hub on multiprovider and data goes to file, here in the file keyfigures are seen as eg.4864.
The values are rounding up. could you pls give solution for this.
Hi Chaitanya
Check the OpenHub file definition . Did you use InfoObject template in field definition of OpenHub ?
Do you have decimal places defined ? Routine what Bhavin has provided is used to bring negative ( -1) sign to the front. In case of openhub , it normally goes after the number.
Like in BEx if you see -100.12 in OpenHub it becomes 100.12- . Minus sign at the end.
You can also make the target field in OpenHub as CHAR and see if that resolves the problem .
Regards
Anindya
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.