‎2007 Aug 29 8:31 AM
Hi guys,
My scenario is like this
Whil doing migo for the same batch number more than 3 times i should not allow to post the document.
I have the material number and batch number in a seperate ztable
for checking this found out there is an exit.
Enhacmenet - MBCF0002
EXIT_SAPMM07M_001
I have written code in the above exit as
select count(*) from ztable
into t_charg
where matnr eq i_mseg-matnr
and charg eq i_mseg-charg.
if t_charg gt 3.
call function 'POPUP_DISPLAY_MESSAGE'
exporting
titel = 'Error Message'
msgid = 'BD'
msgty = 'E'
msgno = '899'
msgv1 = 'Batch Already Received 3 Times'.
if sy-ucomm = 'OKAY'.
elseif sy-ucomm = 'RW'.
else.
endif.
endif.
The program works fine and gives a pop up message and when i post the document
it still gets posted.
I should not allow to post the document
Help me on this issue?
Regards
Senthil
‎2007 Aug 29 8:34 AM
this happens with 'POPUP_DISPLAY_MESSAGE'.
so instead use
message e001(zmesg) type 'E'.
gve desription in long text of message
reward points if it helps
Message was edited by:
abapuser
‎2007 Aug 29 8:34 AM
this happens with 'POPUP_DISPLAY_MESSAGE'.
so instead use
message e001(zmesg) type 'E'.
gve desription in long text of message
reward points if it helps
Message was edited by:
abapuser
‎2007 Aug 29 10:28 AM
thanx for the reply
Ihave created a message class z001 and maintained a message(001)
but when i am trying to activate it says
Field "Z001" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .
whether i need to include anything in the program for message class
senthil