‎2013 Oct 21 10:41 AM
Hi experts,
Breakdown time in format like 5.1840000000000000E+05 how it can be converted like 144.00
Thanks,
saquib Khan
‎2013 Oct 21 10:58 AM
Hello Saquib Khan.
DATA: fvar type f,
pvar type p decimals 2.
fvar = '5.1840000000000000E+05'.
pvar = fvar / 3600. "(to get your desired result 144.00 )
Regards.
‎2013 Oct 21 10:58 AM
Hello Saquib Khan.
DATA: fvar type f,
pvar type p decimals 2.
fvar = '5.1840000000000000E+05'.
pvar = fvar / 3600. "(to get your desired result 144.00 )
Regards.
‎2013 Oct 21 11:43 AM
Thanks Arun. I it works but I want to know the reason why in SAP many values are not in actual format but in exponent forms n why conversion is required.
regards,
Saquib
‎2013 Oct 21 11:49 AM
Very good question Saquib.
But frankly I don't know the reason behind it.
If I come to know it, I will let you know surely.
Regards.
‎2013 Oct 21 4:56 PM
Hi Saquib,
This is the output representation for an F type field.
Here you can find more informations:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e2335c111d1829f0000e829fbfe/content.htm
and subsequents:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
You can see an F field has a size of 8 bytes, but outputs with 22 characters.
Here
http://help.sap.com/saphelp_40b/helpdata/en/34/8e732f6df74873e10000009b38f9b8/content.htm
you can found an output example for P and F type fields.
If your question was about desing, well, we should try to guess... 🙂
Regards.
Danilo Schembri
‎2013 Oct 21 11:17 AM
Hi Saquib,
5.1840000000000000E+05 is in hex format(seconds i guess),so you need to move this to a integer then just divide by number as you with(by 60 for min and by 3600 for hr).
Regards,
Supratik