2007 Aug 06 11:42 AM
i m running a program related to PO i m ending with dump with following reasons
Only message types A, E, I, W, S and X are allowed.
006760 CALL FUNCTION 'L_TO_CREATE_DN'
006770 EXPORTING
006780 i_lgnum = p_lgnum
006790 i_vbeln = i_tab-vbeln
006800 i_refnr = p_refnr
006810 i_teilk = p_teilk "Partial delivery creation
006820 it_delit = lt_delit
006830 EXCEPTIONS
006840 error_message = 1.
006850 IF sy-subrc NE 0.
006860 FORMAT COLOR COL_NEGATIVE.
006870 * MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
006880 * WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
006890 * INTO l_message.
006900 * WRITE: / sy-msgid, sy-msgno, l_message.
006910
006920 ELSE.
006930 FORMAT COLOR COL_POSITIVE.
006940 ENDIF.
-
> MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
006960 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
006970 INTO l_message.
006980 WRITE: / sy-msgid, sy-msgno, l_message.
006990 FORMAT COLOR COL_NORMAL.
007000 ENDIF.
can any plz give me the solution
its urgent
2007 Aug 06 12:10 PM
Hi
Try to remove this code
-
> MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
006960 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
006970 INTO l_message.
006980 WRITE: / sy-msgid, sy-msgno, l_message.
006990 FORMAT COLOR COL_NORMAL.
If sy-subrc = 0 than won't be any errow message, so you dont need it and as i understand the input of blank instead of A,E,W... cause the dump.
Regards
Yossi
2007 Aug 06 11:44 AM
In debug mode what is the value of the field sy-msgty .
Only message types A, E, I, W, S and X are allowed.
2007 Aug 06 11:45 AM
The function module hasn't issued an error message (so the SY fields are empty). Debug the program and code some error handling specific to your scenario.
Regards,
Nick
2007 Aug 06 11:45 AM
Do not specify sy-msgty in the message statement. Instead specify the message type that you want to appear.
MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO l_message.Please mark points if the solution was useful.
Regards,
Manoj
2007 Aug 06 12:00 PM
Set a break point after "006840 error_message = 1." and check the values in SY-sy-msgid, sy-msgty, etc... I think you may find that they are not set as they are outside the "IF sy-subrc NE 0."
2007 Aug 06 12:04 PM
Hi,
From your error it appears as if sy-msgty is initial.
Just check the system fields before you can use them in MESSAGE statement.
Best way is to first find out the value of these system fields in debug mode.
Nice info on System fields that effected by Messages and when they are effected.
<b>Messages</b>
If you execute the MESSAGE statement, the following system fields are set. If you execute the MESSAGE RAISING statement in function modules and methods, these fields are also set in the calling program, if it handles the exception.
SY-MSGID
SY-MSGID contains the message ID.
SY-MSGNO
SY-MSGNO contains the message number.
SY-MSGTY
SY-MSGTY contains the message type.
SY-MSGV1, ,SY-MSGV4
SY-MSGV1 to SY-MSGV4 contain the field contents that are used for the messages placeholders.
<b>Special Actions that Fill Message Fields</b>
If you request database locks using the ENQUEUE function module, the field SY-MSGV1 contains the name of the user who holds the lock, in the case of the FOREIGN_LOCK exception.
IN the case of CALL TRANSACTION or CALL DIALOG with the USING addition, a message displayed during the called screen sequence is returned in the fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, ... , SY-MSGV4.
During Remote Function Call (RFC), error messages are transferred from the remote system to the calling system and SY-MSGID, SY-MSGTY, SY-MSGNO,SY-MSGV1, SY-MSGV2, SY-MSGV3, SY-MSGV4 are set. If short dumps or type X messages occur, the system also sets the fields.
Regards,
Sesh
2007 Aug 06 12:10 PM
Hi
Try to remove this code
-
> MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
006960 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
006970 INTO l_message.
006980 WRITE: / sy-msgid, sy-msgno, l_message.
006990 FORMAT COLOR COL_NORMAL.
If sy-subrc = 0 than won't be any errow message, so you dont need it and as i understand the input of blank instead of A,E,W... cause the dump.
Regards
Yossi