‎2010 Jun 11 4:48 PM
Hi
I have created a Custom Function Module. In EXPORT Parameters, I have:
STPRS Type STPRS "Decimals 2
BWPRH Type BWPRH "Decimals 2
VJBWH Type VJBWH. "Decimals 2It wored fine. After that, I have changed the Parameters:
STPRS Type ZSTPRS "Decimals 5
BWPRH Type ZBWPRH "Decimals 5
VJBWH Type ZVJBWH. "Decimals 5And activated it.
Now when in want to execute this FM (F8), it's short dumping:
Here's the Error Analysis:
Runtime Errors CONNE_IMPORT_WRONG_FIELD_DECS
Exception CX_SY_IMPORT_MISMATCH_ERROR
Short text
Error during the IMPORT of object "%_VSTPRS".
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
not caught in
procedure "EXPORT_IMPORT" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
During the import of the field "%_VSTPRS", it was discovered that it has a
different number of decimal places in the dataset to in the program
"Z_GET_COSTS==========FT".
The number of decimal places in the dataset is 2, whereas in the
program it is 5.Can anybody please let me know what went wrong? Thanks much.
‎2010 Jun 11 4:54 PM
As is so often the case, the full and precise reason for the dump is clearly stated in the text of the dump. If you'll read and act upon that, particularly the different number of decimals places, you will fix your error.
‎2010 Jun 11 5:10 PM
Hi there,
Yes. I know that I can details from ST22 Analysis. And I did go through that.
Here's the Section that explains:
How to correct the error
Try to find out why the number of decimal places of the field should be
2.
There are various possible options:
1. The number of decimal places of the imported field has changed in the
Data Dictionary. Make sure that the number of decimal places of the
imported field matches the number of decimal places of the field in
the Data Dictionary.
If the data cannot be restored from another source, the data of the
'old' structure must be read by the 'old' structure, converted und
again eported with the new structure, so that future IMPORTs will
always function with the new structure.
2. A new program version is active, which no longer fits the dataset.
Try to solve the error generating the program
"ZFI_FM_GET_STD_COSTS==========FT" again. This
works as follows: Select transaction SE38 in the SAP system. Enter
the program name "Z_GET_COSTS==========FT". Then activate the
function 'Generate'.1. I made sure that the decimal places matches.
2. I did re-generate the program.
But still got the same dump. Interestingly, the program where I am using this FM is working absolutely fine.
Thanks.
‎2010 Jun 11 6:32 PM
‎2010 Jun 11 6:32 PM
‎2010 Jun 11 6:36 PM
@ Ravi
Just paste the code snippet where the dump is taking place.
‎2010 Jun 11 6:37 PM
@ Ravi
Just paste the code snippet where the dump is taking place.
‎2010 Jun 11 6:28 PM
Hi Ravi
I think the last two lines of the error analysis section of the dump clearly states the reason for the same.
this variable is used in two different places and there is a mismatch in the data types assigned to it or for that matter the decimals assigned to them. Just make the decimal places same (either two or five as per your requirement) and then check. The dump will be gone and your FM will work fine.
Hope this helps.
Harsh
‎2015 Mar 03 11:43 AM
Hi Ravi,
I am facing similar type of issue. Can you please let me know the solution for this issue.
Thanks,
Ramana Tarapatla
‎2015 Mar 03 4:21 PM
Hi,
See the last two lines of your dump which says
The number of decimal places in the dataset is 2, whereas in the
program it is 5.
So there is mismatch in decimal places with respect to the parameter of your FM.
Please change either the paramter decimal places to 2 or change the data decimal places to 5.
Regards,
Rafi
‎2016 Feb 17 6:25 AM
Hi,
Try replacing the import/export parameter name which cause issue with new name and activate the Function module.
Regards,
Shandrakanth
‎2016 Feb 17 5:20 PM