Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Short Dump for Z Function Module

VenuAnumayam
Participant
0 Likes
1,718

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 2

It wored fine. After that, I have changed the Parameters:

STPRS Type ZSTPRS      "Decimals 5
BWPRH Type ZBWPRH   "Decimals 5
VJBWH Type ZVJBWH.  "Decimals 5

And 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.

11 REPLIES 11
Read only

Former Member
0 Likes
1,324

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.

Read only

0 Likes
1,324

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.

Read only

0 Likes
1,324

@ Ravi

Just paste the code snippet.

Read only

0 Likes
1,324

@ Ravi

Just paste the code snippet.

Read only

0 Likes
1,324

@ Ravi

Just paste the code snippet where the dump is taking place.

Read only

0 Likes
1,324

@ Ravi

Just paste the code snippet where the dump is taking place.

Read only

Former Member
0 Likes
1,324

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

Read only

Former Member
0 Likes
1,324

Hi Ravi,

I am facing similar type of issue. Can you please let me know the solution for this issue.

Thanks,

Ramana Tarapatla

Read only

Former Member
0 Likes
1,324

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

Read only

Former Member
0 Likes
1,324

Hi,

Try replacing the import/export parameter name  which cause issue with new name and activate the Function module.

Regards,

Shandrakanth

Read only

Former Member
0 Likes
1,324

Hi,

Please see the component types used in FM.

Regards,

Rafi