cancel
Showing results for 
Search instead for 
Did you mean: 

Development

Former Member
0 Kudos

When a PO is created from requisition relating to work order I want to send a mail by outloook to the person who have created the work order.

plz help me to develop this functionality

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The first thing you need to do is to find out the event that is triggered when the Work order is created. You can use tcode SWELS to swtich the Event trace on. then create the work order and use tcode SWEL to see what event is triggered.

SWEL gives you the Business Object Type and the Event. You can use this information as triggering point for your workflow.

If you question is how to send a notification the the person who created the work order, use the send mail step to send a notification and use &WF_INITIATOR& expression to identify the work order creator.

May be you can go thro the following links to know more about it.

http://help.sap.com/saphelp_nw04/helpdata/en/b1/8b753a5e831e45e10000000a114084/frameset.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/71/a8a77955bc11d194aa0000e8353423/frameset.htm

http://help.sap.com/saphelp_erp2004/helpdata/en/c5/e4af8b453d11d189430000e829fbbd/frameset.htm

Hope these help

<b>Reward points</b>

Regards

Former Member
0 Kudos

let me explain again.

work order is created by a person.this will generate a purchase requisitin

i want to notify the person who has created work order when this requisition is converted to purchase order.

hope you understand

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vikrant,

Hereby u can check the sales order will be sent to the mail box similarly we can do it for purchase order. kindly try this .....

SAP Send mail via ABAP functions SO_NEW_DOCUMENT_SEND_API1

This abap mail sending program demonstrate how you can send a mail to the user SAP Office mailbox.

REPORT ZSEND .

TABLES: KNA1.

  • data for send function

DATA DOC_DATA LIKE SODOCCHGI1.

DATA OBJECT_ID LIKE SOODK.

DATA OBJCONT LIKE SOLI OCCURS 10 WITH HEADER LINE.

DATA RECEIVER LIKE SOMLRECI1 OCCURS 1 WITH HEADER LINE.

SELECT * FROM KNA1 WHERE ANRED LIKE 'C%'.

WRITE:/ KNA1-KUNNR, KNA1-ANRED.

  • send data internal table

CONCATENATE KNA1-KUNNR KNA1-ANRED

INTO OBJCONT-LINE SEPARATED BY SPACE.

APPEND OBJCONT.

ENDSELECT.

  • insert receiver (sap name)

REFRESH RECEIVER.

CLEAR RECEIVER.

MOVE: SY-UNAME TO RECEIVER-RECEIVER,

'X' TO RECEIVER-EXPRESS,

'B' TO RECEIVER-REC_TYPE.

APPEND RECEIVER.

  • insert mail description

WRITE 'Sending a mail through abap'

TO DOC_DATA-OBJ_DESCR.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = DOC_DATA

IMPORTING

NEW_OBJECT_ID = OBJECT_ID

TABLES

OBJECT_CONTENT = OBJCONT

RECEIVERS = RECEIVER

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.

<b>Reward Pts if found worth :)</b>

Regards

Sathish