08-23-2006 4:34 PM
Hi everybody,
i made some controls for items order using the User-Exit EXIT_SAPMM06E_006.
If the control don't pass, i display an error message using MESSAGE instruction.
The probleme is when i'm doing it, the Error message is display in the task bar, as a general message and not just for the item controlled (statut field).
So how can i do to display my message with the message list for the item ?
Thanks in advance.
08-23-2006 4:48 PM
Hi,
Try to use the macro mmpur_message for displaying the errors in the list..
Also check for all the macros in the include MM_MESSAGES_MAC..
Thanks,
Naren
08-23-2006 4:48 PM
Hi,
Try to use the macro mmpur_message for displaying the errors in the list..
Also check for all the macros in the include MM_MESSAGES_MAC..
Thanks,
Naren
08-23-2006 5:30 PM
Hi,
You have to use function module ME_LOG_SAVE for including your messages in the application log.
Please check the below similar code. You may have to use OOPs concepts to add messages to the application log.
FORM mepo_save_aplg_messages.
DATA: l_log_handles TYPE bal_t_logh.
FIELD-SYMBOLS: <l_hdl> LIKE LINE OF l_log_handles.
CHECK fc_vorga EQ cva_en.
CHECK NOT gf_id IS INITIAL.
CHECK ekko-memory NE space OR
*ekko-memory NE space.
IF NOT gf_log_handle_read[] IS INITIAL.
INSERT LINES OF gf_log_handle_read[] INTO TABLE l_log_handles.
prepare old logs for deletion
LOOP AT gf_log_handle_read ASSIGNING <l_hdl>.
CALL FUNCTION 'ME_LOG_DELETE'
EXPORTING
im_log_handle = <l_hdl>
EXCEPTIONS
error_message = 1
OTHERS = 2.
ENDLOOP.
ENDIF.
IF NOT gf_log_handle_save IS INITIAL.
INSERT gf_log_handle_save INTO TABLE l_log_handles.
ENDIF.
CHECK NOT l_log_handles[] IS INITIAL.
save deleted and new logs
CALL FUNCTION 'ME_LOG_SAVE'
EXPORTING
im_log_handles = l_log_handles
im_update_task = 'X'
EXCEPTIONS
OTHERS = 1.
ENDFORM.
Thanks,
ramakrishna
08-24-2006 2:15 PM
Thanks for your answers
it seems to work with mmpur_message macro.
The message is not added on the item messages list but on header message list. The result is the same, i can't save my order so it's why i want
I tried to use ME_LOG_SAVE function, but it appears to be very difficult to use.
So i think my problem is resolved. thanks
08-24-2006 5:27 PM
Hi Oliver,
How did you solve your problem. I am also looking for the same type of issue.
It would be grate full to me, if you provide the answer.
Thanks.
08-25-2006 6:46 AM
I just used macro
mmpur_message
, as indicated above.For exemple, to display an error message :
mmpur_message 'E' '00' '398' 'Error :' 'Table unknown' '' ''
Syntax is :
mmpur_message 'Type' 'ID' 'N°Message' 'var1' 'var2' 'var3' 'var4'
08-28-2006 8:30 PM
Hi Oliver I did the same thing....
But still I can able to hold the PO, I don't want to post or hold the PO.
Thanks,
08-25-2006 6:53 AM