01-06-2010 1:04 PM
Hello all,
I have designed one screen, and throwing error message if perticular filed is blank as (message e002(z2)). If i keep the filed blank system is throwing error message but giving short dump because of 'Conversion error' .
Error analysis : 'The program has been interrupted and cannot resume. |
Program "SAPMZTIMECOLLECT_NEW" attempted to display fields on screen 0101. |
| An error occurred during the conversion of this data. '
Please, could you help to understand why system is giving short dump.
Thanks in advance..!!
01-06-2010 1:09 PM
Is it a numeric field that isn't initialized before the screen is called? Or, are you doing something that attempts to mix numeric fields with character data?
01-06-2010 1:17 PM
Thanks Dave Lindsey .
It's Employee number filed having data type NUMC. My code is as:
If t_afru-emp is inital.
message E001(Z2).
endif.
here, message = 'Enter employee number."
Now, on screen if i left the EMP filed blank system is giving error message in the ststus bar as per requirement, but simulteniouly it's giving short dump because of conversion error.
Now, on screen my EMP filed is blank then what conversion is being carried out that i didn't get?
01-06-2010 1:21 PM
try this..
if...
message ..... type 'S' display like 'E'.
EXIT.
endif...
01-06-2010 1:29 PM
Read the part how to correct the error in dump analysis
This can also happen when there is no enough space in the screen to print the data
for ex: sy-datum in progarm holds 8 digits and in screen 10.
Refer the field to the dictionary type and check.
this has nothing to do with the message statement.
01-06-2010 1:58 PM
Thanks Keshav.
Error Analysis is as:
Error analysis |
The program has been interrupted and cannot resume. |
Program "SAPMZTIMECOLLECT_NEW" attempted to display fields on screen 0101. |
An error occurred during the conversion of this data. |
If i enter the value in field EMP, program don't give short dump, only if i left the filed blank, it is giving short dump after executing message statement in the program.
01-06-2010 2:18 PM
01-06-2010 2:28 PM
I guess the conversion takes place automatically right? If so please:
- check the domain used for this field
- in that domain check value in field Convers. routine
- go to se37 and check function modules like CONVERSION_EXIT_XXX_INPUT and CONVERSION_EXIT_XXX_OUTPUT where XXX is name checked in previous step
- check the code inside both functions and analyze why it is not working for initial field
- you can also set External breakpoint in both functions to force program stop there while performing conversion
Conversion is a system task so always takes place first, before custom code, that's why you are not reaching your message ...
Regards
Marcin
03-12-2010 8:33 AM
In the screen attributes of the screen field choose dictionary tab and check to which dictionary type its refered.
Changing that to numc will solve your problem.
03-12-2010 10:17 PM
Solved for me.
If we don't have value for the field which we are passing it to tablecontrol, then declare the variable with the same type and assigned space for the same and submit it to table control output. then the error is not coming.
Ex: If we dont have the value for the table control field (KOSTL), then declare one constant K_KOSTL LIK below,
DATA:K_KOSTL TYPE KOSTL.
K_KOSTL = ' '.
IF the value of table control field is initial, then pass K_KOSTL to it.
This what I have done.
Regards
Ramesh.
01-06-2010 1:14 PM
Hi
What is the data type of the field on the screen?? give more details about the field.
Vishwa.
01-06-2010 6:59 PM
Hi Renuka,
From your problem description it seems you are expecting a value in this field at all times. So could you please try declaring this field as a mandatory (OBLIGATORY) field so that the system would take care when the field is left blank?
Thanks,
Pritam
01-07-2010 4:21 AM
Thanks to all of you....!!!
Pritam, I cann't make the filed obligatory as it's table control.
Keshav, I am getting short dump at line 'message E001(Z2)' line. The message is 'Enter Goods Qty.' of type 'E'. With short dump system is showing error message as well., which indicates that dump is coming while executing the error message.
If i chnged the message syntax as "message S001(Z2) display like 'E' ", system is not giving dump, but with this syntax 'SET CURSOR FIELD' command to put cursor focus on that perticular filed is not working.
01-07-2010 4:22 AM
Thanks to all of you....!!!
Pritam, I cann't make the filed obligatory as it's table control.
Keshav, I am getting short dump at line 'message E001(Z2)' line. The message is 'Enter Goods Qty.' of type 'E'. With short dump system is showing error message as well., which indicates that dump is coming while executing the error message.
If i chnged the message syntax as "message S001(Z2) display like 'E' ", system is not giving dump, but with this syntax 'SET CURSOR FIELD' command to put cursor focus on that perticular filed is not working.
01-07-2010 8:02 AM
Are you validating the table control entries in chain - end chain statement ?
01-07-2010 8:08 AM
just declere the employee number field in character,i think it will works
01-07-2010 8:09 AM
mostly it will occurs when proper declaration of variables is not done.so try to change the declaration of the varaible
01-08-2010 4:10 AM
Thanks to all...
Hari, the dump is not only getting for Employee number filed, it is just example I gave. Dump is getting while executing all the
message statements of type 'E'.
If i use syntax for message as 'message S001(Z2) display like 'E', system don't give dump, but with this syntaxt 'SET CURSOR FIELD' command don't work. So, I tried 'STOP' after message statement, for 'STOP' also system is giving dump.
Yes Keshav, I am validating the table control entries in chain - end chain statement.
01-07-2010 8:10 AM
mostly it will occurs when proper declaration of variables is not done.so try to change the declaration of the varaible
01-07-2010 8:15 AM
@always_hari
-I dont think that its because of the variable type,
its stated that the error occurs in the message statement,
That too if the input is given then the error doesnt occur.
Pretty Confusing
03-11-2010 9:50 PM
Hi All,
I am also facing the same problem.
Can any one provide the solution for the same.
Thanks a lot.
Regards
Ramesh.