Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Associate FM to SWEC

former_member205763
Active Contributor
0 Kudos

Hi all,

My requirement is that, i need to write code to trigger an email on change of schedule line in va02.

For that what i planned use was SWEC, I'm not getting any info abt how to use SWEC,

I created an entry with change doc object as VERKBELEG and bus obj type as BUS2032 with event changed but how do we associate fm to it, i created an fm by copying fm SWE_CD_TEMPLATE_OBJKEY_FB_2 but the fm is not getting triggered.

So what is that i'm missing.

I checked many threads and sap help too, so links will not help.

regards,

кu03B1ятu03B9к

1 ACCEPTED SOLUTION

hadiman_ngoei
Participant
0 Kudos

Why don't you associate it with the Event "On Change" and create a Workflow and link it to this event and send out the mail from the workflow.

Thanks & regards,

Hadiman

5 REPLIES 5

hadiman_ngoei
Participant
0 Kudos

Why don't you associate it with the Event "On Change" and create a Workflow and link it to this event and send out the mail from the workflow.

Thanks & regards,

Hadiman

0 Kudos

Hi,

I need to trigger the mail only on change of schedule lines, so if i use on change event will i get the data, as i need data of vbap and vbep, will it be available there?

hadiman_ngoei
Participant
0 Kudos

The business object surely has the Sales Order number as one of the key attribs. You can easily create a Task to fetch any data from Item (VBAP) or Schedule line (VBEP) and send the mail.

Thanks & regards,

Hadiman

0 Kudos

I have never worked on business objects so if u could provide any pointers towards how to do it. it would be helpful.