08-27-2007 5:39 PM
have to check for venum if the venum is present then it shd come out of the program
FORM validate_venum .
DATA : lv_venum TYPE vekp-venum.
SELECT handling_unit
UP TO 1 ROWS
INTO lv_venum
FROM zws_data
WHERE handling_unit EQ nast-objky.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e006 WITH lv_venum.
WRITE:/ sy-msgty, sy-msgno NO-GAP, ':', l_msg.
Write 😕 lv_venum, ' already present '.
ENDIF.
ENDFORM.
08-27-2007 5:42 PM
Hi,
FORM validate_venum .
DATA : lv_venum TYPE vekp-venum.
SELECT handling_unit
UP TO 1 ROWS
INTO lv_venum
FROM zws_data
WHERE handling_unit EQ nast-objky.
ENDSELECT.
IF sy-subrc NE 0.
MESSAGE e006 WITH lv_venum display like 'I'. "<<< Check this
ENDIF.
ENDFORM.
08-27-2007 5:45 PM
FORM validate_venum .
DATA : lv_venum TYPE vekp-venum.
SELECT SINGLE handling_unit
INTO lv_venum
FROM zws_data
WHERE handling_unit EQ nast-objky.
IF sy-subrc NE 0.
MESSAGE i006 WITH lv_vemun 'Already present'.
ENDIF.
ENDFORM.
Greetings,
Blag.
08-27-2007 5:55 PM
getting an error
A message ID has not been entered. You can specify this entry for the
whole program using the "MESSAGE-ID msgid" addition with the statment
that . or in number. - or in parentheses after the error number. -
how to get this solved
08-27-2007 6:02 PM
Put this in the beginning of your report...
REPORT zfir0004 MESSAGE-ID ZFI0001.
You need a MESSAGE-ID...Check transaction SE91 -:)
Greetings,
Blag.
08-27-2007 9:18 PM
FORM validate_venum .
DATA : lv_venum TYPE vekp-venum.
SELECT SINGLE handling_unit
INTO lv_venum
FROM zws_data
WHERE handling_unit EQ nast-objky.
IF sy-subrc NE 0.
<b>MESSAGE i001(ZMyMessageClass) WITH lv_vemun</b>
EXIT.
ENDIF.
ENDFORM.
double click on ZMyMessageClass or Go to SE91 and create the message class "ZMyMessageClass".
Enter Message number "001" and give the text: "Venum & not found"
Now, the message would look Venum 12345 not found.
01-19-2012 7:47 PM
Hi,
TRY THIS CODE...
IF sy-subrc NE 0.
DATA:TEXT TYPE STRING.
TEXT = lv_venum.
MESSAGE TEXT TYPE 'I'.
Write 😕 lv_venum, ' already present '.
ENDIF.
01-20-2012 12:26 PM
for displaying the message without any message ID, you can pop up the message with the SAP HELP message class straight away as below
message i888(sabapdocu) with '<<your message>>'. " for I type message
message e888(sabapdocu) with '<<your message>>'. "for E type message
eg.: message e888(sabapdocu) with 'its an error'.
try this and let me know whe