2008 Jun 02 11:52 AM
hi friends,
I think this is for the third time i'm posting the same thread but i'm not getting the exact answers which i wanted to have.My requiremebt is very clear :
1.I want to send a mail to a person whenever a po is made in the system(ME21N) through Workflows.
2.I used object type BUS2012 in workflows but again it does not have any event like "Create Purchase Order" rather it has got everything except my requirement like change,release,reject,cancel PO.
3.Possible Solution are : to create own object type but how?
4.If object type is created then how to assign event for creation of PO.
Please give me the answers.
Thanks and Regards,
Gaurav
2008 Jun 02 12:02 PM
hi
please post ur query in
this forum
Expert Forums » SAP NetWeaver » BPM and Workflow
Forum: BPM and Workflow
hi
please post ur query in
this forum
Expert Forums » SAP NetWeaver » BPM and Workflow
Forum: BPM and Workflow
2008 Jun 02 12:02 PM
hi
please post ur query in
this forum
Expert Forums » SAP NetWeaver » BPM and Workflow
Forum: BPM and Workflow
2008 Jun 02 12:06 PM
Hi Gaurav,
refer this,
http://www.sapfans.com/forums/viewtopic.php?f=26&t=9921&p=40585
cheers
Mohinder Singh
2008 Jun 02 12:42 PM
HI
Pls refer the below link
u can get complete info..
http://saptechnical.com/Tutorials/Workflow/Workflow.htm
You can use the following function modules to trigger the workflow templates, in background.
SWE_EVENT_CREATE can be used to trigger an event statically, (If triggering events are defined for your workflow template. Also check whether the event linkage is active or not)
SAP_WAPI_START_WORKFLOW can be used to trigger the workflow template directly.
This is the sample code, used in one of my objects, for calling the function module SWE_EVENT_CREATE.
REPORT ZTESTING1 .
tables :
ZOPM_OBJKEY.
data :
object key
objectkey type SYSUUID_C,
objkey like sww_contob-objkey.
defining the event container..........................................
data begin of event_container occurs 0.
include structure swcont.
data end of event_container.
workitem list
data :
t_wid like SWOTOBJID occurs 0 with header line.
clear event_container.
refresh event_container.
CALL FUNCTION 'SYSTEM_GET_UNIQUE_ID'
EXPORTING
DCE_COMPATIBLE = 1
IMPORTING
UNIQUE_ID = objectkey.
objkey = objectkey.
clear objectkey.
call function 'SWC_ELEMENT_SET'
exporting
element = 'CONTEXT'
field = 'UAD'
tables
container = event_container
exceptions others = 1.
call function 'SWC_ELEMENT_SET'
exporting
element = 'SUBJECT'
field = '3333'
tables
container = EVENT_CONTAINER
exceptions others = 1.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'ZPSKUMAR'
objkey = objkey
event = 'GENERIC'
CREATOR = ' '
TAKE_WORKITEM_REQUESTER = ' '
START_WITH_DELAY = ' '
START_RECFB_SYNCHRON = ' '
NO_COMMIT_FOR_QUEUE = ' '
DEBUG_FLAG = ' '
NO_LOGGING = ' '
IDENT =
IMPORTING
EVENT_ID =
TABLES
EVENT_CONTAINER = EVENT_CONTAINER
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF
pls reward me points if usefull
regards,
preet
2008 Jun 02 12:54 PM
Hi Gaurav ,
Creating a object Steps :
1> Go to Transaction SW01 . Create Subtype. Give verything as BUS2012 except object type.
2> Save the object .
3> Select Event node and Click Create .
4> Give event name and description.
5> Release your event .
This is the way you can add the evnt .
After this Go to SWEC ,
Click New Entry.
Give Change doc object as EINKBELEG.
Object type as your z object .
Event as your event name which you created.
Save.
This is the way event is registered .
Now you can use this in your workflow.
For any problems . Reply
2008 Jun 02 1:22 PM
hi manik,
thanks alot..but when i activate the workflow one message comes that object type zbus2012 is not used in workflow.
Why so??
Thanks,
Gaurab
2008 Jun 03 5:45 AM
Hi ,
Where you have included the object type .
I hope you have included it in the start events of the workflow.
If not , here is the process.
Click on the basic data (HAT) on the main screen of your Workflow . Then Click on Start event TAb . There Give your z object name and in events give your event name .
Hope this will solve your problem .
2008 Jun 03 6:50 AM
2008 Jun 03 6:50 AM
2008 Jun 03 8:18 AM
Hi Gaurav ,
There is a button on left side called Workflow container ,
There you will find the container of your z object name .
Double click on the object . Then in the screen there will be check box called import export .Click both check box . I hope this will solve your problem.
2008 Jun 03 8:30 AM
Hi manik,
Thanks...Can i print the details of PO line items in mail and How...I have searched the line items in expression list but i didn't found any..pls help..
Thanks,
Gaurav
2008 Jun 03 9:05 AM
Hi Gaurav ,
I think the PO line item details are not available in the expressions i think.
For this you would have to crerate a new TASK and get the PO item details in a function module which you will be using in this task now use this task in your workflow , then you can get this PO item details also in the expressions provided there is proper binding between methods and Workflow.
2008 Jun 03 8:02 AM
You can use a simpler way to send an email to a person whenever a PO is saved.
Just configure output types (messages) in SPRO foloowing this path;
SPRO>Materials Mgmt>Purchasing>Messages>Outout Control>Message Types>Define Message Types for Purchase Order.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |