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

Blank msgtyp return

Former Member
0 Likes
818

Hi everyone,

I have a situation where a function module is returing a " " msgtyp which throws the dump with exception

MESSAGE_TYPE_UNKNOWN.

Function module is MS_EXCEL_OLE_STANDARD_DAT.

What is the best way to handle this.

Regards,

DNP

1 ACCEPTED SOLUTION
Read only

former_member181966
Active Contributor
0 Likes
658

Include " LKKBLF90"

FYI

 
  call function 'MS_EXCEL_OLE_STANDARD_DAT'
       exporting
            file_name                 = 'C:\SAPPCADM\ALV_TEST'
            create_pivot              = 0
*           DATA_SHEET_NAME           = ' '
*           PIVOT_SHEET_NAME          = ' '
*           PASSWORD                  = ' '
*           PASSWORD_OPTION           = 0
       tables
*           PIVOT_FIELD_TAB           =
            data_tab                  = lt_data
            fieldnames                = lt_fnames
       exceptions
            file_not_exist            = 1
            filename_expected         = 2
            communication_error       = 3
            ole_object_method_error   = 4
            ole_object_property_error = 5
*            invalid_filename          = 6
            invalid_pivot_fields      = 6
            download_problem          = 7
            others                    = 8.
  *if sy-subrc ne 0.*
    *message id sy-msgid type sy-msgty number sy-msgno*
            *with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.*
  *endif.*

^Saquib

.

3 REPLIES 3
Read only

vinod_vemuru2
Active Contributor
0 Likes
658

Hi,

Welcome to SDN.

After calling the FM through pattern by default u might be getting some thing line below.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

If u uncommented above message then just comment itout and issue your own message.

IF sy-subrc <> 0.

*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

MESSAGE 'Unknown error' TYPE i.

ENDIF.

U can give appropriate message text and type.

Thanks,

Vinod.

Read only

former_member181966
Active Contributor
0 Likes
659

Include " LKKBLF90"

FYI

 
  call function 'MS_EXCEL_OLE_STANDARD_DAT'
       exporting
            file_name                 = 'C:\SAPPCADM\ALV_TEST'
            create_pivot              = 0
*           DATA_SHEET_NAME           = ' '
*           PIVOT_SHEET_NAME          = ' '
*           PASSWORD                  = ' '
*           PASSWORD_OPTION           = 0
       tables
*           PIVOT_FIELD_TAB           =
            data_tab                  = lt_data
            fieldnames                = lt_fnames
       exceptions
            file_not_exist            = 1
            filename_expected         = 2
            communication_error       = 3
            ole_object_method_error   = 4
            ole_object_property_error = 5
*            invalid_filename          = 6
            invalid_pivot_fields      = 6
            download_problem          = 7
            others                    = 8.
  *if sy-subrc ne 0.*
    *message id sy-msgid type sy-msgty number sy-msgno*
            *with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.*
  *endif.*

^Saquib

.

Read only

Former Member
0 Likes
658

Thanks Everyone, Rewarded the points

Regards,

DNP