‎2006 Sep 05 8:58 AM
Hi,
I should trigger the material pricing automatically.
i.e whenever a change in material price it should automatically update/trigger/change in the table and also trigger that change thru mail .
‎2006 Sep 05 9:15 AM
The table of the changes are: CDHDR and CDPOS.
You may write an ABAP which check MATERIAL changes in the table and send the values by SAPOFFICE mail or EMAIL.
And make the ABAP into a periodical job (runs in every 5 mins...)
Happy developing...
‎2006 Sep 05 12:26 PM
Hi,
Do you have any example can you please send that references.
‎2006 Sep 05 12:41 PM
For sending the mail here is the code,
FORM send_mail USING p_y16m_rcp_par STRUCTURE y16m_rcp_par.
Have a subject for the mail
g_s_document_data-obj_name = text-t02.
g_s_document_data-obj_descr = text-t03.
Fill receiver information
g_s_receivers-rec_type = p_y16m_rcp_par-rec_type.
g_s_receivers-rec_id = p_y16m_rcp_par-rec_id.
g_s_receivers-express = 'X'.
APPEND g_s_receivers TO g_t_receivers.
Call function to send mail
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = g_s_document_data
document_type = 'RAW'
PUT_IN_OUTBOX = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
OBJECT_HEADER =
object_content = g_t_object_content
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = g_t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " SEND_MAIL
Regards