‎2009 Sep 08 8:07 AM
Hi all,
I am getting shot dump because MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO what i have to do please give me some idea to solve this what i have to do
377 CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
378 EXPORTING
379 filename = p_flnm
380 i_begin_col = '1'
381 i_begin_row = '1'
382 i_end_col = '50'
383 i_end_row = '65500'
384 TABLES
385 intern = gt_excel
386 EXCEPTIONS
387 inconsistent_parameters = 1
388 upload_ole = 2
389 OTHERS = 3.
390 IF sy-subrc <> 0.
>>>> MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO (point of termination)
392 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
393 ENDIF.
‎2009 Sep 08 8:40 AM
hi venkee,
That dump is because of message ID. here you may be getting a space in to the message ID field. which is not a componant( A E W I S X ). check in debug what is the value that you get into the variable message-ID.
If that message statement is of not mandatoryfor ( sy-subrc = 0) then comment it out or type message if it is sy-subrc<> 0 .
award points if useful.
Thanks and regards,
Penchala reddy A.
‎2009 Sep 08 8:40 AM
hi venkee,
That dump is because of message ID. here you may be getting a space in to the message ID field. which is not a componant( A E W I S X ). check in debug what is the value that you get into the variable message-ID.
If that message statement is of not mandatoryfor ( sy-subrc = 0) then comment it out or type message if it is sy-subrc<> 0 .
award points if useful.
Thanks and regards,
Penchala reddy A.
‎2009 Sep 08 9:05 AM
Hello,
Thanks for information and i am getting the value 000 for the variable.
if i comment this statements it wont be any problem for us?pleas give me the information so that i will comment.
390| IF sy-subrc <> 0. |
>>>>> | MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO |
392 | WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. |
| 393| ENDIF.
‎2009 Sep 08 9:11 AM
Hello,
Thanks for information and i am getting the value 000 for the variable.
if i comment this statements it wont be any problem for us?pleas give me the information so that i will comment.
390| IF sy-subrc <> 0. |
>>>>> | MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO |
392 | WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. |
| 393| ENDIF.
‎2009 Sep 08 9:15 AM
Hi,
Try like this instead.
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.KR Jaideep,
‎2009 Sep 08 9:22 AM
I am using like this but getting error so please give me some idea.
390| IF sy-subrc <> 0. |
>>>>> | MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO |
392 | WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. |
| 393| ENDIF.
‎2009 Sep 08 9:27 AM
Hi,
Then do like this.
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.KR Jaideep,
‎2009 Sep 08 9:28 AM
i am maintain like this check once.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2009 Sep 08 9:44 AM
‎2009 Sep 08 9:51 AM
Hi check at runtime whether you get all the values in variables SY-MSGID , SY-MSGTY , SY-MSGNO . Also this particular message number should have a facility of accepting 4 variables. check in SE91 if you have 4 & against that message.
The number of parameters in your message stmt and that in SE91 should match
Thanks
‎2009 Sep 08 10:08 AM
Hi,
I am comparing sy-subrc lessthen or greaterthen equal to 0.
venkat
‎2009 Sep 08 10:33 AM
hi venkee,
here i can see two defects.
1) the statement at line no 390 may not be correct if sy-subrc 0 should be aither SY-SUBRC EQ 0 or SY-SUBRC NE 0.
2) sorry for the mis understanding please check the msgty not msgID. message typ should be aither A E X I S W but you may be getting a space into the message typ.
if you want to check sy-subrc eq 0. i dont think you need to display a message so comment the code.
IF SY-SUBRC EQ 0.
NOTHING TO CODE HERE.
ENDIF.
elseif you are checking for SY-SUBRC NE 0.
Tthen give the code there in between
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.
IF EVEN THEN IT DUMPS THEN COMMENT OUT THE CODE AND GIVE YOUR USER DEFINED ERROR MESSAGE.
Thanks and Regards,
Penchala Reddy A.