09-11-2008 12:51 PM
Hi,
I am getting short dump in the function module 'CONVERSION_EXIT_TSTRG_OUTPUT' at 35 th line.
pls can any one give me the solution.
Regards.
Haritha.
09-11-2008 12:54 PM
what does the error say?
pk
Edited by: prashanth kishan on Sep 11, 2008 5:24 PM
09-11-2008 2:04 PM
Hi,
Thanks for u r response.Actually the problem which i am getting is unable to iterpret 9,00 as a number.
but if i will give different input on the selection screen i am getting output.i.e only for one input i am getting dump.
i faced this problem so many times pls can u give me any solution.
Regards
Haritha.
09-11-2008 1:00 PM
Check this sample usage of the function.
REPORT ZTEST_EXIT_OUT.
data: duration(10).
data: input type tstrgenseg-breaks.
input = '12344535'.
CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT'
EXPORTING
input = input
IMPORTING
OUTPUT = duration
.
write duration.
09-11-2008 2:05 PM
Hi,
Thanks for u r response.Actually the problem which i am getting is unable to iterpret 9,00 as a number.
but if i will give different input on the selection screen i am getting output.i.e only for one input i am getting dump.
i faced this problem so many times pls can u give me any solution.
Regards
Haritha.
02-09-2011 1:59 PM
Apologies for thread necro... ^^ Your problem is caused by your default decimal notation.
I've come up against this problem myself today... anyone got a proper solution?
More details.
DATA: lv_duration TYPE vtts-gesztd.
* I PULL GESZTD FROM VTTS INTO LV_DURATION
CALL FUNCTION 'CONVERSION_EXIT_TSTRG_OUTPUT'
EXPORTING
input = lv_duration
IMPORTING
output = lv_duration.
Since Input/Output aren't typed in the function module they assume the type of the variable given to them (VTTS-GESZTD), this is numeric type (DEC length 11 with 0 decimals).
Almost all of us have our user parameters set up to show numbers as
1,234,567.89
We have one guy in the office set up to show
1.234.567,89
The function module crashes for him.
In debug mode I see that the function module will transform the input to, for example, 19,00 for him and it'll crash trying to assign that to the OUTPUT param being unable to interperet it as a number. For me it assisgns 19.00 with no problems.
Debugging and modifying the local value in the function before it is assigned to the OUTPUT param I can force it to dump or run fine by interchanging the ',' and the '.'.
It's definitely a problem that SAP has internally with the decimal notation.
So, I've solved it (temporarily) by assigning a char10 to the output param and then working on the char field myself to convert it to a number... still, I shouldn't have to.
Anyone know of an actual solution to this?
Thanks for your time and help,
P.