2020 Nov 24 8:53 AM
I want to execute following line:
write gs_header-wt_qsshh to detail-tax_base.
In the ABAP Custome Code check there is a warning (WRITE TO type conflict).
How I can resolve this since `detail-tax_base` has to be a char.
2020 Nov 24 9:40 AM
Char is correct. But currency 32.2 isn't going to fit in a char field of length 27. Btw, you should use the CURRENCY keyword when output currency
WRITE amount CURRENCY 'GBP' TO output.will give a different output to
WRITE amount CURRENCY 'HUF' TO output.But both outputs will be correct. Currency values are held to 2dp regardless of the decimals of the currency.
I want to execute following line:
write gs_header-wt_qsshh to detail-tax_base.
In the ABAP Custome Code check there is a warning (WRITE TO type conflict).
How I can resolve this since `detail-tax_base` has to be a char.
2020 Nov 24 9:32 AM
Hello 6e829fd780204f76b10f492049a3773c
Have a look at addition CURRENCY of the WRITE keyword: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapwrite_to_options.htm#!ABAP_ADDITION_6...
Basically you need to know what currency the amount is in, to format it correctly.
I'm not sure about the length of the target field in your case, though...
Kind regards,
Mateusz
2020 Nov 24 9:40 AM
Char is correct. But currency 32.2 isn't going to fit in a char field of length 27. Btw, you should use the CURRENCY keyword when output currency
WRITE amount CURRENCY 'GBP' TO output.will give a different output to
WRITE amount CURRENCY 'HUF' TO output.But both outputs will be correct. Currency values are held to 2dp regardless of the decimals of the currency.
2020 Nov 24 10:05 AM