‎2008 Aug 29 3:21 PM
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
‎2008 Aug 29 3:36 PM
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
.
‎2008 Aug 29 3:35 PM
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.
‎2008 Aug 29 3:36 PM
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
.
‎2008 Aug 29 3:48 PM