cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Mail Generation-Sales order

Former Member
0 Kudos

Dear All,

There is a requirement that

Automatic Mail should be generated & sent to Support tool Lotus Notes when:

1. Sales order is booked.

2.when design engineer puts date in the system after approving the drawing.

(mail should trigger to production/planning)

3.once the material received date is put i the system

Plz tel me how to do this. & also where these dates must be entered in sales order.

answers will be rewarded

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rohit,

This is not supported by standard sap outputs.

You will need to do following.

Create three o/ps. Assign in o/p procedure. Need to define a requirements.

1. When the order is created, the o/p will be proposed automatically. Now either email maintained at header texts or KNVV texts will be picked and order confirmation will be mailed.

2. Now when the date is updated and design is done, then there will be some field in VBAK/ VBAP or some Z table that will be updated. A requirement will be checked at VA01/VA02 user exit and that will check if this is updated or not. THen the requirement at o/p will check if this is updated or not. IF yes will propose o/p and email.

3. Once the material is updated ,VBEP will have confirmed schedule status will be C and hence again requirement can propsoe o/p and send email.

Thus three email automatically will be sent.

Reward if helpful

Kind Regards

Sandeep

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear all thx for replyin

Plz give me some more details how to create n assign status profile .

is there any other alternative

Former Member
0 Kudos

Hi Rohit,

You can use SAP status management in sales order processing. Status management allows you to document the current processing status of an object, such as a sales order or sales order item. The current processing status can consist of a combination of individual statuses. Each individual status fulfills two functions:

It informs you that a particular status has been reached (for example: "Sales order has been released")

It determines which business transactions may or may not be carried out next (for example: Delivery is allowed, billing is not)

The are two kinds of status:

System status

User status

System statuses are determined automatically by the transactions you carry out. You cannot change a system status manually.

User statuses, on the other hand, can be activated and deactivated by the user. Individual user statuses can be grouped together into status profiles. The status profiles can then be assigned in Customizing for Sales to:

Sales document types (for header status)

Item categories (for item status)

One status profile can be assigned to multiple sales document types and item categories.

To maintain a status profile in Customizing for Sales, go to the IMG and choose Sales and Distribution - Sales - Sales Documents - Define and assign status profile

Hope you find it useful.

Just try it in your Sandbox Client and it should work perfectly well.

Reward if helpful.

Regards

Ravi

Former Member
0 Kudos

Dear Rohit,

You wont need three different o/p's,

This can best be controlled by using status profile at sales order header

Go to SPRO - SD - SALES - DEFINE AND ASSIGN STATUS PROFILE.

Here you can define status for each of your activity that you as mentioned as your scenario.

Status 10 - Sales Order Booked

Status 20 - Drawing Approved

Status 30 - Material Received Date

Now you can control all these status in background as and when the relevant activities happen.

When you create the Sales Order and save it, the status by default would be at Status 10 and this would trigger an email.

The email address need to be mentioned in a Z table.

Now when the drawing is approved, either in background or manually the design engineer should make the status 20, this can also be done by selecting a field where you could capture drawing approved and if this field is not initial while saving the order, the email will be triggered to the production and planning people's address maintained in the z table. You can use Installation date - in sales order item - Contract data tab, Table name is VEDA

Thirdly, as soon as the material received date is entered, and the order is saved, the status would be made 30 in the background and the email will again be triggered, confirming the completion of the entire activity. You can use Acceptance date - in sales order item - Contract data tab, Table name is VEDA

Since you have already awarded reward points, i think you wont be to do it again.

But i bet this is the best way to do it.

Regards

Ravi

Former Member
0 Kudos

Dear Ravi

Thx for replyin

1.In va02 i coudn't find contract data tab.

can u plz explain steps to create status profile in detail

2. wether abap program needs to be developed for this.

3. wether workflow is required

Former Member
0 Kudos

Hi,

In VA02, you have to double click on line item 10 for eg; and the third tab is contract data tab. In this tab the validity dates for which the material or service is sold is maintained. These dates would get copied from the header dates.

Just there in that tab, you would see installation date and acceptance dates. Here you can maintain dates your scenario 2 & 3 as mentioned earlier.

Hope this solves your 1st doubt.

Regarding status profile.

Go to SPRO - SD - SALES - DEFINE AND ASSIGN STATUS PROFILE

Here select Header and give your status profile a name.

Now put the status number 10, say CRT - Sales Order Created - and put lower level as 10 and higher level as 20.

Now click on object types, here you have to choose what all activities should be permitted at status 10, obviously you shouldnt allow creating any subsequent document and billing unless the engineer approves the drawing, so select create document and invoicing and say forbidden.

Now create status number 20, say DRA - Drawing Approved - and put lower level as 20, and higher level as 30.

Do the similar activities as explained for status 10, which activities you want and which you dont when the order is at status 20.

Now create status number 30, say MTR - Material Received - and put lower and higher level as 30.

Now allow activities like creating document and invoicing allowed - permitted in your object types.

Thats it now your are done.

Now go to VOV8 and assign this Header status profile to your Sales Document type.

Now you are ready to go.

Now your ABAPer comes into picture, he has to automatically switch the status to 20 and 30, once the order is saved with entries in field - installation date for scenario 20 and acceptance date for scenario 30.

Z Table will contain email address and coresponding emails will be sent to the concerned production planning department.

Time to get some reward points

Hope you find it useful.

Regards

Ravi

Former Member
0 Kudos

Dear Ravi,

Thx for replyin

while creating status profile in the last column there is Authorization code - what is the use of it & how to create it.

Can u Plz explain.

Former Member
0 Kudos

Hi Rohit.

In your status profile, against each user status, you can assign an auithorization key, you can do F1 on that field and try clicking on the Key Sign and say " Continue w/o specfying project ", now choose define authorization keys.

Here you can create your authorization key and ask the BASIS person to asign it to the authorization object B_USERSTAT. This authorization object can then be assigned the SAP user's profile.

This will ensure that the SAP user with particular authorization key can only change the status.

For eg:

If in your status profile, you defined three status

say 10, 20 and 30

And if you want only the drawing engineer to make the status 20, then in that case he should have that authorization key assigned to the authorization object " B_USERSTAT ", which should now be assigned to his profile through transaction PFCG .

Hope this clarifies your doubt.

Please dont forget to reward points if helpful.

Kind Regards

Ravi